I'm working on Latex to generate the following table,
I want columns that have numbers to be right aligned and similar sized.
Here is a minimal code example to start the discussion:
\documentclass{book}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{threeparttable}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{table}[h]
\small
\centering
\caption{Descomposici\'on est\'atica del \'{\i}ndice de Theil del ingreso per c\'apita familiar}
\begin{threeparttable}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}lrrrrrrrrrrrrrrr@{}}
\toprule
\multirow{3}{*}{A\~no} & \multirow{3}{*}{Theil global} & \multicolumn{4}{c}{Hogares no conformados por adultos mayores} & \multicolumn{4}{c}{Hogares conformados por adultos mayores} \\
\cline{3-6}\cline{7-10}
& & & & \multicolumn{2}{l}{Contribuci\'on} & & & \multicolumn{2}{l}{Contribuci\'on} & \multicolumn{2}{c}{Efecto Intragrupal} & \multicolumn{2}{c}{Efecto Intergrupal} & \\
& & Theil & Pob \% & Abs & Rel \% & Theil & Pob \% & Abs & Rel \% & Abs & Rel \% & Abs & Rel \% \\ \hline
\midrule
2003 & 0,448 & 0,458 & 79,5 & 0,349 & 78,1 & 0,403 & 20,5 & 0,096 & 21,3 & 0,445 & 99,4 & 0,003 & 0,7 \\
2004 & 0,421 & 0,445 & 79,5 & 0,340 & 80,8 & 0,332 & 20,5 & 0,078 & 18,6 & 0,418 & 99,4 & 0,003 & 0,7 \\ \hline
\bottomrule
\end{tabular}}
\begin{tablenotes}
\footnotesize
\item Fuente: Elaboraci\'on propia en base a la EPH.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
From this code, I get this table:
As you can see, I cannot set a similar size for the columns that have numbers. I went over the threads that discuss \multicolumn and \multirow, but I still don't understand how to make these columns evenly distributed. What can I do to resolve this?
Thank you,



\usepackage[ut8]{inputenc}in the preamble. – Fran Nov 16 '17 at 02:01\usepackage[utf8]{inputenc}already, and compiling with TeXShop, but the Spanish characters don't appear. – eagu_999 Nov 16 '17 at 02:43\documentclass{article} \usepackage[utf8]{inputenc} \begin{document} Año camión \end{document}. It must work withpdflatex. – Fran Nov 16 '17 at 17:24