1

I want to put the following table together with a other similar table in two columns

\begin{table}[h]
\centering
{\fontfamily{ptm}\selectfont{
\rowcolors{1}{}{gray!20}
\begin{tabular}{cc}
\rowcolor{LightBlue} \textsf{Plazos} & \textsf{Tasa efectiva anual}\\
\textsf{$30 - 59$ d\'ias} & \textsf{2.00 \%}\\
\textsf{$60 - 90$ d\'ias} & \textsf{2.50 \%}\\
\textsf{$91 - 180$ d\'ias} & \textsf{4.00 \%}\\
\textsf{$181 - 366$ d\'ias} & \textsf{5.00 \%}\\
\textsf{$367 - 546$ d\'ias} & \textsf{6.00 \%}\\
\textsf{$547 - 731$ d\'ias} & \textsf{8.00 \%}\\
\textsf{$732 - 1096$ d\'ias} & \textsf{9.00 \%}\\ \hline
\end{tabular}}}
\caption{Pago de intereses al vencimiento.}
\end{table}

I tried with multicols but doesn't work.

2
  • You can't use table in a multicols environment.
    – egreg
    Mar 7 '13 at 14:37
  • Yes, I noticed that. Mar 7 '13 at 14:39
3

Due to your comment about align tables and captions, I suggest take also a look to the subfigure, subcaption, subfig or floatrow packages for subfloat formats.

On the other hand, although is out of the question, the MWE with subfigure include also numprint, inputenc and babel packages for a better/easier formatting according to Spanish conventions.
MWE

\documentclass[spanish,11pt]{article}
\usepackage{babel}
\usepackage[table]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[normal]{subfigure}
\usepackage{numprint}

\begin{document}

\begin{table}[h]
\subtable[Cuadro original]{
{\fontfamily{ptm}\selectfont{
\rowcolors{1}{}{gray!20}
\begin{tabular}{cc}
\rowcolor{blue!30} \textsf{Plazos} & \textsf{Tasa efectiva anual}\\
\textsf{$30 - 59$ días} & \textsf{\numprint{2.00} \%}\\
\textsf{$60 - 90$ días} & \textsf{\numprint{2.50} \%}\\
\textsf{$91 - 180$ días} & \textsf{\numprint{4.00} \%}\\
\textsf{$181 - 366$ días} & \textsf{\numprint{5.00} \%}\\
\textsf{$367 - 546$ días} & \textsf{\numprint{6.00} \%}\\
\textsf{$547 - 731$ días} & \textsf{\numprint{8.00} \%}\\
\textsf{$732 - 1096$ días} & \textsf{\numprint{9.00} \%}\\ \hline
\end{tabular}}}
}
\subtable[Cuadro alargado]{
{\fontfamily{ptm}\selectfont{
\rowcolors{1}{}{gray!20}
\begin{tabular}{cc}
\rowcolor{blue!30} \textsf{Plazos} & \textsf{Tasa efectiva anual}\\
\textsf{$30 - 59$ días} & \textsf{\numprint{2.00} \%}\\
\textsf{$60 - 90$ días} & \textsf{\numprint{2.50} \%}\\
\textsf{$91 - 180$ días} & \textsf{\numprint{4.00} \%}\\
\textsf{$181 - 366$ días} & \textsf{\numprint{5.00} \%}\\
\textsf{$91 - 180$ días} & \textsf{\numprint{4.00} \%}\\
\textsf{$181 - 366$ días} & \textsf{\numprint{5.00} \%}\\
\textsf{$367 - 546$ días} & \textsf{\numprint{6.00} \%}\\
\textsf{$547 - 731$ días} & \textsf{\numprint{8.00} \%}\\
\textsf{$732 - 1096$ días} & \textsf{\numprint{9.00} \%}\\ \hline
\end{tabular}}}
}
\caption{Pago de intereses al vencimiento.}
\end{table}
\end{document}
3

One approach is just to put the two tabulars side-by-side (they're seen by TeX, at some point, as two large characters). Something like this:

\documentclass[a4paper]{article}
\begin{document}
\begin{table}[h]
\centering
{\fontfamily{ptm}\selectfont
%\rowcolors{1}{}{gray!20}
\begin{tabular}{cc}
\textsf{Plazos} & \textsf{Tasa efectiva anual}\\
\textsf{$30 - 59$ d\'ias} & \textsf{2.00 \%}\\
\textsf{$60 - 90$ d\'ias} & \textsf{2.50 \%}\\
\textsf{$91 - 180$ d\'ias} & \textsf{4.00 \%}\\
\textsf{$181 - 366$ d\'ias} & \textsf{5.00 \%}\\
\textsf{$367 - 546$ d\'ias} & \textsf{6.00 \%}\\
\textsf{$547 - 731$ d\'ias} & \textsf{8.00 \%}\\
\textsf{$732 - 1096$ d\'ias} & \textsf{9.00 \%}\\ \hline
\end{tabular}
\begin{tabular}{cc}
\textsf{Plazos} & \textsf{Tasa efectiva anual}\\
\textsf{$30 - 59$ d\'ias} & \textsf{2.00 \%}\\
\textsf{$60 - 90$ d\'ias} & \textsf{2.50 \%}\\
\textsf{$91 - 180$ d\'ias} & \textsf{4.00 \%}\\
\textsf{$181 - 366$ d\'ias} & \textsf{5.00 \%}\\
\textsf{$367 - 546$ d\'ias} & \textsf{6.00 \%}\\
\textsf{$547 - 731$ d\'ias} & \textsf{8.00 \%}\\
\textsf{$732 - 1096$ d\'ias} & \textsf{9.00 \%}\\ \hline
\end{tabular}}
\caption{Pago de intereses al vencimiento.}
\end{table}
\end{document}

Result

Sorry - as you didn't give a full MWE, I had to remove the \rowcolor calls, in preference to spending a lot of time discovering what packages I needed. :-)

5
  • @egreg : Thanks, I didn't spot that particular bit of redundancy Mar 7 '13 at 15:59
  • Don't worry for the colours. I have another problem, the 'other similar table' have a different hight so LaTeX centers vertically them and I'd like to put them at the same hight, the another problem is that I can't put a caption in each table without move which should be on the right to above. Mar 7 '13 at 19:01
  • I solved the problem of the hight adding empty rows left the captions, thanks a lot for your help. Mar 7 '13 at 20:26
  • I believe there are solutions for both of your problems -- two figures in the same float, and aligning the two tables vertically (but I'm not familiar with either, sorry) Mar 7 '13 at 21:04
  • I'm rather dubious about the numbers in the first column, that aren't in sans serif type and the dash is a minus sign, with probably wrong spacing.
    – egreg
    Mar 8 '13 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.