I spent a while reading the guide for beginners, recomendations to post and some published posts before I write my first post. I hope my questions complying with the rules.
I'm working in Stata and saving the table results using booktabs command. The real size of the table has 8 columns and 9 rows but to better show my doubt I reduced its size. The programming code for the table has no variation except for content of the result.
This is the code:
\listfiles \documentclass{article} \usepackage{ booktabs, lscape } \begin{document} \section{Title 1} \subsection{Subtitle1} % \begin{landscape} % \begin{table}[htbp]\centering \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \caption{title of the table} \begin{tabular}{l*{7}{c}} \toprule &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}&\multicolumn{1}{c}{(4)}&\multicolumn{1}{c}{(5)}\\ &\multicolumn{1}{c}{tp \_t2m\_ro}&\multicolumn{1}{c}{tp\_t2m}&\multicolumn{1}{c}{tp\_ro}&\multicolumn{1}{c}{t2m\_ro}&\multicolumn{1}{c}{tp}\\ \midrule Dep var & & & & & \\ Indep var 1& 1.0003\sym{***}& 1.0004\sym{***}& 1.0003\sym{***}& & 1.0004\sym{***}& \\ & (0.0001) & (0.0001) & (0.0001) & & (0.0001) & \\ \addlinespace Indep var 2& 1.0020\sym{**} & 1.0020\sym{**} & & 1.0023\sym{**} & \\ & (0.0009) & (0.0009) & & (0.0009) & \\ \addlinespace Indep var 3& 1.0002 & & 1.0002 & 1.0006\sym{***}& & \\ & (0.0001) & & (0.0001) & (0.0001) & & \\ Indep var 4& 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & \\ & (.) & (.) & (.) & (.) & (.) & \\ \addlinespace Indep var 5& 0.8563\sym{***}& 0.8549\sym{***}& 0.8585\sym{***}& 0.8595\sym{***}& 0.8572\sym{***}& \\ & (0.0327) & (0.0326) & (0.0328) & (0.0328) & (0.0327) & \\ \midrule Observations & 310623 & 310623 & 310623 & 310623 & 310623 & \\ \bottomrule \end{tabular} \end{table} % \end{landscape} \end{document}
I use landscape environment since the table is big and it would fit better in horizontal way.
The title is showed in one page and the table in the next one. In other posts I found that landscape will always add a page break, so I think this may be the reason.
My goal is that the both titles and table are inside one page. How can it be achieved?