使用 booktabs 和 \tabular 时,我只在右边缘得到了一条垂直线

使用 booktabs 和 \tabular 时,我只在右边缘得到了一条垂直线

我的表格已填满,所有框也已填满。我在文档的其他地方制作了类似的表格,没有任何问题。(如果你想知道的话,这是我正在制作的人造语言中的动词变位表。)

我的桌子:

\documentclass[12pt, a4paper, draft]{report}
\usepackage{multirow, booktabs} % table packages
\usepackage{graphicx}
\begin{document}
\begin{tabular}{llcccc}
    \toprule
    \textbf{ASPECT} &\textbf{MOOD} &\textbf{A-CLASS} &\textbf{O-CLASS} &\textbf{U-CLASS} &\textbf{I-CLASS} \cr
    \midrule
    \multirow{8}{*}{\textbf{\rotatebox{90}{CONTINUOUS}}} &\textbf{INDICATIVE} &JAL &JOL &JUL &JIL
    \\ &\textbf{SUBJUNCTIVE} &JATAL &JOTOL &JUTUL &JITIL
    \\ &\textbf{OPTATIVE} &JAJA &JOJO &JUJU &JIJI
    \\ &\textbf{IMPERATIVE} &JATAI &JOTOI &JUTE &JITĪ
    \\ &\textbf{JUSSIVE} &JAJAI &JOJOI &JEJU &JIJIA
    \\ &\textbf{INTERROGATIVE} &JANA &JONŌ &JUNŪ &JINĪ
    \\ &\textbf{CONDITIONAL} &JAKA &JOKO &JUKU &JILKI
    \\ &\textbf{CONATIVE} &JAVAL &JOVOL &JUVĒIL &JIVIL 
    \\ &\textbf{JOCATIVE} &JAM &JŌM &JŪM &JĪM
    \\ &\textbf{SARCASTATIVE} &JAN &JON &JŪN &JĪN \cr
    \midrule
    \multirow{8}{*}{\textbf{\rotatebox{90}{PERFECTIVE}}} &\textbf{INDICATIVE} &FĀL &FOL &FEL &LILF
    \\ &\textbf{SUBJUNCTIVE} &FATAL &FOTŌL &FUTEL &FIL
    \\ &\textbf{OPTATIVE} &FĀI &FŌI &FĒ &FĪJĪ
    \\ &\textbf{IMPERATIVE} &FATI &FOTI &FUTI &FI
    \\ &\textbf{JUSSIVE} &FAJI &FOJI &FUJI &FIJ
    \\ &\textbf{INTERROGATIVE} &FANA &FONO &FUNI &FINĪ
    \\ &\textbf{CONDITIONAL} &FĀKA &FŌKO &FŪKŪ &FĪV
    \\ &\textbf{CONATIVE} &FĀVA &FŌVO &FŪVO &FĪV
    \\ &\textbf{JOCATIVE} &FAM &FŌM &FŪM &FĪM
    \\ &\textbf{SARCASTATIVE} &FAN &FON &FŪN &FĪN \cr
    \bottomrule
\end{tabular}
\end{document}

答案1

正如 @JohnKormylo 在评论中已经指出的那样,LaTeX 会在环境的右边缘插入一条粗垂直线(在印刷术术语中称为“slug”),tabular因为(a)draft已设置文档类选项,并且(b)环境的宽度tabular超出了 的值\textwidth

除了重写和简化整个表格之外,在可用空间中获取材料的最佳方法是简化四个数据列的标题。以下是建议的解决方案,将单词“class”放在所有四个数据列中。

在此处输入图片描述

