0

I used longtable and threeparttablex to make table notes. I wonder the way to adjust table notes to fit page. Also, if possible, I want to hide the endfoot line. Any help will be appreciated.

\documentclass[11pt]{article}
\usepackage{longtable, booktabs, tabu} 
\usepackage[flushleft]{threeparttablex} 
\usepackage[hang,footnotesize,bf]{caption} 
\usepackage[paper=a4paper, margin=1in]{geometry} % set margins
\renewcommand{\arraystretch}{1.2} 

\begin{document}
\centering
\linespread{1}
\footnotesize
\begin{ThreePartTable}

\begin{TableNotes}
        \item\textbf{Notes}: Insert Whatever Important Notes hHere.
\end{TableNotes}

\begin{longtabu} to \textwidth {@{\extracolsep{\fill}} cccccc}
\caption{\textbf{Insert the Table Caption}} \\
\toprule
   & \multicolumn{5}{c}{\textbf{B/M}} \\
    \cmidrule{2-6}    \textbf{Size} & 1  & 2  & 3  & 4  & 5 \\
\midrule
\endfirsthead
        \caption{\textbf{Continued}} \\
\toprule
   & \multicolumn{5}{c}{\textbf{B/M}} \\
    \cmidrule{2-6}    \textbf{Size} & 1  & 2  & 3  & 4  & 5 \\
\midrule  
\endhead
    \multicolumn{6}{c}{\textit{Continued on Next Page}} \\   \bottomrule
\endfoot
    \multicolumn{6}{c}{\textit{End of Table}} \\  \bottomrule
    \insertTableNotes
\endlastfoot

   & \multicolumn{5}{c}{a} \\
1  & 0.305 & 0.244 & -0.270 & -0.829*** & -0.846* \\
   & (1.24) & (1.24) & (-1.44) & (-3.61) & (-1.66) \\
2  & 0.787*** & 0.357** & -0.083 & -0.371 & -0.995 \\
   & (4.68) & (2.45) & (-0.50) & (-1.01) & (-1.43) \\
3  & 0.898*** & 0.472*** & 0.006 & -0.847** & -1.16 \\
   & (6.22) & (3.20) & (0.03) & (-2.28) & (-1.54) \\
4  & 0.793*** & 0.319** & 0.062 & -0.274 & -1.93*** \\
   & (5.90) & (2.00) & (0.25) & (-0.61) & (-2.81) \\
5  & 0.732*** & 0.367*** & -0.088 & -0.343 & -0.857 \\
   & (10.04) & (2.85) & (-0.40) & (-0.96) & (-1.31) \\
\midrule
   & \multicolumn{5}{c}{b} \\
1  & 0.815*** & 0.838*** & 0.873*** & 0.854*** & 0.580*** \\
   & (12.19) & (16.55) & (15.31) & (13.48) & (3.63) \\
2  & 0.862*** & 0.826*** & 0.793*** & 0.802*** & 1.358*** \\
   & (17.95) & (20.88) & (18.61) & (8.31) & (7.43) \\
3  & 0.915*** & 0.875*** & 0.845*** & 0.867*** & 1.068*** \\
   & (21.92) & (21.34) & (16.40) & (8.98) & (5.88) \\
4  & 0.930*** & 0.881*** & 0.874*** & 1.052*** & 0.663*** \\
   & (22.84) & (17.97) & (11.98) & (8.37) & (3.96) \\
5  & 0.813*** & 0.813*** & 0.815*** & 0.815*** & 0.939*** \\
   & (40.48) & (21.97) & (12.98) & (8.02) & (4.94) \\
\midrule

\pagebreak
   & \multicolumn{5}{c}{hml} \\
1  & \textbf{0.694***} & \textbf{0.693***} & \textbf{0.829***} & \textbf{0.770***} & 0.477 \\
   & \textbf{(8.31)} & \textbf{(7.81)} & \textbf{(8.40)} & \textbf{(6.86)} & (1.47) \\
2  & \textbf{0.724***} & \textbf{0.592***} & \textbf{0.584***} & \textbf{0.455**} & \textbf{0.991***} \\
   & \textbf{(8.68)} & \textbf{(9.91)} & \textbf{(8.16)} & \textbf{(2.47)} & (3.73) \\
3  & \textbf{0.465***} & \textbf{0.561***} & \textbf{0.455***} & \textbf{0.655***} & -0.261 \\
   & \textbf{(6.59)} & \textbf{(8.61)} & \textbf{(5.11)} & \textbf{(4.63)} & (-0.74) \\
4  & \textbf{0.469***} & \textbf{0.489***} & \textbf{0.370***} & \textbf{1.007***} & 0.158 \\
   & (6.58) & (5.57) & (3.31) & (5.75) & (0.46) \\
5  & 0.0532 & \textbf{0.188***} & \textbf{0.397***} & \textbf{0.311*} & -0.142 \\
   & (1.52) & (3.12) & (4.11) & (1.71) & (-0.44) \\
\midrule
   & \multicolumn{5}{c}{R2} \\
1  & 0.589 & 0.693 & 0.745 & 0.650 & 0.188 \\
2  & 0.760 & 0.806 & 0.740 & 0.381 & 0.269 \\
3  & 0.794 & 0.774 & 0.630 & 0.381 & 0.159 \\
4  & 0.813 & 0.730 & 0.494 & 0.389 & 0.117 \\
5  & 0.908 & 0.753 & 0.530 & 0.310 & 0.168 \\
\bottomrule\
\end{longtabu}
\end{ThreePartTable}
\end{document}
  • 1
    Welcome to TeX.SX! Could you please edit your question and add a minimal working example (MWE), a complete small test document that others can use to reproduce the issue you describe? – leandriis Oct 25 '19 at 16:36
  • 1
    tabu is not maintained. Read the readme here before continuing to use it: github.com/tabu-issues-for-future-maintainer/tabu. – Ulrike Fischer Oct 25 '19 at 17:18
  • Why not simply use a longtable? With \begin{longtable}{cccccc} you will get: i.stack.imgur.com/7NVw7.png You also seem to be able to fit the whole table into a single page (remove \pagebreak), so actually don't even need longtable at all and could simply use a normel tabular in combination with the threeparttable package. – leandriis Oct 25 '19 at 18:26
  • I deleted some content in the example, so it looks like a single table could do the trick. I did not use longtable, becasue longtabu can adjust the table fit to page easily. In fact, you get the notes fit to table, because the table was not adjusted to fit the page in the fist place. Thanks for your reply anyway :) – Yuxi Oct 25 '19 at 19:16
  • See also tex.stackexchange.com/questions/359903/… – John Kormylo Oct 25 '19 at 21:38

Your Answer

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

Browse other questions tagged or ask your own question.