我遇到一个问题,当我使用带有某些 -types 和多列的表时,Latex 不会结束处理S
,这不应该发生S
,但是。当我注释掉多列时,Latex 将完成编译。有谁知道问题出在l
哪里以及如何获得多列和?S
\begin{tabular}{lSSSSSSSr}
%Warning if deprecated LaTeX construct is used
\RequirePackage[l2tabu, orthodox]{nag}
%Definition des Dokumentes
\documentclass[12pt,a4paper,twoside,openright]{report}
%Schriftart Arial - ACHTUNG: Compile with XeLaTeX (not PDFLaTeX)!
\usepackage{fontspec}
\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{Arial}[Scale = 1.0]
%Seitenlayout
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} %showframe
%Deutsche Umlaute, Englisch, griechische Symbole
\usepackage[main = ngerman, english]{babel}
\usepackage{textgreek}
%Kopfzeile
\usepackage{fancyhdr}
%Fußzeile
\usepackage[hang, multiple]{footmisc}
%Graphiken und Bilder
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{grffile}
%Tabellenumgebung
\usepackage{tabularx}
\usepackage{booktabs} %\toprule, \midrule, \bottomrule
\usepackage{array}
\usepackage{tabu}
\usepackage{multirow}
%Captions
\usepackage{caption}
\captionsetup[figure]{labelfont=bf, format=hang, font=footnotesize, position=bottom}
\captionsetup[table]{labelfont=bf, format=hang, font=footnotesize, position=top, skip=4pt, singlelinecheck=off}
\usepackage{subcaption}
%Listenumgebung
\usepackage{enumitem}
\setlist{nosep}
%Mathematische Symbole und Zeichen
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[locale = DE, %Komma als Dezimaltrennzeichen, Punkt als Tausendertrennzeichen (automatische Anzeige)
group-minimum-digits = 4, %Komma schon bei 4 Ziffern
group-separator = {.} %Punkt als Tausendertrennzeichen
]{siunitx} %SI-Einheiten
%Algorithm Package - für Code, Pseudocode, Algorithmen
\usepackage[ruled,vlined]{algorithm2e}
%Anführungszeichen
\usepackage[german=quotes]{csquotes}
%Punkte über Buchstaben im Textmode
\usepackage{stackengine}
\newcommand\textdot[1]{\stackon[1pt]{#1}{.}}
%Farben
\usepackage[dvipsnames]{xcolor}
%Links, Bookmarks, Metadata
\usepackage[bookmarks = true,
bookmarksopen = true,
unicode = true,
pdfdisplaydoctitle,
colorlinks = true,
linkcolor = black,
citecolor = black,
urlcolor = black
]{hyperref}
\urlstyle{sf}
%Anhang
\usepackage{appendix}
%To-Do-Listen
\usepackage[textsize=scriptsize, textwidth=22mm, backgroundcolor = Dandelion!80, linecolor=Dandelion, bordercolor=Dandelion]{todonotes}
\setlength{\marginparwidth}{2.4cm}
\setlength{\marginparsep}{1.5mm}
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% Literaturverzeichnis und Zitationen
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%Literaturverzeichnis
\usepackage[style = alphabetic-verb,
backend = biber,
maxbibnames = 2,
minbibnames = 2,
maxalphanames = 1,
minalphanames = 1,
useeditor = false,
giveninits = true
]{biblatex}
%Name, V.
\DeclareNameAlias{default}{family-given}
%Doppelpunkt nach letztem Verfasser
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\addspace}
%Änderungen von Strings
\DefineBibliographyStrings{ngerman}{
andothers = {et\addabbrvspace al\adddot}, %et al.
urlseen = {Abruf\addcolon}, %Anpassung in "Abruf:" bei URLs
references = {Literaturverzeichnis},
bibliography = {Literaturverzeichnis},
mathesis = {Masterarbeit}
}
%Kapitälchen Nachame und Vorname von Autoren in Bibliografie und in Zitationen
\renewcommand*{\mkbibnamefamily}[1]{\ifmknamesc{\textsc{#1}}{#1}}
\renewcommand*{\mkbibnamegiven}[1]{\ifmknamesc{\textsc{#1}}{#1}}
\def\ifmknamesc{\ifboolexpr{ test {\ifcurrentname{author}}}}
\DeclareFieldFormat{labelalpha}{\textsc{#1}}
%Komma bei mehreren Quellen in Zitation
\renewcommand*{\multicitedelim}{\addcomma\space}
%Semikolon bei mehreren Autoren
\AtBeginBibliography{%
\renewcommand*{\multinamedelim}{\addsemicolon\space}%
\renewcommand*{\finalnamedelim}{\addsemicolon\space}%
}
%Formatierung von Regular Database Entry Types
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished,suppbook,suppcollection,suppperiodical]
{title}{\textit{#1\isdot}}
%Formatierung von Zitation bei mehreren Autoren
\renewcommand*{\labelalphaothers}{}
%Formatierung von DIN/ VDI Entries
\DeclareLabelalphaTemplate[dinvdi]{\labelelement{\field{note}}}
\DeclareBibliographyDriver{dinvdi}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\printfield{booktitleaddon}%
\setunit{\addcolon\space}%
\usebibmacro{title}%
\printlist{location}
\setunit{\addcolon\space}
\printlist{organization}
\setunit{\addcomma\space}
\printdate
\usebibmacro{finentry}}
\DeclareFieldFormat
[dinvdi]
{booktitleaddon}{\textsc{#1}}
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% Abstände und Platzierungen
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%Überschriftenanzeige und -platzierung im Text
\usepackage[clearempty]{titlesec}
\titleformat{\chapter}{\normalfont\fontsize{16pt}{0}\bfseries}{\thechapter.}{9pt}{}
\titleformat{\section}{\normalfont\fontsize{14pt}{0}\bfseries}{\thesection}{9pt}{}
\titleformat{\subsection}{\normalfont\fontsize{12pt}{0}\bfseries}{\thesubsection}{9pt}{}
%Abstand zwischen Absätzen
\usepackage[skip=6pt plus 4pt minus 4pt]{parskip}
%Zeilenabstand
\usepackage{leading}
\leading{21pt}
%Abstände Überschriften
\titlespacing*{\chapter}{0pt}{-22pt plus 0.1ex minus 0.1ex}{2pt plus .1ex}
\titlespacing*{\section}{0pt}{30pt plus 0.7ex minus .15ex}{13pt plus .1ex}
\titlespacing*{\subsection}{0pt}{28pt plus 0.7ex minus .15ex}{11pt plus .1ex}
%Formatierung Inhaltsverzeichnis
\usepackage[notindex, nottoc]{tocbibind}
\usepackage{titletoc}
\contentsmargin{2em}
\dottedcontents{chapter}[21pt]{\addvspace{15pt plus .2pt}\bfseries}{20pt}{9.5pt}
\dottedcontents{section}[50pt]{\addvspace{3pt plus .2pt}}{2.3em}{9.5pt}
\dottedcontents{subsection}[89pt]{\addvspace{3pt plus .2pt}}{3.2em}{9.5pt}
%add stretchable glue (Overfull-/ & Underfull-\hbox-Warnings)
\usepackage{microtype}
\emergencystretch=1em
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
%
%
% Anfang von Dokumententext
%
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
\begin{document}
\begin{table}[th]
\caption[Caption]{Caption.} \label{tab:Caption}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{lSSSSSSSr}
\toprule
{} & {Eins} & {Zwei} & {Drei} & {Vier} & {Fünf} & {Sechs} & {Sieben} & {} \\
\midrule
{Energiebedarf} & 100,00 & 200,00 & 200,00 & 200,00 & 100,00 & 100,00 & 200,00 & {} \\[-2.5mm]
{[Einheit]} & {} & {} & {} & {} & {} & {} & {} & {} \\
{Energiebedarf} & 10,00 & 20,00 & 20,00 & 20,00 & 10,00 & 10,00 & 20,00 & {} \\[-2.5mm]
{Jahresmittel} & {} & {} & {} & {} & {} & {} & {} & {} \\[-2.5mm]
{[Einheit]} & {} & {} & {} & {} & {} & {} & {} & {} \\
\midrule
\midrule
{\multicolumn{8}{l}{Summe Energiebedarf pro Jahr [Einheit]}} & {2.000,00} \\
\bottomrule
\end{tabular}}
\end{table}
\end{document}
答案1
{}
通过删除命令周围的集合,可以使文档变得可编译\multicolumn
。