A mesa de látex não aparece onde a coloco, embora haja espaço suficiente

A mesa de látex não aparece onde a coloco, embora haja espaço suficiente

Estou com o seguinte problema: quero inserir uma tabela no apêndice do meu trabalho. Usei o comando /newpage para iniciar a seção do apêndice na qual desejo que a tabela apareça em uma nova página. A tabela não é tão grande, mas o Latex de alguma forma a desloca para uma nova página para que ela não apareça onde eu quero que apareça. Peço gentilmente ajuda para que a tabela apareça logo após o cabeçalho da subseção e não na próxima página.

Este é um código básico para o meu documento:


\documentclass[12pt,a4paper,titlepage]{article} % give the document type
\input{01_layout} %the command 'include' loads the corresponding file, alternatively, this file can be inserted here.

% ========================================================================================================

%List of graphics;

\graphicspath{{graphics/}} % this is the path for graphics (insert your graphics in this folder)
\makeindex
% ========================================================================================================
\begin{document} % start of the document
.
.
.
.
\newpage
\include{appendix} % include the appendix file
\newpage

E o arquivo de apêndice tem a seguinte aparência:

% Appendix
\newpage
\begin{appendix}
\section{Appendix}
.
.
.
.

\newpage
\subsection{Empirical Results}
\label{emp_res_app}
\subsubsection{In-Sample Correlations}
\label{samp_corr_app}
\input{tables/corr_table}
\end{appendix}
\newpage

Finalmente, este é o código da minha tabela:

\begin{sidewaystable}[!htbp] 
\centering 
\begin{threeparttable} 
\caption{Cross-Sectional Correlations} \label{corr_table} 
\setlength\tabcolsep{1.5pt} 
\begin{tabular}{lccccccccccc} 
\toprule \toprule 
{} & $Earn$ & $d^{+}$ & $d^{-}$ & $BkEq$ & $TACC$ & $OCF$ & $SPI$ & $LEV$ & $PAYOUT$ & $PAYER$   \\ \midrule $Earn$ & 1.0*** & 0.55*** & -0.55*** & 0.61*** & -0.08*** & 0.72*** & -0.1*** & 0.04*** & 0.47*** & 0.38*** \\
 $d^{+}$ & 0.55*** & 1.0*** & -1.0*** & 0.33*** & 0.01* & 0.37*** & -0.02*** & 0.02*** & 0.25*** & 0.35*** \\
 $d^{-}$ & -0.55*** & -1.0*** & 1.0*** & -0.33*** & -0.01* & -0.37*** & 0.02*** & -0.02*** & -0.25*** & -0.35*** \\
 $BkEq$ & 0.61*** & 0.33*** & -0.33*** & 1.0*** & -0.38*** & 0.67*** & -0.1*** & 0.03*** & 0.44*** & 0.39*** \\
 $TACC$ & -0.08*** & 0.01* & -0.01* & -0.38*** & 1.0*** & -0.72*** & 0.06*** & -0.09*** & -0.25*** & -0.18*** \\
 $OCF$ & 0.72*** & 0.37*** & -0.37*** & 0.67*** & -0.72*** & 1.0*** & -0.11*** & 0.09*** & 0.49*** & 0.39*** \\
 $SPI$ & -0.1*** & -0.02*** & 0.02*** & -0.1*** & 0.06*** & -0.11*** & 1.0*** & -0.05*** & -0.06*** & -0.04*** \\
 $LEV$ & 0.04*** & 0.02*** & -0.02*** & 0.03*** & -0.09*** & 0.09*** & -0.05*** & 1.0*** & 0.07*** & 0.06*** \\
 $PAYOUT$ & 0.47*** & 0.25*** & -0.25*** & 0.44*** & -0.25*** & 0.49*** & -0.06*** & 0.07*** & 1.0*** & 0.64*** \\
 $PAYER$ & 0.38*** & 0.35*** & -0.35*** & 0.39*** & -0.18*** & 0.39*** & -0.04*** & 0.06*** & 0.64*** & 1.0*** \\
