表格不显示

表格不显示

我正在使用以下代码,但表格没有显示:

\documentclass[jou,apacite]{apa6}

\usepackage{rotating} 
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{afterpage}
\usepackage{threeparttable}
\usepackage{mathtools, nccmath}
\usepackage{lipsum}
\begin{document}
As usual the text....bla bla bla...

I use a .tex directory to create a table using the following commands:
\begin{table}
\begin{threeparttable}
\caption{Tail Dependence.}
\label{Tails}
\begin{adjustbox}{width=1\textwidth}
\begin{tabular}{ccccccccccccc}\\ \toprule
bla bla bla... \\ \midrule
bla& bla &bla&bla &bla &bla &bla &bla &bla 
&bla &bla &bla   &bla\\
bla&bla&bla &bla &bla &bla &bla &bla &bla &bla & &bla    &bla\tnote{***}\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item[\tnote{***}] If $\lambda_{L}$ or $\lambda_{U} \geq$ \textit{Pr}[1\%].
\item[\tnote{**}] If $\lambda_{L}$ or $\lambda_{U} \geq$ \textit{Pr}[5\%].
\end{tablenotes}
\end{adjustbox}
\end{threeparttable}
\end{table}
\end{document}

我明白了 enter image description here

谢谢您的帮助

答案1

移除adjustbox(见海科·奥伯迪克答案),添加缺少的包你的表格会按预期工作。为了使表格适合文本宽度,我建议使用tabular*环境并留给latex它确定\tabcol大小:

\documentclass[jou,apacite]{apa6}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{afterpage}
\usepackage{booktabs, threeparttable}
\usepackage{mathtools, nccmath}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\begin{document}
As usual the text....bla bla bla...

I use a .tex directory to create a table using the following commands:
    \begin{table}[htb]
    \setlength\tabcolsep{0pt}
\begin{threeparttable}
\caption{Tail Dependence.}
\label{Tails}
%\begin{adjustbox}{width=1\textwidth}  % don't use it! it is cause of your troubles ...
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                             *{13}{c}}
    \toprule
\multicolumn{13}{l}{bla bla bla \dots}              \\
    \midrule
bla & bla & bla & bla & bla & bla & bla
    & bla & bla & bla & bla & bla & bla             \\
bla & bla & bla & bla & bla & bla & bla
    & bla & bla & bla & bla & bla & bla\tnote{***}  \\
    \midrule[\heavyrulewidth]
\end{tabular*}
\smallskip
\begin{tablenotes}\footnotesize%\small
\item[***] If $\lambda_{L}$ or $\lambda_{U} \geq \mathit{Pr}[1\%]$,
\item[**]  If $\lambda_{L}$ or $\lambda_{U} \geq \mathit{Pr}[5\%]$.
\end{tablenotes}
%\end{adjustbox}
\end{threeparttable}
    \end{table}
\end{document}

enter image description here (红线表示文字边框)

答案2

来自文档threeparttable

在里面threeparttable应该有一个标题,后面跟着一个 tabular环境(tabulartabular*tabularx类似的),后面可能跟着一系列分项的表格注释。(标题也可以跟在表格环境后面。)

因此,tabular无法隐藏在环境内部adjustbox

相关内容