应用调整框时表格标题和脚注不会横向移动

应用调整框时表格标题和脚注不会横向移动

我有下表,我想将其变成横向表格,但是当我这样做时表格标题不会横向移动,表格脚注也不会“横向移动”。

也就是说,我试图让脚注成为表格脚注,并让表格标题位于表格顶部。

任何帮助,将不胜感激。

\title{Some title}
\documentclass[12pt]{article}
\usepackage{dcolumn}
\usepackage{geometry}
\usepackage{rotating}
\usepackage{longtable}
\usepackage[export]{adjustbox}
\usepackage{changepage}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{float}
\usepackage{mathtools}
\usepackage[round]{natbib}
\usepackage{commath}
\usepackage{makecell}
\usepackage{tablefootnote}

\usepackage{graphicx} %Loading the package
\graphicspath{{graphics/}} %Setting the graphicspath
\begin{document}

\maketitle

\section(Section with table in)

\begin{minipage}{\linewidth}
\small
\captionof{table}{Word2Vec Company Similarities}
\label{tab:Word2Vec_Company_Word_Similarities} 
\begin{center}
\begin{adjustbox}{angle=90}
\begin{tabular}{||c| c c| c c| c c| c c||} 
 \hline
 Word Input & Most Similar & 2006 & Most Similar & 2010 & Most Similar & 2014 & Most Similar & 2018 \\ [0.5ex] 
 \hline\hline
%%%%%%% Row 1 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\


\hline
\end{tabular}
\end{adjustbox}
\end{center}
\end{minipage}


\end{document}

编辑:

\begin{adjustbox}{angle=90}     % Move adjustbox here
\begin{minipage}{\linewidth}
\small
\captionof{table}{Word2Vec Company Similarities}
\label{tab:Word2Vec_Company_Word_Similarities} 
\begin{center}
\begin{tabular}{||c| c c| c c| c c| c c||} 
 \hline
 Word Input & Most Similar & 2006 & Most Similar & 2010 & Most Similar & 2014 & Most Similar & 2018 \\ [0.5ex] 
 \hline\hline
%%%%%%% Row 1 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 2 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 3 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 4 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\



%%%%%%% Row 5 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 6 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 7 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

%%%%%%% Row 8 %%%%%%%%%
text          & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044\footnote{some text here} \\  248}

              & \makecell{text \\  text  \\  text  \\  text  \\  text }
              & \makecell{12 \\  45 \\  54 \\  044 \\  248} \\

\hline
\end{tabular}
\end{center}
\end{minipage}
\end{adjustbox}   % Move adjustbox here

生成:

在此处输入图片描述

答案1

这是更新的 MWE。我建议使用包pdflscape将表格横向翻转。当然,它们会从新页面开始。此外,我建议使用三部分表,因此您可以同时拥有多页表格、表格注释和标题,而不会出现问题。该包使用长桌排版表格。此外,我还使用了书签规则,并通过添加一些空间对行进行分组。正如你所看到的,我已经使用了多行将文本放在第一列的中央,而不是将一行的内容放在 makecell 命令中。

如果您接受表注与普通脚注相冲突,则可以使用 longtable 自己的脚注。它们将排版在页面底部,即右边距,并且不会累积在表格的最后一页。

在此处输入图片描述

\documentclass[12pt]{article}
\usepackage{caption, threeparttablex, booktabs, multirow, pdflscape, longtable}

\begin{document}
\title{Some title}   %% <======== Title here
\maketitle

\section{Section with table in}

Some highflying, not understandable theories here.

\begin{landscape}

\begin{ThreePartTable}
\begin{TableNotes}[flushleft,para]
\item[a] Tablenotes are typeset 
\item[b] at the bottom of the last page of the table.
\item[c] some text here
\item[d] some text here
\item[e] some text here
\item[f] some text here
\end{TableNotes}
\begin{longtable}{@{}l*{4}{cr}@{}} 
\toprule
 Word Input & Most Similar & 2006 & Most Similar & 2010 & Most Similar & 2014 & Most Similar & 2018 \\ [0.5ex] 
 \midrule
\endhead
\midrule
\multicolumn{2}{@{}l}{\textit{continued}}
\endfoot
\bottomrule
\insertTableNotes
\endlastfoot
% the contents of the table
        & text & 12 & text & 12 & text\footnote{Where is my footnote?} & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{a} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\addlinespace
        & text & 12 & text & 12 & text & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text\footnote{In the right margin} & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{b} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\addlinespace
        & text & 12 & text & 12 & text & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{c} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\addlinespace
        & text & 12 & text & 12 & text & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{d} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\addlinespace
        & text & 12 & text & 12 & text & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{e} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\addlinespace
        & text & 12 & text & 12 & text & 12 & text & 12 \\
        & text & 45 & text & 45 & text & 45 & text & 45\\
             & text & 54 & text & 54 & text & 54 & text & 54\\
            & text & 044 & text & 044 & text & 044\tnote{f} & text & 044 \\
\multirow{-5}{*}{text} & text & 248 & text & 248 & text & 248 & text & 248 \\
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\end{document}

相关内容