3

I want to align two tables respectively on one page having the same space to the top and bottom margin. Here is a small MWE of my tables (that are much larger)

 \documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{threeparttable}
\usepackage{booktabs}

\begin{document}
\begin{table}[hbt!] \centering
\begin{threeparttable}
  \caption{a} 
\begin{tabular}{@{\extracolsep{4pt}}lcccccc} 
\toprule
 a & b  & c & d  \\ 
\hline \\[-1.8ex] 
a & 14.40 $\%$ & 60.99 $\%$ & Yes  \\  
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Table2
\begin{table}[hbt!] \centering
\begin{threeparttable}
  \caption{b} 
\begin{tabular}{@{\extracolsep{4pt}}ccccccc} 
\toprule
  & a & b & c & 
  d & e \\ 
\hline \\[-1.8ex] 
 & 0.3 & 16.98 $\%$ & 13.31 $\%$    & 17.86 $\%$    & 2.98 $\%$
 \\ 
 & 0.5 & 14.38 $\%$& 10.17 $\%$ & 18.18 $\%$    &   2.98 $\%$ \\
  \bottomrule
 \end{tabular}
\end{threeparttable}
\end{table}
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[h] \centering
\begin{threeparttable}
  \caption{c} 
\begin{tabular}{@{\extracolsep{4pt}}clcccccc} 
\toprule
  & a & b & d & d &e & f & g \\ 
\hline \\[-1.8ex] 
 & 0.3 & 16.64 $\%$ & 15.32 $\%$ & 16.77 $\%$ & 11.87 $\%$  & 15.65 $\%$ & 12.94 $\%$ \\ 
 & 0.5 & 15.59 $\%$ & 11.25 $\%$ & 14.72 $\%$ & 7.95 $\%$  \\
 \bottomrule
 \end{tabular}
\end{threeparttable}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[h]
\centering
\begin{threeparttable}
  \caption{d} 
\begin{tabular}{@{\extracolsep{4pt}}clcccccc} 
\toprule
  & a & b & c & d & e & f & g  \\ 
\hline \\[-1.8ex] 
 & 0.3 & 24.72 $\%$ & 20.96 $\%$ & 48.54 $\%$   & 86.44 $\%$ & 80.20 $\%$ & 63.64 $\%$ 
 \\ 
 & 0.5 & 11.60 $\%$& 7.94 $\%$  &   40.98 $\%$  &   74.70 $\%$  &   75.96 $\%$ &    42.22 $\%$ \\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}

In particular, I want that Table 1 and 2 are on one page "equally distributed" and the same for Table 3 and 4 on a new page.

4
  • I dit it with "\hfill\mbox{}\vfill" before and after each table, not the most elegant way but it works
    – Leo96
    Aug 19 at 17:24
  • 1
    I wonder why you like to have this small tables, which together occupay only about 2/3 of page on two pages? To achieve what you like, set all table placement to [p] and \newpage repalce with \clearpage.
    – Zarko
    Aug 19 at 17:29
  • 1
    Just ou of idle curiosity: Why do you write \hline \\[-1.8ex] when you could be writing \midrule?
    – Mico
    Aug 19 at 17:45
  • @Zarko my real tables are not that small, it was just to provide an example
    – Leo96
    Aug 19 at 18:04
5

See, if the following is what you lookinng for:

\documentclass{article}
\usepackage{booktabs, 
            threeparttable}