\documentclass[12pt, a4paper, draft]{report}
\usepackage{multirow, booktabs, graphicx}
\begin{document}
\begin{center}
\begin{tabular}{@{}llcccc@{}}
    \toprule
    \textbf{ASPECT} &\textbf{MOOD} 
    &\multicolumn{4}{c@{}}{\textbf{CLASS}}\\
    \cmidrule(l){3-6}
    &&\textbf{A} &\textbf{O} &\textbf{U} &\textbf{I} 
    \\ \midrule
    \multirow{8}{*}{\textbf{\rotatebox{90}{CONTINUOUS}}} 
       &\textbf{INDICATIVE}   &JAL   &JOL &JUL &JIL
    \\ &\textbf{SUBJUNCTIVE}  &JATAL &JOTOL &JUTUL &JITIL
    \\ &\textbf{OPTATIVE}     &JAJA  &JOJO &JUJU &JIJI
    \\ &\textbf{IMPERATIVE}   &JATAI &JOTOI &JUTE &JITĪ
    \\ &\textbf{JUSSIVE}      &JAJAI &JOJOI &JEJU &JIJIA
    \\ &\textbf{INTERROGATIVE}&JANA  &JONŌ &JUNŪ &JINĪ
    \\ &\textbf{CONDITIONAL}  &JAKA  &JOKO &JUKU &JILKI
    \\ &\textbf{CONATIVE}     &JAVAL &JOVOL &JUVĒIL &JIVIL 
    \\ &\textbf{JOCATIVE}     &JAM   &JŌM &JŪM &JĪM
    \\ &\textbf{SARCASTATIVE} &JAN   &JON &JŪN &JĪN 
    \\ \midrule
    \multirow{8}{*}{\textbf{\rotatebox{90}{PERFECTIVE}}} 
       &\textbf{INDICATIVE}   &FĀL   &FOL &FEL &LILF
    \\ &\textbf{SUBJUNCTIVE}  &FATAL &FOTŌL &FUTEL &FIL
    \\ &\textbf{OPTATIVE}     &FĀI   &FŌI &FĒ &FĪJĪ
    \\ &\textbf{IMPERATIVE}   &FATI  &FOTI &FUTI &FI
    \\ &\textbf{JUSSIVE}      &FAJI  &FOJI &FUJI &FIJ
    \\ &\textbf{INTERROGATIVE}&FANA  &FONO &FUNI &FINĪ
    \\ &\textbf{CONDITIONAL}  &FĀKA  &FŌKO &FŪKŪ &FĪV
    \\ &\textbf{CONATIVE}     &FĀVA  &FŌVO &FŪVO &FĪV
    \\ &\textbf{JOCATIVE}     &FAM   &FŌM &FŪM &FĪM
    \\ &\textbf{SARCASTATIVE} &FAN   &FON &FŪN &FĪN 
    \\ \bottomrule
\end{tabular}
\end{center}
\end{document}

答案2

我会重新设计你的表格,就像@Mico 在他的好答案中所做的那样(+1)。使用软件包rotating以及makecell已经使用过的软件包,建议的 MWE 是:

\documentclass[12pt, a4paper, draft]{report}
\usepackage{rotating}
\usepackage{booktabs, makecell, multirow}
\renewcommand\theadfont{\normalsize\bfseries}
\renewcommand\theadgape{}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\begin{center}
\setlength\tabcolsep{0pt}
\settowidth\rotheadsize{\theadfont  CONTINUOUS}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} >{\bfseries}c 
                                                    >{\bfseries}l *{4}{l}
                            }
    \toprule
\multirow{2.4}{*}{ASPECT}  
    &   \multirow{2.4}{*}{MOOD}
        &\multicolumn{4}{c@{}}{\thead{CLASSES}}\\
    \cmidrule(l){3-6}
    &   &   \thead{A} &\thead{O} &\thead{U} &\thead{I}  \\ 
    \midrule
\multirow{10}{*}{\rothead{CONTINUOUS}}
    &INDICATIVE    &JAL   &JOL   &JUL    &JIL   \\ 
    &SUBJUNCTIVE   &JATAL &JOTOL &JUTUL  &JITIL \\ 
    &OPTATIVE      &JAJA  &JOJO  &JUJU   &JIJI  \\ 
    &IMPERATIVE    &JATAI &JOTOI &JUTE   &JITĪ  \\ 
    &JUSSIVE       &JAJAI &JOJOI &JEJU   &JIJIA \\ 
    &INTERROGATIVE &JANA  &JONŌ  &JUNŪ   &JINĪ  \\ 
    &CONDITIONAL   &JAKA  &JOKO  &JUKU   &JILKI \\ 
    &CONATIVE      &JAVAL &JOVOL &JUVĒIL &JIVIL \\ 
    &JOCATIVE      &JAM   &JŌM   &JŪM    &JĪM   \\ 
    &SARCASTATIVE  &JAN   &JON   &JŪN    &JĪN   \\ 
    \midrule
