当我将 \cmidrule 添加到表中,然后尝试在 XeLatex 中重新编译时,它会中断。
它停止在 \begin{document} 处:
File ended while scanning definition of \LT@xxxix. \begin{document}
Illegal parameter number in definition of \LT@xxxix. \begin{document}
Illegal parameter number in definition of \LT@xxxix. \begin{document}
File ended while scanning definition of \LT@xxxix.
我通过删除 .aux 文件来修复它,只要我不添加 \cmidrule,它就可以再次工作。
我对 LaTeX 还很陌生,所以任何帮助我都会很感激。
事情就到此结束了:
...
Chapter 7.
! Extra alignment tab has been changed to \cr.
<template> \endtemplate
l.1204 ^^I\cmidrule(r){3-8}
?
Underfull \vbox (badness 10000) has occurred while \output is active [29]
[30]
Appendix A.
这是我的序言:
\documentclass{book}
\usepackage[letterpaper,inner=0.75in,outer=1in]{geometry}
\usepackage{color}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{longtable,booktabs}
\usepackage{multirow}
\usepackage{parskip} %removes firstline indent
\usepackage{makeidx}
\usepackage{titling}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
表格示例:
\begin{longtable}[]{@{}llll@{}}
\toprule
centeral & personal & &\tabularnewline
\cmidrule(r){3-8}
\endhead
& reflexive & &\tabularnewline
& possessive & &\tabularnewline
reciprocal & each other, one another & &\tabularnewline
relative & & &\tabularnewline
interrogative & & &\tabularnewline
demonstrative & this, that, these, those & &\tabularnewline
Indefinite & positive & universal & All, both\tabularnewline
& & & Each, every\tabularnewline
& & assertive & some\tabularnewline
& & & Multal, paucal\tabularnewline
& & & One\tabularnewline
& & & Half, several, enough\tabularnewline
& & & Other, another\tabularnewline
& & nonassertive & Any, either\tabularnewline
& negative & & No, neither\tabularnewline
\bottomrule
\end{longtable}
答案1
您的表格有四列,但您要求\cmidrule
跨越第 3 列至第 8 列。这不起作用。我不知道您到底想让它跨越哪些列,但\cmidrule(r){3-4}
例如可以。
你可能想要的\midrule
是:
\documentclass{book}
\usepackage[letterpaper,inner=0.75in,outer=1in]{geometry}
\usepackage{longtable,booktabs}
\begin{document}
\begin{longtable}[]{@{}llll@{}}
\toprule
centeral & personal & &\tabularnewline
\midrule
\endhead
& reflexive & &\tabularnewline
& possessive & &\tabularnewline
reciprocal & each other, one another & &\tabularnewline
relative & & &\tabularnewline
interrogative & & &\tabularnewline
demonstrative & this, that, these, those & &\tabularnewline
Indefinite & positive & universal & All, both\tabularnewline
& & & Each, every\tabularnewline
& & assertive & some\tabularnewline
& & & Multal, paucal\tabularnewline
& & & One\tabularnewline
& & & Half, several, enough\tabularnewline
& & & Other, another\tabularnewline
& & nonassertive & Any, either\tabularnewline
& negative & & No, neither\tabularnewline
\bottomrule
\end{longtable}
\end{document}