1

I tried put two tables in the same page. I read in the Internet that I can make this using the minipage. I use minipage but the two tables still in pages differents, not side by side. The piece of code that I used is:

\documentclass[11pt]{article}
\usepackage{amstext}
\usepackage{lmodern}
\usepackage{ragged2e}
\usepackage{mathtools,float,geometry}
\usepackage{booktabs,array,tabularx,threeparttablex}
\usepackage{subfig}
\begin{document}
\begin{table}[H]
\begin{minipage}{.2\textwidth}
\centering
\begin{tabular}{cc}
\toprule Tempo (s) & Per\'{i}odo (s)\\
\midrule 0,9509 & 1,3645\\
\hline 2,3153 & 1,3644\\
\bottomrule
\end{tabular}
\end{minipage}
\end{table}

\begin{table}[H]
\begin{minipage}{.2\textwidth}
\centering
\begin{tabular}{cc}
\toprule Tempo (s) & Velocidade (m/s)\\
\midrule 0,2733 & 5,3763\\
\hline 0,9496 & 5,3763\\
\bottomrule
\end{tabular}
\end{minipage}
\end {table}
\end{document}
  • 2
    Put the minipages into a single table environment. – cfr Apr 12 '16 at 01:20
  • @cfr How I do that? Do you want me to do a only one table? – Carmen González Apr 12 '16 at 01:23
  • 1
    One table. Two minipages. Two tabulars. – cfr Apr 12 '16 at 01:32
  • @cfr But I used in this code two minipages (I begin and end two minipages). I don't understand. Can you explain your ideia better for me, please? – Carmen González Apr 12 '16 at 01:34
  • @cfr I try to make your suggestion but now the first table is on the other table, and the table which is below go out of the page. – Carmen González Apr 12 '16 at 01:43
  • 1
    That's because .2\textwidth is too little. See below. – cfr Apr 12 '16 at 01:44
  • @cfr thanks for the demonstration. I make this code like you, but my data is more big that I put in the code when I wrote the question because not fit. Now, the two tables are side by side, but the biggest table are on the footer. I can't read the data of this table, because the letters are overlapping. – Carmen González Apr 12 '16 at 01:48
  • @cfr I put 0,4 like you but this appears the same effect that I wrote in my last comment. – Carmen González Apr 12 '16 at 01:49
  • 1
    You can increase 0.4 a bit, but if the total width of the two tables exceeds your total \textwidth then you cannot make them fit side-by-side without either making the tables smaller (smaller font, less content etc.) or making the \textwidth bigger (bigger paper, smaller margins etc.). Or you can rotate the entire page or the tables for landscape mode. But I don't know what you mean about the footer or how tall the tables are, so this may not help. – cfr Apr 12 '16 at 09:26

1 Answers1

4

This is the idea:

\documentclass[11pt]{article}
\usepackage{float}
\usepackage{booktabs}
\begin{document}
  \begin{table}[H]
    \begin{minipage}{.4\textwidth}
      \centering
      \begin{tabular}{cc}
        \toprule Tempo (s) & Per\'{i}odo (s)\\
        \midrule 0,9509 & 1,3645\\
        2,3153 & 1,3644\\
        \bottomrule
      \end{tabular}
    \end{minipage}
    \begin{minipage}{.4\textwidth}
      \centering
      \begin{tabular}{cc}
        \toprule Tempo (s) & Velocidade (m/s)\\
        \midrule 0,2733 & 5,3763\\
        0,9496 & 5,3763\\
        \bottomrule
      \end{tabular}
    \end{minipage}
  \end{table}
\end{document}

double trouble

cfr
  • 198,882