\NewExpandableDocumentCommand\mcc{O{1}m}{\multicolumn{#1}{c}{#2}}  %

\usepackage[skip=1ex]{caption}
\usepackage{siunitx}

\begin{document}
\begin{table}[p]
    \centering
    \sisetup{table-format=2.2{\,\%}}
  \caption{d}
\begin{tabular}{c*{2}{S<{\,\%}} c }
    \toprule
a   & \mcc{b}   & \mcc{c}   & d     \\
    \midrule
a   & 14.40     & 60.99     & Yes  \\
\bottomrule
\end{tabular}
\end{table}

%Table2
\begin{table}[p]
    \centering
    \sisetup{table-format=2.2{\,\%}}
  \caption{d}
\begin{tabular}{c*{5}{S<{\,\%}}}
    \toprule
a   & \mcc{b}   & \mcc{c}   & \mcc{d}   & \mcc{e}       \\
    \midrule
0.3 & 16.98     & 13.31     & 17.86     & 2.98          \\
0.5 & 14.38     & 10.17     & 18.18     & 2.98          \\
    \bottomrule
 \end{tabular}
\end{table}


\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[p]
    \centering
    \sisetup{table-format=2.2{\,\%}}
  \caption{d}
\begin{tabular}{c*{7}{S<{\,\%}}}
    \toprule
a   & \mcc{b}   & \mcc{c}   & \mcc{d}   & \mcc{e}   & \mcc{f}   & \mcc{g}   \\
    \midrule
0.3 & 16.64     & 15.32     & 16.77     & 11.87     & 15.65     & 12.94     \\
0.5 & 15.59     & 11.25     & 14.72     &  7.95     & \mcc{}    & \mcc{}    \\
 \bottomrule
 \end{tabular}
\end{table}

\begin{table}[p]
    \centering
    \sisetup{table-format=2.2{\,\%}}
  \caption{d}
\begin{tabular}{c*{7}{S<{\%}}}
    \toprule
a   & \mcc{b}   & \mcc{c}   & \mcc{d}   & \mcc{e}   & \mcc{f}   & \mcc{g}   \\
    \midrule
0.3 & 24.72     & 20.96     & 48.54     & 86.44     & 80.20     & 63.64     \\
0.5 & 11.60     & 7.94      & 40.98     & 74.70     & 75.96     & 42.22     \\
    \bottomrule
\end{tabular}
\end{table}
\end{document}
  • From your MWE I remove all threeparttable since I didn't see what you need it (you have not tablenotes, however it is not to difficult to return them back).
  • For column with numbers I use S column type that they are aligned at decimal points
  • As I already mentioned in my comment, for placement options I use [p] and \clearpage instead \newpage

enter image description here

4

Here's a solution that uses one table[p] environment per page, with two tabular environments per table.

I would also recommend replacing all instances of \hline \\[-1.8ex] with \midrule.

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{threeparttable,booktabs}

\begin{document}

\begin{table}[p] 
\centering
\begin{threeparttable}
 \caption{a} 
\begin{tabular}{lccc} 
\toprule
 a & b & c & d \\ 
\midrule 
 a & 14.40 $\%$ & 60.99 $\%$ & Yes \\  
\bottomrule
\end{tabular}
\end{threeparttable}

\bigskip\bigskip
\begin{threeparttable}
\caption{b} 
\begin{tabular}{ccccc} 
\toprule
 a & b & c & d & e \\ 
\midrule 
 0.3 & 16.98 $\%$ & 13.31 $\%$ & 17.86 $\%$ & 2.98 $\%$ \\ 
 0.5 & 14.38 $\%$ & 10.17 $\%$ & 18.18 $\%$ & 2.98 $\%$ \\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}

\clearpage

\begin{table}[p]
\centering
\begin{threeparttable}
\caption{c} 
\begin{tabular}{lcccccc} 
\toprule
 a & b & c & d & e & f & g \\ 
\midrule 
 0.3 & 16.64 $\%$ & 15.32 $\%$ & 16.77 $\%$ & 11.87 $\%$  & 15.65 $\%$ & 12.94 $\%$ \\ 
 0.5 & 15.59 $\%$ & 11.25 $\%$ & 14.72 $\%$ & 7.95 $\%$  \\
\bottomrule
\end{tabular}
\end{threeparttable}

\bigskip\bigskip
\begin{threeparttable}
\caption{d} 
\begin{tabular}{lcccccc} 
\toprule
 a & b & c & d & e & f & g  \\ 
\midrule 
 0.3 & 24.72 $\%$ & 20.96 $\%$ & 48.54 $\%$ & 86.44 $\%$ & 80.20 $\%$ & 63.64 $\%$ \\ 
 0.5 & 11.60 $\%$ &  7.94 $\%$ & 40.98 $\%$ & 74.70 $\%$ & 75.96 $\%$ & 42.22 $\%$ \\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}

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.