对于较小的报告,我已将 scrrprt 换成了 scrartcl。使用附录包,标题“附录”在目录中看起来不错(前面没有数字或字母;但是子附录前面应该有一个字母)。但是附录页面上的实际标题大小与章节(而不是节)的标题大小相匹配。我如何才能在节格式中保留“附录”格式(前面没有字母或数字)?
非常感谢!MWE:
\documentclass[12pt,a4paper,headings=standardclasses,numbers=noenddot]{scrartcl}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
\renewcommand\sectionformat
{%
\mbox
{%
\thesection \autodot
\IfUsePrefixLine{}{\enskip $|$\enskip}%
}%
}
\usepackage[ngerman]{datetime}
\usepackage{xpatch}
\xpretocmd\sectionformat
{\def\autodot{.}} % replace \autodot by a fixed dot for chapter headings
{}{\cfPatchFailed} %
\RedeclareSectionCommand[
beforeskip=-2\baselineskip, % line spacing
afterskip=.5\baselineskip,
tocentrynumberformat=\def\autodot{.} % replace \autodot by a fixed dot for chapter entries
]{section}
\KOMAoptions{toc=sectionentrydotfill}
\renewcommand{\contentsname}{Inhaltsverzeichnis}
\usepackage[toc,page]{appendix}
\renewcommand\appendixtocname{Anhang}
\renewcommand\appendixpagename{Anhang}
\begin{document}
\tableofcontents
\setcounter{page}{2}
\pagebreak
\section{example section}
\begin{appendices}
\renewcommand{\thesubsection}{\Alph{subsection}} %A
\subsection{Images}
\end{appendices}
\end{document}
答案1
免责声明:请阅读如何正确设置警报?(德语)
但是这里有一个针对不使用包所期望结果的建议appendix
:
\documentclass[12pt,a4paper,headings=standardclasses,numbers=noenddot]{scrartcl}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}% outdated, successor is datetime2
\renewcommand\sectionformat{\mbox{\thesection.\enskip$|$\enskip}}% <- changed
\usepackage[ngerman]{datetime}
\RedeclareSectionCommand[
beforeskip=2\baselineskip,% changed to a positive value, if afterindent=false is set (needs version 3.26b)
afterindent=false,% < - added, needs version 3.26b
afterskip=.5\baselineskip,
tocentrynumberformat=\def\autodot{.} % replace \autodot by a fixed dot for section entries
]{section}
\KOMAoptions{toc=sectionentrydotfill}
\renewcaptionname{ngerman}{\contentsname}{Inhaltsverzeichnis}
\newcommand*\appendixmore{% see the KOMA-Script documentation
\clearpage
\addsec{\appendixname}%
\renewcommand{\thesubsection}{\Alph{subsection}}%
}
\begin{document}
\tableofcontents
\clearpage
\section{example section}
\appendix
\subsection{Images}
\end{document}
我已经改变了您对的重新定义\sectionformat
:部分从不使用前缀行,并且我已经用 替换\autodot
并.
删除了 的后续补丁\sectionformat
。