\bottomrule 
\end{tabular} 
\begin{tablenotes} \small \item \textbf{Table \ref{corr_table}} displays Pearson correlations for the entire sample, i.e. the pooled cross-section of firms from 1988 to 2021 including all variables of the forecast models for the conditional first and second moment of future earnings. However, in order to conserve space, all interacted variables as well as the industry dummies are omitted in this table.\end{tablenotes} 
\end{threeparttable} 
\end{sidewaystable}```

Responder1

O ambiente sidewaystableé um ambiente flutuante. Esses carros flutuantes são normalmente posicionados automaticamente pelo LaTeX na parte superior ou inferior de uma página. Se nenhum deles couber, eles serão colocados em uma nova página.

Você usa um threepartstableque já lida bem com coisas como legendas, que podem levar a alguns problemas se não forem colocadas dentro de um carro alegórico. Resumindo, se você não quer que as coisas se comportem como um carro flutuante, não as coloque dentro de um ambiente flutuante.

Portanto, sugiro que você coloque sua mesa em uma caixa girada 90 graus:

\documentclass[12pt,a4paper,titlepage]{article} 
\usepackage[margin=25mm]{geometry} % with the default margins, the table would not fit
\usepackage{rotating}
\usepackage{threeparttable}
\usepackage{booktabs}

\begin{document}

\begin{appendix}
\section{Appendix}
\subsection{Empirical Results}
\label{emp_res_app}
\subsubsection{In-Sample Correlations}
\label{samp_corr_app}
{\centering\rotatebox{90}{%
\begin{threeparttable} 
\caption{Cross-Sectional Correlations} \label{corr_table} 
\setlength\tabcolsep{1.5pt} 
\begin{tabular}{lccccccccccc} 
\toprule \toprule 
{} & $Earn$ & $d^{+}$ & $d^{-}$ & $BkEq$ & $TACC$ & $OCF$ & $SPI$ & $LEV$ & $PAYOUT$ & $PAYER$   \\ \midrule $Earn$ & 1.0*** & 0.55*** & -0.55*** & 0.61*** & -0.08*** & 0.72*** & -0.1*** & 0.04*** & 0.47*** & 0.38*** \\
 $d^{+}$ & 0.55*** & 1.0*** & -1.0*** & 0.33*** & 0.01* & 0.37*** & -0.02*** & 0.02*** & 0.25*** & 0.35*** \\
 $d^{-}$ & -0.55*** & -1.0*** & 1.0*** & -0.33*** & -0.01* & -0.37*** & 0.02*** & -0.02*** & -0.25*** & -0.35*** \\
 $BkEq$ & 0.61*** & 0.33*** & -0.33*** & 1.0*** & -0.38*** & 0.67*** & -0.1*** & 0.03*** & 0.44*** & 0.39*** \\
 $TACC$ & -0.08*** & 0.01* & -0.01* & -0.38*** & 1.0*** & -0.72*** & 0.06*** & -0.09*** & -0.25*** & -0.18*** \\
 $OCF$ & 0.72*** & 0.37*** & -0.37*** & 0.67*** & -0.72*** & 1.0*** & -0.11*** & 0.09*** & 0.49*** & 0.39*** \\
 $SPI$ & -0.1*** & -0.02*** & 0.02*** & -0.1*** & 0.06*** & -0.11*** & 1.0*** & -0.05*** & -0.06*** & -0.04*** \\
 $LEV$ & 0.04*** & 0.02*** & -0.02*** & 0.03*** & -0.09*** & 0.09*** & -0.05*** & 1.0*** & 0.07*** & 0.06*** \\
 $PAYOUT$ & 0.47*** & 0.25*** & -0.25*** & 0.44*** & -0.25*** & 0.49*** & -0.06*** & 0.07*** & 1.0*** & 0.64*** \\
 $PAYER$ & 0.38*** & 0.35*** & -0.35*** & 0.39*** & -0.18*** & 0.39*** & -0.04*** & 0.06*** & 0.64*** & 1.0*** \\
\bottomrule 
\end{tabular} 
\begin{tablenotes} \small \item \textbf{Table \ref{corr_table}} displays Pearson correlations for the entire sample, i.e. the pooled cross-section of firms from 1988 to 2021 including all variables of the forecast models for the conditional first and second moment of future earnings. However, in order to conserve space, all interacted variables as well as the industry dummies are omitted in this table.\end{tablenotes} 
\end{threeparttable} 
}\par}

Bla bla
\end{appendix}

\end{document}

insira a descrição da imagem aqui

(No caso provável de você carregar o graphicxpacote, você não precisa carregá-lo rotatingpara que o procedimento acima funcione. Eu apenas presumi que você carregasse o rotatingpacote, já que esse pacote fornece o sidewaystableambiente, então o mantive no código. )

informação relacionada