\multirow{10}{*}{\rothead{PERFECTIVE}}
    &INDICATIVE    &FĀL   &FOL   &FEL    &LILF  \\ 
    &SUBJUNCTIVE   &FATAL &FOTŌL &FUTEL  &FIL   \\ 
    &OPTATIVE      &FĀI   &FŌI   &FĒ     &FĪJĪ  \\ 
    &IMPERATIVE    &FATI  &FOTI  &FUTI   &FI    \\ 
    &JUSSIVE       &FAJI  &FOJI  &FUJI   &FIJ   \\ 
    &INTERROGATIVE &FANA  &FONO  &FUNI   &FINĪ  \\ 
    &CONDITIONAL   &FĀKA  &FŌKO  &FŪKŪ   &FĪV   \\ 
    &CONATIVE      &FĀVA  &FŌVO  &FŪVO   &FĪV   \\ 
    &JOCATIVE      &FAM   &FŌM   &FŪM    &FĪM   \\ 
    &SARCASTATIVE  &FAN   &FON   &FŪN    &FĪN   \\ 
    \bottomrule
\end{tabular*}
\end{center}
\end{document}

在此处输入图片描述

(红线表示文本边框)

答案3

减小字体大小以\footnotesize使表格适合页面:

\documentclass[12pt, a4paper, draft]{report}
\usepackage{multirow, booktabs} % table packages
\usepackage{graphicx}
\begin{document}
{
    \scriptsize % just reduce the font size
    \begin{tabular}{llcccc}
        \toprule
        \textbf{ASPECT} &\textbf{MOOD} &\textbf{A-CLASS} &\textbf{O-CLASS} &\textbf{U-CLASS} &\textbf{I-CLASS} \cr
        \midrule
        \multirow{8}{*}{\textbf{\rotatebox{90}{CONTINUOUS}}} &\textbf{INDICATIVE} &JAL &JOL &JUL &JIL
        \\ &\textbf{SUBJUNCTIVE} &JATAL &JOTOL &JUTUL &JITIL
        \\ &\textbf{OPTATIVE} &JAJA &JOJO &JUJU &JIJI
        \\ &\textbf{IMPERATIVE} &JATAI &JOTOI &JUTE &JITĪ
        \\ &\textbf{JUSSIVE} &JAJAI &JOJOI &JEJU &JIJIA
        \\ &\textbf{INTERROGATIVE} &JANA &JONŌ &JUNŪ &JINĪ
        \\ &\textbf{CONDITIONAL} &JAKA &JOKO &JUKU &JILKI
        \\ &\textbf{CONATIVE} &JAVAL &JOVOL &JUVĒIL &JIVIL
        \\ &\textbf{JOCATIVE} &JAM &JŌM &JŪM &JĪM
        \\ &\textbf{SARCASTATIVE} &JAN &JON &JŪN &JĪN \cr
        \midrule
        \multirow{8}{*}{\textbf{\rotatebox{90}{PERFECTIVE}}} &\textbf{INDICATIVE} &FĀL &FOL &FEL &LILF
        \\ &\textbf{SUBJUNCTIVE} &FATAL &FOTŌL &FUTEL &FIL
        \\ &\textbf{OPTATIVE} &FĀI &FŌI &FĒ &FĪJĪ
        \\ &\textbf{IMPERATIVE} &FATI &FOTI &FUTI &FI
        \\ &\textbf{JUSSIVE} &FAJI &FOJI &FUJI &FIJ
        \\ &\textbf{INTERROGATIVE} &FANA &FONO &FUNI &FINĪ
        \\ &\textbf{CONDITIONAL} &FĀKA &FŌKO &FŪKŪ &FĪV
        \\ &\textbf{CONATIVE} &FĀVA &FŌVO &FŪVO &FĪV
        \\ &\textbf{JOCATIVE} &FAM &FŌM &FŪM &FĪM
        \\ &\textbf{SARCASTATIVE} &FAN &FON &FŪN &FĪN \cr
        \bottomrule
    \end{tabular}
}
\end{document}

在此处输入图片描述

相关内容