Skip to content

Instantly share code, notes, and snippets.

@GuilhermeHideki
Created May 23, 2017 13:34
Show Gist options
  • Select an option

  • Save GuilhermeHideki/375e37cf0492b8f3ba38406e55263309 to your computer and use it in GitHub Desktop.

Select an option

Save GuilhermeHideki/375e37cf0492b8f3ba38406e55263309 to your computer and use it in GitHub Desktop.
column example
% Antes do document
\usepackage{array}
% Colunas para left, right e middle
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\begin{tabular}{ |p{.25\textwidth}||L{.25\textwidth}||M{.25\textwidth}||R{.25\textwidth}|}
\hline
Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 Code&ISO numeric Code\\
\hline
Afghanistan & AF &AFG& 004\\
Aland Islands& AX & ALA &248\\
Albania &AL & ALB& 008\\
Algeria &DZ & DZA& 012\\
American Samoa& AS & ASM&016\\
Andorra& AD & AND &020\\
Angola& AO & AGO&024\\
\hline
\end{tabular}
% Com correções para contar as bordas
\begin{tabular}{
|p{.25\textwidth -2\tabcolsep - 1.25\arrayrulewidth}
|L{.25\textwidth -2\tabcolsep - 1.25\arrayrulewidth}
|M{.25\textwidth -2\tabcolsep - 1.25\arrayrulewidth}
|R{.35\textwidth -2\tabcolsep - 1.25\arrayrulewidth}|}
\hline
Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 Code&ISO numeric Code\\
\hline
Afghanistan & AF &AFG& 004\\
Aland Islands& AX & ALA &248\\
Albania &AL & ALB& 008\\
Algeria &DZ & DZA& 012\\
American Samoa& AS & ASM&016\\
Andorra& AD & AND &020\\
Angola& AO & AGO&024\\
\hline
\end{tabular}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment