Wenn ich eine \cmidrule hinzufüge, erhalte ich eine ungültige Parameternummer in der Definition.

Wenn ich eine \cmidrule hinzufüge, erhalte ich eine ungültige Parameternummer in der Definition.

Wenn ich einer Tabelle eine \cmidrule hinzufüge und dann versuche, sie in XeLatex neu zu kompilieren, bricht sie ab.

Es endet bei \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.

Ich behebe das Problem, indem ich die .aux-Datei lösche, und es funktioniert wieder, solange ich keine \cmidrule hinzufüge.

Ich bin ein LaTeX-Neuling und bin daher für jede Hilfe dankbar.

Hier hört es auf:

   ...
    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.

Dies ist meine Präambel:

    \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}

Beispieltabelle:

\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}

Antwort1

Ihre Tabelle hat vier Spalten, aber Sie haben angegeben, dass die \cmidruleSpalten 3 bis 8 überspannt werden sollen. Das funktioniert nicht. Ich weiß nicht genau, welche Spalten Sie überspannen wollten, aber es \cmidrule(r){3-4}funktioniert zum Beispiel.

Vielleicht möchten Sie \midruleaber einfach:

Bildbeschreibung hier eingeben

\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}

verwandte Informationen