| 1 |
% ====================================================================== |
| 2 |
% scrbookreportarticle-en.tex |
| 3 |
% Copyright (c) Markus Kohm, 2001-2025 |
| 4 |
% |
| 5 |
% This file is part of the LaTeX2e KOMA-Script bundle. |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the conditions of |
| 8 |
% the LaTeX Project Public License, version 1.3c of the license. |
| 9 |
% The latest version of this license is in |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 12 |
% version 2005/12/01 or later and of this work. |
| 13 |
% |
| 14 |
% This work has the LPPL maintenance status "author-maintained". |
| 15 |
% |
| 16 |
% The Current Maintainer and author of this work is Markus Kohm. |
| 17 |
% |
| 18 |
% This work consists of all files listed in MANIFEST.md. |
| 19 |
% ====================================================================== |
| 20 |
% |
| 21 |
% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide |
| 22 |
% Maintained by Markus Kohm |
| 23 |
% |
| 24 |
% ============================================================================ |
| 25 |
|
| 26 |
\KOMAProvidesFile{scrbookreportarticle-en.tex} |
| 27 |
[$Date: 2025-11-26 08:49:14 +0100 (Mi, 26 Nov 2025) $ |
| 28 |
KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] |
| 29 |
|
| 30 |
\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and |
| 31 |
Krickette Murabayashi\and Jana Schubert\and Jens Hühne\and Karl Hagen} |
| 32 |
|
| 33 |
\chapter{The Main Classes: \Class{scrbook}, \Class{scrreprt}, and |
| 34 |
\Class{scrartcl}} |
| 35 |
\labelbase{maincls}% |
| 36 |
\BeginIndexGroup |
| 37 |
\BeginIndex{Class}{scrbook}% |
| 38 |
\BeginIndex{Class}{scrreprt}% |
| 39 |
\BeginIndex{Class}{scrartcl}% |
| 40 |
|
| 41 |
\AddSeeIndex{instruction}{gen}{\GuidecmdIndexShort}{cmd}% |
| 42 |
\AddSeeIndex{macro}{gen}{\GuidecmdIndexShort}{cmd}% |
| 43 |
The main classes of the {\KOMAScript} bundle are designed as counterparts to |
| 44 |
the standard {\LaTeX} classes. This means that the {\KOMAScript} bundle |
| 45 |
contains replacements for the three standard classes, |
| 46 |
\Class{book}\IndexClass{book}, \Class{report}\IndexClass{report}, and |
| 47 |
\Class{article}\IndexClass{article}. There is also a replacement for the |
| 48 |
standard \Class{letter}\IndexClass{letter} class. The document class for |
| 49 |
letters is described in a separate chapter because it is fundamentally |
| 50 |
different from the three main classes (see \autoref{cha:scrlttr2}). |
| 51 |
|
| 52 |
The simplest way to use a {\KOMAScript} class instead of a standard one is to |
| 53 |
substitute the class name in the \verb|\documentclass| command in accordance |
| 54 |
with \autoref{tab:\LabelBase.overview}. For example, you can replace |
| 55 |
\Macro{documentclass}\PParameter{book} with |
| 56 |
\Macro{documentclass}\PParameter{scrbook}. Normally, {\LaTeX} should process |
| 57 |
the document without errors, just as before the substitution. The layout, |
| 58 |
however, should be different. Additionally, the {\KOMAScript} classes provide |
| 59 |
new possibilities and options that are described in the following sections. |
| 60 |
|
| 61 |
\begin{table} |
| 62 |
% \centering |
| 63 |
\KOMAoptions{captions=topbeside}% |
| 64 |
\setcapindent{0pt}% |
| 65 |
% \caption |
| 66 |
\begin{captionbeside} |
| 67 |
[Class correspondence]{\label{tab:\LabelBase.overview}Correspondence between |
| 68 |
standard classes and {\KOMAScript} classes} |
| 69 |
[l] |
| 70 |
\begin{tabular}[t]{ll} |
| 71 |
\toprule |
| 72 |
standard class & \KOMAScript{} class \\%& \Script-Stil (\LaTeX2.09)\\ |
| 73 |
\midrule |
| 74 |
\Class{article} & \Class{scrartcl} \\%& \File{script\textunderscore s} \\ |
| 75 |
\Class{report} & \Class{scrreprt} \\%& \File{script} \\ |
| 76 |
\Class{book} & \Class{scrbook} \\%& \File{script} \\ |
| 77 |
\Class{letter} & \Class{scrlttr2} \\%& \File{script\textunderscore l} \\ |
| 78 |
\bottomrule |
| 79 |
\end{tabular} |
| 80 |
\end{captionbeside} |
| 81 |
\end{table} |
| 82 |
|
| 83 |
% TODO: Fix translation |
| 84 |
However, it should be noted here that some package authors develop their |
| 85 |
packages based on the implementation and even internal code of the standard |
| 86 |
classes, without regard to completely independent developments like the |
| 87 |
\KOMAScript{} classes. In such cases, the first \LaTeX{} run after the change |
| 88 |
may well result in error messages or additional warnings. These can usually be |
| 89 |
corrected in a simple way. Often the extended capabilities of \KOMAScript{} |
| 90 |
can be used for this purpose, which completely eliminates the problematic |
| 91 |
package. Sometimes the package |
| 92 |
\href{https://www.ctan.org/pkg/scrhack}{\Package{scrhack}} documented in |
| 93 |
\cite{pkg:scrhack:manual} can also help. Replacing obsolete packages with |
| 94 |
current successors can also help to eliminate such problems. Sometimes even |
| 95 |
the \KOMAScript{} classes provide warnings to help solve incompatibilities. |
| 96 |
% :ODOT |
| 97 |
|
| 98 |
Let me say something before describing the classes. When beginning to write a |
| 99 |
document, you are often unsure which specific options to choose. Some |
| 100 |
settings, for instance the choice of paper size, may be fixed in advance. But |
| 101 |
even the question of the appropriate page layout could be difficult to answer |
| 102 |
initially. On the other hand, these settings should be nearly irrelevant, in |
| 103 |
the beginning, to the main business of an author: planning the document |
| 104 |
structure, writing the text, preparing figures, tables, lists, index, and |
| 105 |
other data. As an author, you should concentrate initially on the content. |
| 106 |
When that is done, you can take on the fine points of presentation. In |
| 107 |
addition to the choice of options, this includes correcting hyphenation, |
| 108 |
optimizing page breaks, and placing tables and figures. |
| 109 |
|
| 110 |
|
| 111 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 112 |
|
| 113 |
\LoadCommonFile{options}% \section{Early or Late Selection of Options} |
| 114 |
|
| 115 |
\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of KOMA-Script} |
| 116 |
|
| 117 |
\LoadCommonFile{draftmode}% \section{Draft Mode} |
| 118 |
|
| 119 |
\LoadCommonFile{typearea}% \section{Page Layout} |
| 120 |
|
| 121 |
\begin{Declaration} |
| 122 |
\Macro{flushbottom} |
| 123 |
\Macro{raggedbottom} |
| 124 |
\end{Declaration} |
| 125 |
\begin{Explain} |
| 126 |
In two-sided documents especially, it is preferable to have the same visual |
| 127 |
baseline not only for the first lines of each text area in a two-page spread |
| 128 |
but also for the last lines. If a page consists only of text without |
| 129 |
paragraphs or headings, this is generally the result. But a paragraph |
| 130 |
spacing of half a line would be enough to prevent you from achieving this |
| 131 |
goal if the number of paragraphs on each page of the two-page spread differs |
| 132 |
by an odd number. In this case, at least some of the paragraph distances |
| 133 |
need to be stretched or shrunk to reach the target again. \TeX{} defines |
| 134 |
stretchable and shrinkable distances for this purpose, and \LaTeX{} lets you |
| 135 |
perform this kind of \emph{vertical adjustment}\Index{adjustment} |
| 136 |
automatically. |
| 137 |
\end{Explain} |
| 138 |
|
| 139 |
Using two-sided printing with the |
| 140 |
\Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} option (see |
| 141 |
\autoref{sec:typearea.options}, \DescPageRef{typearea.option.twoside}) or |
| 142 |
two-column formatting with the |
| 143 |
\Option{twocolumn}\IndexOption{twocolumn}\important{\Option{twocolumn}} option |
| 144 |
(see \DescPageRef{typearea.option.twocolumn}) also activates this vertical |
| 145 |
adjustment. But\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and |
| 146 |
\Class{scrartcl}} this does not apply with a compatibility setting for a |
| 147 |
\KOMAScript{} version prior to 3.17 (see |
| 148 |
\autoref{sec:\LabelBase.compatibilityOptions}, |
| 149 |
\DescPageRef{\LabelBase.option.version}, option |
| 150 |
\DescRef{\LabelBase.option.version}\IndexOption{version}% |
| 151 |
\important{\OptionValueRef{\LabelBase}{version}{3.17}}) if you use |
| 152 |
\DescRef{\LabelBase.cmd.KOMAoption} or \DescRef{\LabelBase.cmd.KOMAoptions} to |
| 153 |
change the setting of these options. |
| 154 |
|
| 155 |
You can also explicitly request vertical adjustment at any time starting with |
| 156 |
the current page by using \Macro{flushbottom}. \Macro{raggedbottom} has the |
| 157 |
opposite effect, switching off vertical adjustment starting with the current |
| 158 |
page. This corresponds to the default for one-sided printing. |
| 159 |
|
| 160 |
By the way, \KOMAScript{} uses a slightly modified method for adjusting the |
| 161 |
vertical skip. This has been done to move footnotes to the bottom of the |
| 162 |
text area instead of having them close to the last text line used. |
| 163 |
\iffree{}{ |
| 164 |
You can find more information about this at |
| 165 |
\autoref{sec:maincls-experts.addInfos}, |
| 166 |
\DescPageRef{maincls-experts.cmd.footnoterule}.}% |
| 167 |
% |
| 168 |
\EndIndexGroup |
| 169 |
% |
| 170 |
\EndIndexGroup |
| 171 |
|
| 172 |
|
| 173 |
\LoadCommonFile{fontsize}% \section{Choosing the Document Font Size} |
| 174 |
|
| 175 |
\LoadCommonFile{textmarkup}% \section{Text Markup} |
| 176 |
|
| 177 |
\LoadCommonFile{titles}% \section{Document Titles} |
| 178 |
|
| 179 |
\section{Abstract} |
| 180 |
\seclabel{abstract} |
| 181 |
\BeginIndexGroup |
| 182 |
\BeginIndex{}{abstract}% |
| 183 |
|
| 184 |
Particularly with articles, more rarely with reports, there is an abstract, or |
| 185 |
summary, directly beneath the title and before the table of contents. When |
| 186 |
using an in-page title, this abstract is normally a kind of left- and |
| 187 |
right-indented block. In comparison, the abstract appears as a chapter or |
| 188 |
section when using title pages. |
| 189 |
|
| 190 |
\begin{Declaration} |
| 191 |
\OptionVName{abstract}{simple switch} |
| 192 |
\end{Declaration}% |
| 193 |
In\OnlyAt{\Class{scrreprt}\and\Class{scrartcl}} the standard |
| 194 |
classes\textnote{\KOMAScript{} vs. standard classes}, the |
| 195 |
\DescRef{\LabelBase.env.abstract} environment sets the text ``\abstractname'' |
| 196 |
centred before the abstract text. This used to be the normal practice. Since |
| 197 |
then, reading newspapers has trained us to recognize a suitably highlighted |
| 198 |
text at the beginning of an article or report as the abstract. This is even |
| 199 |
more true when the text comes before the table of contents. It is also |
| 200 |
confusing if, of all things, this title appears small and centred. |
| 201 |
{\KOMAScript}\ChangedAt{v3.00}{\Class{scrreprt}\and \Class{scrartcl}} offers |
| 202 |
the option to include or exclude the abstract's title with the |
| 203 |
\Option{abstract} option. For \PName{simple switch}, you can use any value |
| 204 |
from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The |
| 205 |
default for \KOMAScript{} is \PValue{false}. |
| 206 |
|
| 207 |
Books typically use a different kind of summary. There, you usually place an |
| 208 |
appropriate chapter at the beginning or the end of the work. This chapter is |
| 209 |
often combined with either the introduction or a description of a larger |
| 210 |
prospectus. Therefore, the \Class{scrbook} class has no |
| 211 |
\DescRef{\LabelBase.env.abstract} environment. A\textnote{Hint!} summary |
| 212 |
chapter is also recommended for reports in a wider sense, such as a Master's |
| 213 |
thesis or Ph.D. dissertation. See the commands |
| 214 |
\DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*}, |
| 215 |
\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, and |
| 216 |
\DescRef{\LabelBase.cmd.addchap*}\IndexCmd{addchap*} documented in |
| 217 |
\autoref{sec:maincls.structure}, from \DescPageRef{\LabelBase.cmd.chapter*}.% |
| 218 |
\EndIndexGroup |
| 219 |
|
| 220 |
|
| 221 |
\begin{Declaration} |
| 222 |
\begin{Environment}{abstract}\end{Environment} |
| 223 |
\end{Declaration}% |
| 224 |
\OnlyAt{\Class{scrartcl}\and \Class{scrreprt}}% |
| 225 |
Some {\LaTeX} classes provide a special environment for this summary: the |
| 226 |
\Environment{abstract} environment. This is output directly, so it is not part |
| 227 |
of the title created with \DescRef{\LabelBase.cmd.maketitle}. |
| 228 |
Please\textnote{Attention!} note that \Environment{abstract} is an |
| 229 |
environment, not a command. Whether the abstract has a heading or not is |
| 230 |
determined by the \DescRef{\LabelBase.option.abstract} option (see above). |
| 231 |
|
| 232 |
For books, the abstract is usually part of the introduction or a separate |
| 233 |
chapter at the end of the document. Therefore \Class{scrbook} does not provide |
| 234 |
an \Environment{abstract} environment. When using the \Class{scrreprt} class, |
| 235 |
it is definitely worth considering whether to proceed in the same way. See the |
| 236 |
commands \DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*} and |
| 237 |
\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, or |
| 238 |
\DescRef{\LabelBase.cmd.addchap*} in \autoref{sec:\LabelBase.structure} |
| 239 |
from \DescPageRef{\LabelBase.cmd.chapter*} for more on this. |
| 240 |
|
| 241 |
When using an in-page title\Index{title>in-page} (see option |
| 242 |
\DescRef{\LabelBase.option.titlepage}, \autoref{sec:\LabelBase.titlepage}, |
| 243 |
\DescPageRef{\LabelBase.option.titlepage}), the abstract is set internally |
| 244 |
using the \DescRef{\LabelBase.env.quotation}\IndexEnv{quotation} environment |
| 245 |
(see \autoref{sec:\LabelBase.lists}, \DescPageRef{\LabelBase.env.quotation}). |
| 246 |
This way paragraphs will be set with the first line indented. If the first |
| 247 |
paragraph of the abstract should not be indented, you can suppress this indent |
| 248 |
by using \Macro{noindent}\IndexCmd{noindent}% |
| 249 |
\important{\Macro{noindent}} \iffree{just after |
| 250 |
\Macro{begin}\PParameter{abstract}}{at the beginning of the environment}.% |
| 251 |
% |
| 252 |
\EndIndexGroup |
| 253 |
% |
| 254 |
\EndIndexGroup |
| 255 |
|
| 256 |
|
| 257 |
\section{Table of Contents} |
| 258 |
\seclabel{toc} |
| 259 |
\BeginIndexGroup |
| 260 |
\BeginIndex{}{table of contents} |
| 261 |
|
| 262 |
The title and optional abstract are normally followed by a table of contents. |
| 263 |
Often you also find additional lists of the floating environments, such as |
| 264 |
tables and figures, after the table of contents (see |
| 265 |
\autoref{sec:\LabelBase.floats}). |
| 266 |
|
| 267 |
\iffalse% |
| 268 |
Note that in addition to the options documented in this section, the |
| 269 |
commands \DescRef{maincls-experts.cmd.DeclareSectionCommand}, |
| 270 |
\DescRef{maincls-experts.cmd.DeclareNewSectionCommand}, |
| 271 |
\DescRef{maincls-experts.cmd.RedeclareSectionCommand}, and |
| 272 |
\DescRef{maincls-experts.cmd.ProvideSectionCommand} can also affect the |
| 273 |
table of contents. See \autoref{sec:maincls-experts.sections}, |
| 274 |
\DescPageRef{maincls-experts.cmd.DeclareSectionCommand}.% |
| 275 |
\else% |
| 276 |
In addition to the options documented in this section, the |
| 277 |
\hyperref[cha:tocbasic]{\Package{tocbasic}}% |
| 278 |
\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}% |
| 279 |
\IndexPackage{tocbasic} package style selected and configured with |
| 280 |
\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry}% |
| 281 |
\important[O]{\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}} (see |
| 282 |
\DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) also has a significant |
| 283 |
impact on the appearance of the table of contents. Similarly, the commands |
| 284 |
\DescRef{maincls-experts.cmd.DeclareSectionCommand}% |
| 285 |
\important[O]{\DescRef{maincls-experts.cmd.DeclareSectionCommand}}% |
| 286 |
\IndexCmd{DeclareSectionCommand}, |
| 287 |
\DescRef{maincls-experts.cmd.ProvideSectionCommand}% |
| 288 |
\IndexCmd{ProvideSectionCommand}, |
| 289 |
\DescRef{maincls-experts.cmd.DeclareNewSectionCommand}% |
| 290 |
\IndexCmd{DeclareNewSectionCommand} and |
| 291 |
\DescRef{maincls-experts.cmd.RedeclareSectionCommand}% |
| 292 |
\IndexCmd{RedeclareSectionCommand} documented in |
| 293 |
\autoref{sec:maincls-experts.sections}, |
| 294 |
\DescPageRef{maincls-experts.cmd.DeclareSectionCommand} can also affect the |
| 295 |
table of contents.% |
| 296 |
\fi |
| 297 |
|
| 298 |
|
| 299 |
\begin{Declaration} |
| 300 |
\OptionVName{toc}{setting} |
| 301 |
\end{Declaration} |
| 302 |
It is becoming increasingly common to include lists of tables and figures, |
| 303 |
the bibliography, and sometimes even the index in the table of contents. This |
| 304 |
is surely related to the recent trend of putting lists of figures and tables |
| 305 |
at the end of the document. Both lists are similar to the table of contents in |
| 306 |
structure and intention. I'm therefore sceptical of this evolution. |
| 307 |
Since\important{\OptionValue{toc}{listof}} it makes no sense to include only |
| 308 |
the list of tables or that of figures in the table of contents without the |
| 309 |
other, there is only one \PName{setting}\ChangedAt{v3.00}{\Class{scrbook}\and |
| 310 |
\Class{scrreprt}\and \Class{scrartcl}} |
| 311 |
\PValue{listof}\IndexOption{toc~=\textKValue{listof}}, which causes entries |
| 312 |
for both types of lists to be included. This also includes any lists produced |
| 313 |
with version~1.2e or later of the \Package{float} package\IndexPackage{float} |
| 314 |
from Version~1.2e (see \cite{package:float}) or \Package{floatrow} (see |
| 315 |
\cite{package:floatrow}). None\important{\OptionValue{toc}{listofnumbered}} |
| 316 |
of these lists are generally given a chapter number. If you want to ignore |
| 317 |
this principle, use the \PName{setting} |
| 318 |
\PValue{listofnumbered}\IndexOption{toc~=\textKValue{listofnumbered}}. |
| 319 |
|
| 320 |
\leavevmode\LabelOptionValue{toc}{index}\nobreak |
| 321 |
The\important{\OptionValue{toc}{index}} |
| 322 |
\OptionValue{toc}{index}\IndexOption{toc~=\textKValue{index}} option causes an |
| 323 |
entry for the index to be included in the table of contents. The index is |
| 324 |
unnumbered since it too only includes references to the contents of the other |
| 325 |
sectioning levels. Despite\ChangedAt{v3.18}{\Class{scrbook}\and |
| 326 |
\Class{scrreprt}\and \Class{scrartcl}} |
| 327 |
\important{\OptionValue{toc}{indexnumbered}} the author's concerns, |
| 328 |
\KOMAScript{} does support deviating from this principle with |
| 329 |
\OptionValue{toc}{indexnumbered}\IndexOption{toc~=\textKValue{indexnumbered}}. |
| 330 |
|
| 331 |
\leavevmode\LabelOptionValue{toc}{bibliography}\nobreak The bibliography is a |
| 332 |
slightly different kind of listing. It does not list the contents of the |
| 333 |
present document but refers instead to external sources. |
| 334 |
For\important{\OptionValue{toc}{bibliographynumbered}} that reason, it could |
| 335 |
be argued that it qualifies as a chapter (or section) and, as such, should be |
| 336 |
numbered. The \OptionValue{toc}{bibliographynumbered}% |
| 337 |
\IndexOption{toc~=\textKValue{bibliographynumbered}} option has this effect, |
| 338 |
and puts the appropriate entry in the table of contents. However, I think that |
| 339 |
this reasoning would lead us to consider even a classic, annotated source list |
| 340 |
to be a separate chapter. Moreover, the bibliography is ultimately not |
| 341 |
something that you wrote yourself. |
| 342 |
Therefore\important{\OptionValue{toc}{bibliography}} the bibliography merits, |
| 343 |
at best, an unnumbered entry in the table of contents, and you can achieve |
| 344 |
this achieved with |
| 345 |
\OptionValue{toc}{bibliography}\IndexOption{toc~=\textKValue{bibliography}}. |
| 346 |
|
| 347 |
\leavevmode\LabelOptionValue{toc}{graduated}\nobreak |
| 348 |
The table of contents is normally\ChangedAt{v2.8q}{% |
| 349 |
\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% |
| 350 |
\important{\OptionValue{toc}{graduated}} formatted so that different levels of |
| 351 |
sectioning commands have different indentations. The number for each level is |
| 352 |
set left-justified in a fixed-width field. This default set-up is selected |
| 353 |
with the\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 354 |
\Class{scrartcl}} |
| 355 |
\OptionValue{toc}{graduated}\IndexOption{toc~=\textKValue{graduated}} option. |
| 356 |
|
| 357 |
\leavevmode\LabelOptionValue{toc}{flat}\nobreak |
| 358 |
If the sectioning level which appears in the table of contents is too deep, the |
| 359 |
number for that level can be so wide that the space reserved for the number is |
| 360 |
insufficient. The German FAQ \cite{DANTE:FAQ} suggests redefining the table of |
| 361 |
contents in such a case. \KOMAScript{}\important{\OptionValue{toc}{flat}} |
| 362 |
offers an alternative format that avoids the problem completely. If you use |
| 363 |
the \OptionValue{toc}{flat}\IndexOption{toc~=\textKValue{flat}} option, no |
| 364 |
graduated indentation is applied to the headings of the sectioning levels. |
| 365 |
Instead, a table-like organisation is used, where all sectioning numbers and |
| 366 |
headings are set in a left-justified column. The space necessary for the |
| 367 |
section numbers is thus determined automatically. |
| 368 |
|
| 369 |
You can find an overview of all available values for the \PName{setting} of |
| 370 |
\Option{toc}. in \autoref{tab:\LabelBase.toc}. |
| 371 |
|
| 372 |
\begin{desclist} |
| 373 |
\desccaption[{Available values for the \Option{toc} option}]{% |
| 374 |
Available values for the \Option{toc} option to set the format and contents |
| 375 |
of the table of contents\label{tab:\LabelBase.toc}% |
| 376 |
}{% |
| 377 |
Available values for the \Option{toc} option (\emph{continued})% |
| 378 |
}% |
| 379 |
\entry{\PValue{bibliography}, \PValue{bib}}{% |
| 380 |
The bibliography has an unnumbered entry in the table of contents.% |
| 381 |
\IndexOption{toc~=\textKValue{bibliography}}}% |
| 382 |
\entry{\PValue{bibliographynumbered}, \PValue{bibnumbered}, |
| 383 |
\PValue{numberedbibliography}, \PValue{numberedbib}}{% |
| 384 |
The bibliography has a numbered entry in the table of contents.% |
| 385 |
\IndexOption{toc~=\textKValue{bibliographynumbered}}}% |
| 386 |
\entry{\PValue{chapterentrywithdots}, \PValue{chapterentrydotfill}}{% |
| 387 |
\ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% |
| 388 |
The chapter entries for the \Class{scrbook} and \Class{scrreprt} classes |
| 389 |
also use dots to separate the heading text from the page numbers.% |
| 390 |
\IndexOption{toc~=\textKValue{chapterentrywithdots}}}% |
| 391 |
\entry{\PValue{chapterentrywithoutdots}, \PValue{chapterentryfill}}{% |
| 392 |
\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% |
| 393 |
The chapter entries of the \Class{scrbook} and \Class{scrreprt} classes |
| 394 |
use white space to separate the heading text from the page numbers. This |
| 395 |
corresponds to the default setting.% |
| 396 |
\IndexOption{toc~=\textKValue{chapterentrywithoutdots}}}% |
| 397 |
\entry{\PValue{flat}, \PValue{left}}{% |
| 398 |
The table of contents is set in table form. The numbers of the headings |
| 399 |
are in the first column, the heading text in the second column, and the |
| 400 |
page number in the third column. The amount of space needed for the |
| 401 |
numbers of the headings is determined by the required amount of space |
| 402 |
detected during the previous \LaTeX{} run.% |
| 403 |
\IndexOption{toc~=\textKValue{flat}}}% |
| 404 |
\entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% |
| 405 |
The table of contents is set in hierarchical form. The amount of space for |
| 406 |
the heading numbers is limited. This corresponds to the default setting.% |
| 407 |
\IndexOption{toc~=\textKValue{graduated}}}% |
| 408 |
\entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, |
| 409 |
\PValue{numberline}}{% |
| 410 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 411 |
\Class{scrartcl}}% |
| 412 |
The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, |
| 413 |
\DescPageRef{tocbasic.cmd.setuptoc}) is set for the table of contents. As |
| 414 |
a result, unnumbered entries are left aligned with the text of numbered |
| 415 |
entries of the same level.% |
| 416 |
\IndexOption{toc~=\textKValue{numberline}}}% |
| 417 |
\entry{\PValue{index}, \PValue{idx}}{% |
| 418 |
The index has an unnumbered entry in the table of contents.% |
| 419 |
\IndexOption{toc~=\textKValue{index}}}% |
| 420 |
\entry{\PValue{indexnumbered}, \PValue{idxnumbered}, \PValue{numberedindex}, |
| 421 |
\PValue{numberedidx}}{% |
| 422 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 423 |
\Class{scrartcl}}% |
| 424 |
The index has a numbered entry in the table of contents.% |
| 425 |
\IndexOption{toc~=\textKValue{index}}}% |
| 426 |
\entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, |
| 427 |
\PValue{nonumberline}}{% |
| 428 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 429 |
\Class{scrartcl}}% |
| 430 |
The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, |
| 431 |
\DescPageRef{tocbasic.cmd.setuptoc}) is deleted for the table of contents. |
| 432 |
This places unnumbered entries left-aligned with the number of |
| 433 |
numbered entries of the same level. This corresponds to the default |
| 434 |
setting.% |
| 435 |
\IndexOption{toc~=\textKValue{numberline}}}% |
| 436 |
\pventry{listof}{% |
| 437 |
The lists of floating environments, e.\,g. figures and tables, have |
| 438 |
unnumbered entries in the table of contents.% |
| 439 |
\IndexOption{toc~=\textKValue{listof}}}% |
| 440 |
\entry{\PValue{listofnumbered}, \PValue{numberedlistof}}{% |
| 441 |
The lists of floating environments, e.\,g. figures and tables, have |
| 442 |
numbered entries in the table of contents.% |
| 443 |
\IndexOption{toc~=\textKValue{listofnumbered}}}% |
| 444 |
\entry{\PValue{nobibliography}, \PValue{nobib}}{% |
| 445 |
The bibliography does not have an entry in the table of contents. This |
| 446 |
corresponds to the default setting.% |
| 447 |
\IndexOption{toc~=\textKValue{nobibliography}}}% |
| 448 |
\entry{\PValue{noindex}, \PValue{noidx}}{% |
| 449 |
The index does not have an entry in the table of contents. This |
| 450 |
corresponds to the default setting.% |
| 451 |
\IndexOption{toc~=\textKValue{noindex}}}% |
| 452 |
\pventry{nolistof}{% |
| 453 |
The lists of floating environments, e.\,g. figures and tables, do not |
| 454 |
have entries in the table of contents. This corresponds to the default |
| 455 |
setting.% |
| 456 |
\IndexOption{toc~=\textKValue{nolistof}}}% |
| 457 |
\entry{\PValue{sectionentrywithdots}, \PValue{sectionentrydotfill}}{% |
| 458 |
\ChangedAt[2014/12]{v3.15}{\Class{scrartcl}}% |
| 459 |
The section entries of the \Class{scrartcl} class also use dots to |
| 460 |
separate the heading text from the page numbers.% |
| 461 |
\IndexOption{toc~=\textKValue{sectionentrywithdots}}}% |
| 462 |
\entry{\PValue{sectionentrywithoutdots}, \PValue{sectionentryfill}}{% |
| 463 |
\ChangedAt{v3.15}{\Class{scrartcl}}% |
| 464 |
The section entries of the \Class{scrartcl} class use white space to |
| 465 |
separate the heading text from the page number. This corresponds to the |
| 466 |
default setting.% |
| 467 |
\IndexOption{toc~=\textKValue{sectionentrywithoutdots}}}% |
| 468 |
\end{desclist} |
| 469 |
% |
| 470 |
\EndIndexGroup |
| 471 |
|
| 472 |
|
| 473 |
\begin{Declaration} |
| 474 |
\OptionVName{chapterentrydots}{simple switch}\\ |
| 475 |
\OptionVName{sectionentrydots}{simple switch} |
| 476 |
\end{Declaration} |
| 477 |
These\ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}} options |
| 478 |
configure a dotted connecting line between the text and page number of the |
| 479 |
chapter entries for the \Class{scrbook} and |
| 480 |
\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} classes, or for |
| 481 |
the section entries of the \Class{scrartcl}\OnlyAt{\Class{scrartcl}} class, in |
| 482 |
the table of contents. For the \PName{simple switch}, you can use any value from |
| 483 |
\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. |
| 484 |
The default is \PValue{false}. It selects an empty gap instead of dots. |
| 485 |
|
| 486 |
\BeginIndex{FontElement}{chapterentrydots}\LabelFontElement{chapterentrydots}% |
| 487 |
\BeginIndex{FontElement}{sectionentrydots}\LabelFontElement{sectionentrydots}% |
| 488 |
If a dotted line is used, you can change its font using the element |
| 489 |
\FontElement{chapterentrydots}% |
| 490 |
\important[i]{\FontElement{chapterentrydots}\\ |
| 491 |
\FontElement{sectionentrydots}} or \FontElement{sectionentrydots} (see also |
| 492 |
\DescRef{\LabelBase.cmd.setkomafont} and |
| 493 |
\DescRef{\LabelBase.cmd.addtokomafont}, \autoref{sec:\LabelBase.textmarkup}, |
| 494 |
\DescPageRef{\LabelBase.cmd.setkomafont}, as well as |
| 495 |
\autoref{tab:maincls.fontelements}, |
| 496 |
\autopageref{tab:maincls.fontelements}). The defaults of the elements are |
| 497 |
shown in \autoref{tab:maincls.tocelements}, from |
| 498 |
\autopageref{tab:maincls.tocelements}. Note\textnote{Attention!} that the dots |
| 499 |
of all entries will be equally spaced only if all dots use the same |
| 500 |
font. Because of this the base font is always |
| 501 |
\Macro{normalfont}\Macro{normalsize} and only the colour of |
| 502 |
\DescRef{\LabelBase.fontelement.chapterentry} or |
| 503 |
\DescRef{\LabelBase.fontelement.sectionentry} is also used for the dots.% |
| 504 |
\EndIndexGroup |
| 505 |
|
| 506 |
|
| 507 |
\begin{Declaration} |
| 508 |
\Macro{tableofcontents} |
| 509 |
\end{Declaration}% |
| 510 |
The table of contents is output by the \Macro{tableofcontents} command. To get |
| 511 |
correct values in the table of contents requires at least two {\LaTeX} runs |
| 512 |
after every change. The \DescRef{\LabelBase.option.toc} option described above |
| 513 |
can also affect the extent and format of the table of contents. After changing |
| 514 |
the settings of this option, at least two \LaTeX{} runs are needed again. |
| 515 |
|
| 516 |
Entries for \DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} with |
| 517 |
\Class{scrbook}\IndexClass{scrbook} and \Class{scrreprt}\IndexClass{scrreprt}, |
| 518 |
or \DescRef{\LabelBase.cmd.section}\IndexCmd{section} with |
| 519 |
\Class{scrartcl}\IndexClass{scrartcl}, and the sectioning level |
| 520 |
\DescRef{\LabelBase.cmd.part}\IndexCmd{part} are not indented. Additionally, |
| 521 |
there are no dots between the text of this heading and the page number. The |
| 522 |
typographical logic for this behaviour is that the font is usually distinct |
| 523 |
and appropriate emphasis is desirable. |
| 524 |
However\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and |
| 525 |
\Class{scrartcl}}, you can change this behaviour with the previously |
| 526 |
documented options. The table of contents of this \iffree{guide}{book} is |
| 527 |
created with the default settings and serves as an example. |
| 528 |
|
| 529 |
\BeginIndex{FontElement}{partentry}\LabelFontElement{partentry}% |
| 530 |
\BeginIndex{FontElement}{chapterentry}\LabelFontElement{chapterentry}% |
| 531 |
\BeginIndex{FontElement}{sectionentry}\LabelFontElement{sectionentry}% |
| 532 |
The\ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and |
| 533 |
\Class{scrartcl}}\important{\FontElement{partentry}\\ |
| 534 |
\FontElement{chapterentry}\\ |
| 535 |
\FontElement{sectionentry}} font style of the top two levels in the table of |
| 536 |
contents is also affected by the settings for the \FontElement{partentry} |
| 537 |
element, as well as by the \FontElement{chapterentry} element for the |
| 538 |
\Class{scrbook} and \Class{scrreprt} classes, and by the |
| 539 |
\FontElement{sectionentry} element for the \Class{scrartcl} class. |
| 540 |
\BeginIndex{FontElement}{partentrypagenumber}% |
| 541 |
\LabelFontElement{partentrypagenumber}% |
| 542 |
\LabelFontElement{pagination}% |
| 543 |
\BeginIndex{FontElement}{chapterentrypagenumber}% |
| 544 |
\LabelFontElement{chapterentrypagenumber}% |
| 545 |
\BeginIndex{FontElement}{sectionentrypagenumber}% |
| 546 |
\LabelFontElement{sectionentrypagenumber}% |
| 547 |
You can set the font style of the page numbers separately from these elements |
| 548 |
using \FontElement{partentrypagenumber}% |
| 549 |
\important{\FontElement{partentrypagenumber}} and |
| 550 |
\FontElement{chapterentrypagenumber}% |
| 551 |
\important{\FontElement{chapterentrypagenumber}\\ |
| 552 |
\FontElement{sectionentrypagenumber}}\,---\,for \Class{scrbook} and |
| 553 |
\Class{scrreprt}\,---\,or \FontElement{sectionentrypagenumber}\,---\,for |
| 554 |
\Class{scrartcl}\,---\, (see \DescRef{\LabelBase.cmd.setkomafont} and |
| 555 |
\DescRef{\LabelBase.cmd.addtokomafont} in \autoref{sec:\LabelBase.textmarkup}, |
| 556 |
\DescPageRef{\LabelBase.cmd.setkomafont}, or |
| 557 |
\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). |
| 558 |
If\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and |
| 559 |
\Class{scrartcl}} you use dotted lines connecting the heading entries |
| 560 |
(chapter or section depending on the class) to the page numbers using the |
| 561 |
\DescRef{\LabelBase.option.toc}% |
| 562 |
\IndexOption{toc~=\textKValue{chapterentrywithdots}}% |
| 563 |
\IndexOption{toc~=\textKValue{sectionentrywithdots}} |
| 564 |
\DescRef{\LabelBase.option.chapterentrydots}% |
| 565 |
\IndexOption{chapterentrydots~=\PName{simple switch}} or |
| 566 |
\DescRef{\LabelBase.option.sectionentrydots}% |
| 567 |
\IndexOption{sectionentrydots~=\PName{simple switch}} option, you can change |
| 568 |
their font style using the \DescRef{\LabelBase.fontelement.chapterentrydots}% |
| 569 |
\IndexFontElement{chapterentrydots}% |
| 570 |
\important{\DescRef{\LabelBase.fontelement.chapterentrydots}\\ |
| 571 |
\DescRef{\LabelBase.fontelement.sectionentrydots}} and |
| 572 |
\DescRef{\LabelBase.fontelement.sectionentrydots}% |
| 573 |
\IndexFontElement{sectionentrydots} elements. The defaults for these |
| 574 |
elements are found in \autoref{tab:maincls.tocelements}. |
| 575 |
\begin{table} |
| 576 |
% \centering |
| 577 |
% \caption |
| 578 |
\KOMAoptions{captions=topbeside}% |
| 579 |
\setcapindent{0pt}% |
| 580 |
\begin{captionbeside} |
| 581 |
[Default font styles for the elements of the table of contents] |
| 582 |
{\label{tab:maincls.tocelements}% |
| 583 |
Default font styles for the elements of the table of contents} |
| 584 |
[l] |
| 585 |
\setlength{\tabcolsep}{.9\tabcolsep}% Umbruchoptimierung! |
| 586 |
\begin{tabular}[t]{ll} |
| 587 |
\toprule |
| 588 |
Element & Default font style \\ |
| 589 |
\midrule |
| 590 |
\FontElement{partentry} & |
| 591 |
\DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\Macro{large} \\ |
| 592 |
\FontElement{partentrypagenumber} & \\ |
| 593 |
\FontElement{chapterentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\\ |
| 594 |
\FontElement{chapterentrydots} & \Macro{normalfont} \\ |
| 595 |
\FontElement{chapterentrypagenumber} & \\ |
| 596 |
\FontElement{sectionentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition} \\ |
| 597 |
\FontElement{sectionentrydots} & \Macro{normalfont} \\ |
| 598 |
\FontElement{sectionentrypagenumber} & \\ |
| 599 |
\bottomrule |
| 600 |
\end{tabular} |
| 601 |
\end{captionbeside} |
| 602 |
\end{table} |
| 603 |
% |
| 604 |
\EndIndexGroup |
| 605 |
|
| 606 |
|
| 607 |
\begin{Declaration} |
| 608 |
\Counter{tocdepth} |
| 609 |
\Macro{parttocdepth} |
| 610 |
\Macro{sectiontocdepth} |
| 611 |
\Macro{subsectiontocdepth} |
| 612 |
\Macro{subsubsectiontocdepth} |
| 613 |
\Macro{paragraphtocdepth} |
| 614 |
\Macro{subparagraphtocdepth} |
| 615 |
\end{Declaration}% |
| 616 |
Normally, the sectioning divisions included in the table of contents are all |
| 617 |
those from \DescRef{\LabelBase.cmd.part} to |
| 618 |
\DescRef{\LabelBase.cmd.subsection} for the \Class{scrbook} and |
| 619 |
\Class{scrreprt} classes, or from \DescRef{\LabelBase.cmd.part} to |
| 620 |
\DescRef{\LabelBase.cmd.subsubsection} for the \Class{scrartcl} class. Whether |
| 621 |
or not to include a sectioning level in the table of contents is controlled by |
| 622 |
the \Counter{tocdepth} counter. This has the value -1 for |
| 623 |
\DescRef{\LabelBase.cmd.part}, 0 for \DescRef{\LabelBase.cmd.chapter}, and so |
| 624 |
on. By incrementing or decrementing the counter, you can choose the lowest |
| 625 |
sectioning level to include in the table of contents. Incidentally, the |
| 626 |
standard classes work the same way. |
| 627 |
Unlike\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and |
| 628 |
\Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} with the |
| 629 |
standard classes, with \KOMAScript{} you do not need to remember these values. |
| 630 |
\KOMAScript{} defines a \Macro{\PName{level}tocdepth} command for each |
| 631 |
sectioning level with the appropriate value which you can use to set |
| 632 |
\Counter{tocdepth}. |
| 633 |
|
| 634 |
Please note\textnote{Attention!} that in |
| 635 |
\Class{scrartcl}\OnlyAt{\Class{scrartcl}}, the values of \Counter{tocdepth} |
| 636 |
and \DescRef{\LabelBase.counter.secnumdepth}\IndexCounter{secnumdepth} (see |
| 637 |
\autoref{sec:\LabelBase.structure}, |
| 638 |
\DescPageRef{\LabelBase.counter.secnumdepth}) for |
| 639 |
\DescRef{\LabelBase.cmd.part} are not the same. This behaviour was copied from |
| 640 |
the standard \Class{article} class for compatibility. Thus, for example, you |
| 641 |
should not use \DescRef{\LabelBase.cmd.partnumdepth}\IndexCmd{partnumdepth} to |
| 642 |
set the value of \Counter{tocdepth}.% |
| 643 |
\begin{Example} |
| 644 |
Suppose you are preparing an article that uses the sectioning level |
| 645 |
\DescRef{\LabelBase.cmd.subsubsection}. However, you do not want this |
| 646 |
sectioning level to appear in the table of contents. The preamble of your |
| 647 |
document might contain the following: |
| 648 |
\begin{lstcode} |
| 649 |
\documentclass{scrartcl} |
| 650 |
\setcounter{tocdepth}{\subsectiontocdepth} |
| 651 |
\end{lstcode} |
| 652 |
Thus you set the \Counter{tocdepth} counter to the value of the |
| 653 |
\Macro{subsectiontocdepth} command. That value is normally 2, but this way, |
| 654 |
you do not have to remember it. |
| 655 |
|
| 656 |
If instead you simply want to include one less level in the table of |
| 657 |
contents than you normally would, you can simply subtract one from the |
| 658 |
default value of \Counter{tocdepth}: |
| 659 |
\begin{lstcode} |
| 660 |
\documentclass{scrartcl} |
| 661 |
\addtocounter{tocdepth}{-1} |
| 662 |
\end{lstcode} |
| 663 |
The\textnote{Hint!} value that you need to add to or subtract from |
| 664 |
\Counter{tocdepth} is listed in the table of contents after at least two |
| 665 |
\LaTeX{} runs. |
| 666 |
\end{Example}% |
| 667 |
\EndIndexGroup |
| 668 |
% |
| 669 |
\EndIndexGroup |
| 670 |
|
| 671 |
|
| 672 |
\LoadCommonFile{parmarkup}% \section{Paragraph Markup} |
| 673 |
|
| 674 |
\LoadCommonFile{oddorevenpage}% \section{Detecting Odd or Even Pages} |
| 675 |
|
| 676 |
|
| 677 |
\section{Headers and Footers Using Predefined Page Styles} |
| 678 |
\seclabel{pagestyle} |
| 679 |
|
| 680 |
\BeginIndexGroup |
| 681 |
\BeginIndex{}{page>style}% |
| 682 |
One of the general characteristics of a document is the page style. In |
| 683 |
\LaTeX{} this primarily consists of the contents of headers and footers. |
| 684 |
|
| 685 |
|
| 686 |
\begin{Declaration} |
| 687 |
\OptionVName{headsepline}{simple switch} |
| 688 |
\OptionVName{footsepline}{simple switch} |
| 689 |
\end{Declaration}% |
| 690 |
You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 691 |
\Class{scrartcl}} can use these options to specify whether a horizontal rule |
| 692 |
appears beneath the header or above the footer. You can use any of the values |
| 693 |
for simple switches shown in \autoref{tab:truefalseswitch}, |
| 694 |
\autopageref{tab:truefalseswitch}. Setting the \Option{headsepline} option to |
| 695 |
true or invoking it with no value results in a line beneath the header. |
| 696 |
Similarly, activating the \Option{footsepline} option results in a rule above |
| 697 |
the footer. Deactivating either option switches off the respective rule. |
| 698 |
|
| 699 |
The\textnote{Attention!} \Option{headsepline} option naturally has no effect |
| 700 |
with the \DescRef{\LabelBase.pagestyle.empty} and |
| 701 |
\DescRef{\LabelBase.pagestyle.plain} page styles, which are described below, |
| 702 |
because these styles explicitly dispense with a header\Index{page>header}. |
| 703 |
Typographically, such a line has the effect of making the header appear to be |
| 704 |
closer to the text. This does not mean that the header then needs to be moved |
| 705 |
farther away from the body of the text\Index{text>body}. Instead, the header |
| 706 |
should be considered as belonging to the text body for the purpose of |
| 707 |
calculating the type area. \KOMAScript{} takes this into account by passing |
| 708 |
the \Option{headsepline} option to the |
| 709 |
\hyperref[cha:typearea]{\Package{typearea}}% |
| 710 |
\important{\hyperref[cha:typearea]{\Package{typearea}}}\IndexPackage{typearea} |
| 711 |
package, which then automatically executes the package option |
| 712 |
\DescRef{typearea.option.headinclude}% |
| 713 |
\IndexOption{headinclude}\important{\DescRef{typearea.option.headinclude}} |
| 714 |
with the same value. The same applies to the footer separation line. Unlike |
| 715 |
\Option{headsepline}, the \Option{footsepline} option also affects the |
| 716 |
\PValue{plain} page style because \PValue{plain} prints a page number in the |
| 717 |
footer. |
| 718 |
|
| 719 |
The options themselves do not automatically recalculate the type area. To |
| 720 |
recalculate it, use the \DescRef{typearea.option.DIV} option with the values |
| 721 |
\hyperref[desc:typearea.option.DIV.last]{\PValue{last}} or |
| 722 |
\hyperref[desc:typearea.option.DIV.current]{\PValue{current}} (see |
| 723 |
\DescPageRef{typearea.option.DIV.last}) or the |
| 724 |
\DescRef{typearea.cmd.recalctypearea} command (see |
| 725 |
\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. |
| 726 |
|
| 727 |
The \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 728 |
\IndexPackage{scrlayer-scrpage}% |
| 729 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} |
| 730 |
package (see \autoref{cha:scrlayer-scrpage}) offers further possibilities for |
| 731 |
adjusting lines in headers and footers.% |
| 732 |
% |
| 733 |
\EndIndexGroup |
| 734 |
|
| 735 |
|
| 736 |
\begin{Declaration} |
| 737 |
\Macro{pagestyle}\Parameter{page style} |
| 738 |
\Macro{thispagestyle}\Parameter{local page style} |
| 739 |
\end{Declaration}% |
| 740 |
There are usually four different page styles: |
| 741 |
\begin{description} |
| 742 |
\item[{\PageStyle{empty}% |
| 743 |
\BeginIndex[indexmain]{Pagestyle}{empty}\LabelPageStyle{empty}}] is the |
| 744 |
page style with completely empty headers and footers. In {\KOMAScript} |
| 745 |
this is identical to the standard classes.% |
| 746 |
\item[{\PageStyle{headings}% |
| 747 |
\BeginIndex[indexmain]{Pagestyle}{headings}\LabelPageStyle{headings}}] is |
| 748 |
the page style with running heads in the header. In this style, headings are |
| 749 |
automatically\Index[indexmain]{running heads>automatic} inserted into the |
| 750 |
header. \OnlyAt{\Class{scrbook}\and\Class{scrreprt}}% |
| 751 |
With the classes \Class{scrbook}\IndexClass{scrbook} and |
| 752 |
\Class{scrreprt}\IndexClass{scrreprt}, the headings of chapters and sections |
| 753 |
are repeated in the header for two-sided printing\,---\,on the outer side |
| 754 |
with {\KOMAScript}\textnote{\KOMAScript{} vs. standard classes}, on the |
| 755 |
inner side with the standard classes. {\KOMAScript} puts the page number on |
| 756 |
the outer side of the footer; the standard classes put it on the inner side |
| 757 |
of the header. In one-sided printing, {\KOMAScript} uses only the chapter |
| 758 |
headings, which are centred in the header, and puts the page numbers centred |
| 759 |
in the footer. |
| 760 |
\OnlyAt{\Class{scrartcl}}\Class{scrartcl}\IndexClass{scrartcl} behaves |
| 761 |
similarly but starts one a level deeper in the sectioning hierarchy, with |
| 762 |
sections and subsections, because the chapter level does not exist in this |
| 763 |
case. |
| 764 |
|
| 765 |
While the standard classes\textnote{\KOMAScript{} vs. standard classes} |
| 766 |
automatically convert the running heads to upper-case letters, |
| 767 |
{\KOMAScript} uses the capitalisation found in the headings. There are |
| 768 |
several typographical reasons for this. Upper-case letters are actually far |
| 769 |
too massive as a text decoration. If you use them anyway, they should be set |
| 770 |
one point smaller and with slightly tighter spacing. The standard classes do |
| 771 |
not take these points into consideration. |
| 772 |
|
| 773 |
In addition, the {\KOMAScript} classes support rules below the header and |
| 774 |
above the footer with the \DescRef{\LabelBase.option.headsepline} and |
| 775 |
\DescRef{\LabelBase.option.footsepline} options (see |
| 776 |
\DescPageRef{\LabelBase.option.headsepline}).% |
| 777 |
\item[{\PageStyle{myheadings}% |
| 778 |
\BeginIndex[indexmain]{Pagestyle}{myheadings}\LabelPageStyle{myheadings}}] |
| 779 |
mostly corresponds to the \PValue{headings} page style, but the running |
| 780 |
heads are not generated automatically% |
| 781 |
\Index[indexmain]{running heads>manual}\,---\,they have to be defined by the |
| 782 |
user. You can use the \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} |
| 783 |
and \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright}\important{% |
| 784 |
\DescRef{\LabelBase.cmd.markboth}\\ |
| 785 |
\DescRef{\LabelBase.cmd.markright}} commands for that purpose (see |
| 786 |
\DescPageRef{\LabelBase.cmd.markright}). |
| 787 |
\item[{\PageStyle{plain}% |
| 788 |
\BeginIndex[indexmain]{Pagestyle}{plain}\LabelPageStyle{plain}}] is the |
| 789 |
page style with no running head\Index{running head} and only a page number% |
| 790 |
\Index{page>number} in the footer. The\textnote{\KOMAScript{} vs. standard |
| 791 |
classes} standard classes always centre this page number in the footer. |
| 792 |
{\KOMAScript} puts the page number on the outer side of the footer in |
| 793 |
two-sided\Index{two-sided} mode. {\KOMAScript} behaves like the |
| 794 |
standard classes in one-sided printing.% |
| 795 |
\end{description} |
| 796 |
|
| 797 |
You\important{\Macro{pagestyle}} can set the page style at any time with the |
| 798 |
help of the \Macro{pagestyle} command, and this setting takes effect with the |
| 799 |
next page that is output. If\textnote{Hint!} you use \Macro{pagestyle} just |
| 800 |
before a command that results in an implicit page break and if the new page |
| 801 |
style should be used on the resulting new page, a |
| 802 |
\DescRef{\LabelBase.cmd.cleardoublepage} just before \Macro{pagestyle} will be |
| 803 |
useful. But usually you set the page style only once, at the beginning of the |
| 804 |
document or in the preamble. |
| 805 |
|
| 806 |
To\important{\Macro{thispagestyle}} change the page style of the current page |
| 807 |
only, use the \Macro{thispagestyle} command. This occurs automatically at some |
| 808 |
points in the document. For example, the |
| 809 |
\Macro{thispagestyle}\PParameter{\DescRef{\LabelBase.cmd.chapterpagestyle}} |
| 810 |
command is issued implicitly on the first page of a chapter. |
| 811 |
|
| 812 |
Note\textnote{Attention!} that when you use the |
| 813 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 814 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} |
| 815 |
package, switching between automatic and manual running heads is no longer |
| 816 |
accomplished by changing the page styles but with special instructions. You |
| 817 |
should not use the \PValue{headings} and \PValue{myheadings} page styles with |
| 818 |
this package. |
| 819 |
|
| 820 |
\BeginIndexGroup \BeginIndex[indexother]{}{font>style}% |
| 821 |
\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% |
| 822 |
\LabelFontElement{pagehead}% |
| 823 |
\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% |
| 824 |
\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% |
| 825 |
To change the font style used for the header, the footer, or the page |
| 826 |
number\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and |
| 827 |
\Class{scrartcl}}, use the \DescRef{\LabelBase.cmd.setkomafont} and |
| 828 |
\DescRef{\LabelBase.cmd.addtokomafont} commands (see |
| 829 |
\autoref{sec:\LabelBase.textmarkup}, |
| 830 |
\DescPageRef{\LabelBase.cmd.setkomafont}). The same element, |
| 831 |
\FontElement{pageheadfoot}\IndexFontElement{pageheadfoot}% |
| 832 |
\important{\FontElement{pageheadfoot}}, is used for the header and the footer. |
| 833 |
The element for the page number within the header or footer is called |
| 834 |
\FontElement{pagenumber}\IndexFontElement{pagenumber}% |
| 835 |
\important{\FontElement{pagenumber}}. The |
| 836 |
\FontElement{pagefoot}\IndexFontElement{pagefoot}% |
| 837 |
\important{\FontElement{pagefoot}} element, which is also provided by the |
| 838 |
\KOMAScript{} classes, is used only if you define a page style with the |
| 839 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 840 |
\IndexPackage{scrlayer-scrpage} package in which the footer contains text (see |
| 841 |
\autoref{cha:scrlayer-scrpage}, |
| 842 |
\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). |
| 843 |
|
| 844 |
You can find the default settings in |
| 845 |
\autoref{tab:\LabelBase.defaultFontsHeadFoot}. |
| 846 |
% |
| 847 |
\begin{table} |
| 848 |
% \centering% |
| 849 |
% \caption |
| 850 |
\KOMAoptions{captions=topbeside}% |
| 851 |
\setcapindent{0pt}% |
| 852 |
% \addtokomafont{caption}{\raggedright}% |
| 853 |
\begin{captionbeside} |
| 854 |
[{Default values for page style elements}] |
| 855 |
{\label{tab:maincls.defaultFontsHeadFoot}% |
| 856 |
\hspace{0pt plus 1ex}% |
| 857 |
Default values for page style elements} |
| 858 |
[l] |
| 859 |
\begin{tabular}[t]{ll} |
| 860 |
\toprule |
| 861 |
Element & Default \\ |
| 862 |
\midrule |
| 863 |
\FontElement{pagefoot}\IndexFontElement{pagefoot} & |
| 864 |
\\ |
| 865 |
\FontElement{pageheadfoot}\IndexFontElement{pageheadfoot} & |
| 866 |
\Macro{normalfont}\Macro{normalcolor}\Macro{slshape} \\ |
| 867 |
\FontElement{pagenumber}\IndexFontElement{pagenumber} & |
| 868 |
\Macro{normalfont}\Macro{normalcolor}\\ |
| 869 |
\bottomrule |
| 870 |
\end{tabular} |
| 871 |
\end{captionbeside} |
| 872 |
\end{table} |
| 873 |
% |
| 874 |
\begin{Example} |
| 875 |
\leavevmode\phantomsection\xmpllabel{cmd.pagestyle}% |
| 876 |
Suppose you want to set header and footer in a smaller type size |
| 877 |
and in italics. However, the page number should not be set in |
| 878 |
italics but in bold. Apart from the fact that the result will look |
| 879 |
horrible, you can do this as follows: |
| 880 |
\begin{lstcode} |
| 881 |
\setkomafont{pageheadfoot}{% |
| 882 |
\normalfont\normalcolor\itshape\small} |
| 883 |
\setkomafont{pagenumber}{\normalfont\bfseries} |
| 884 |
\end{lstcode} |
| 885 |
On the other hand, if you only want a smaller font to be used along with the |
| 886 |
default slanted text, you can use the following: |
| 887 |
\begin{lstcode} |
| 888 |
\addtokomafont{pagehead}{\small} |
| 889 |
\end{lstcode} |
| 890 |
As you can see, the previous example uses the |
| 891 |
\FontElement{pagehead}\important{\FontElement{pagehead}} element. You can |
| 892 |
achieve the same result using \PValue{pageheadfoot} instead (see |
| 893 |
\autoref{tab:\LabelBase.fontelements} on |
| 894 |
\autopageref{tab:\LabelBase.fontelements}). |
| 895 |
\end{Example} |
| 896 |
It is not possible to use these methods to force upper-case letters to be used |
| 897 |
automatically for the running heads. Although you can redefine |
| 898 |
\DescRef{tocbasic.cmd.MakeMarkcase}\IndexCmd{MakeMarkcase}, in such cases you |
| 899 |
should instead use the |
| 900 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see |
| 901 |
\autoref{cha:scrlayer-scrpage}, |
| 902 |
\DescPageRef{scrlayer-scrpage.option.markcase}). |
| 903 |
|
| 904 |
If\textnote{Hint!} you define your own page styles, the commands |
| 905 |
\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pageheadfoot}, |
| 906 |
\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagenumber}, and |
| 907 |
\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagefoot} can be useful. In |
| 908 |
particular, if you do not use the {\KOMAScript} package |
| 909 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} (see |
| 910 |
\autoref{cha:scrlayer-scrpage}) but use, for example, the |
| 911 |
\Package{fancyhdr}\IndexPackage{fancyhdr}\important{\Package{fancyhdr}} |
| 912 |
package (see \cite{package:fancyhdr}), you can use these commands in your |
| 913 |
definitions. In this way you can maintain compatibility with {\KOMAScript} as |
| 914 |
much as possible. If you do not use these commands in your own definitions, |
| 915 |
changes such as those shown in the previous examples have no effect. The |
| 916 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 917 |
\IndexPackage{scrlayer-scrpage} package tries to maintain maximum |
| 918 |
compatibility as long as, for example, |
| 919 |
\iffree{\Macro{thepage}}{\DescRef{\LabelBase-experts.cmd.thepage}}% |
| 920 |
\IndexCmd{thepage} is not used directly for the page number rather than the |
| 921 |
\iffree{\Macro{pagemark}}{\DescRef{\LabelBase-experts.cmd.pagemark}}% |
| 922 |
\IndexCmd{pagemark} which is provided for it.% |
| 923 |
\EndIndexGroup |
| 924 |
% |
| 925 |
\EndIndexGroup |
| 926 |
|
| 927 |
|
| 928 |
\begin{Declaration} |
| 929 |
\Macro{markboth}\Parameter{left mark}\Parameter{right mark} |
| 930 |
\Macro{markright}\Parameter{right mark} |
| 931 |
\end{Declaration} |
| 932 |
The \DescRef{\LabelBase.pagestyle.myheadings}% |
| 933 |
\important{\DescRef{\LabelBase.pagestyle.myheadings}}% |
| 934 |
\IndexPagestyle{myheadings} page style does not set the running head. Instead, |
| 935 |
you set it with the help of the \Macro{markboth} and \Macro{markright} |
| 936 |
commands. This way the \PName{left mark} will normally be used in the header |
| 937 |
of even pages and \PName{right mark} in the header of odd pages. With |
| 938 |
one-sided printing, only the \PName{right mark} exists. With the |
| 939 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 940 |
\IndexPackage{scrlayer-scrpage}% |
| 941 |
\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} |
| 942 |
package, the \DescRef{scrlayer-scrpage.cmd.markleft}% |
| 943 |
\IndexCmd{markleft}\important{\DescRef{scrlayer-scrpage.cmd.markleft}} command |
| 944 |
is also available. |
| 945 |
|
| 946 |
You can use these commands with other page styles too. However, when combined |
| 947 |
with automatic running heads, for example with the |
| 948 |
\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style, |
| 949 |
the effect of the commands lasts only until the next time the respective marks |
| 950 |
are set automatically.% |
| 951 |
% |
| 952 |
\EndIndexGroup |
| 953 |
|
| 954 |
\begin{Declaration} |
| 955 |
\Macro{titlepagestyle} |
| 956 |
\Macro{partpagestyle} |
| 957 |
\Macro{chapterpagestyle} |
| 958 |
\Macro{indexpagestyle} |
| 959 |
\end{Declaration}% |
| 960 |
\Index{title>page style}% |
| 961 |
\Index{part>page style}% |
| 962 |
\Index{chapter>page style}% |
| 963 |
\Index{index>page style}% |
| 964 |
On some pages, a different page style is chosen automatically with the help of |
| 965 |
the \DescRef{\LabelBase.cmd.thispagestyle} command. Which page style this |
| 966 |
actually is, is defined by these four macros, of which \Macro{partpagestyle} |
| 967 |
and \Macro{chapterpagestyle}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} are |
| 968 |
found only with classes \Class{scrbook} and \Class{scrreprt}, and not in |
| 969 |
\Class{scrartcl}. The default value for all four cases is |
| 970 |
\DescRef{\LabelBase.pagestyle.plain}\IndexPagestyle{plain}. You can find the |
| 971 |
meaning of these macros in \autoref{tab:specialpagestyles}. |
| 972 |
% |
| 973 |
\begin{table} |
| 974 |
\centering |
| 975 |
\caption{Macros to set up the page style of special pages} |
| 976 |
\label{tab:specialpagestyles} |
| 977 |
\begin{desctabular} |
| 978 |
\mentry{titlepagestyle}{Page style for a title page when using |
| 979 |
\emph{in-page} titles.}% |
| 980 |
\mentry{partpagestyle}{Page style for pages with |
| 981 |
\DescRef{\LabelBase.cmd.part} titles.}% |
| 982 |
\mentry{chapterpagestyle}{Page style for the first page of a chapter.}% |
| 983 |
\mentry{indexpagestyle}{Page style for the first page of the index.}% |
| 984 |
\end{desctabular} |
| 985 |
\end{table} |
| 986 |
% |
| 987 |
You can redefine the page styles with the \Macro{renewcommand} macro. |
| 988 |
\begin{Example} |
| 989 |
Suppose you do not want the pages with a \DescRef{\LabelBase.cmd.part} |
| 990 |
heading to be numbered. You can use the following command in the preamble of |
| 991 |
your document: |
| 992 |
\begin{lstcode} |
| 993 |
\renewcommand*{\partpagestyle}{empty} |
| 994 |
\end{lstcode} |
| 995 |
As mentioned previously on \DescPageRef{\LabelBase.pagestyle.empty}, |
| 996 |
the \PValue{empty} page style is exactly what is required in this |
| 997 |
example. Of course, you can also use a user-defined page style. |
| 998 |
|
| 999 |
Suppose you have defined your own page style for initial chapter pages with |
| 1000 |
the \hyperref[cha:scrlayer]{\Package{scrlayer}} (see |
| 1001 |
\autoref{sec:scrlayer.pagestyles}) or the |
| 1002 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see |
| 1003 |
\autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs}). You have given this |
| 1004 |
page style the fitting name of \PValue{chapter}. To actually use this style, |
| 1005 |
you must redefine \Macro{chapterpagestyle} in this way: |
| 1006 |
\begin{lstcode} |
| 1007 |
\renewcommand*{\chapterpagestyle}{chapter} |
| 1008 |
\end{lstcode} |
| 1009 |
|
| 1010 |
Suppose you do not want the table of contents\Index{table of contents}% |
| 1011 |
\textnote{table of contents} of a book to have page numbers. Everything |
| 1012 |
after the table of contents, however, should use the \PValue{headings} |
| 1013 |
page style, including the \PValue{plain} page style for the first |
| 1014 |
page of every chapter. You can use the following: |
| 1015 |
\begin{lstcode} |
| 1016 |
\clearpage |
| 1017 |
\pagestyle{empty} |
| 1018 |
\renewcommand*{\chapterpagestyle}{empty} |
| 1019 |
\tableofcontents |
| 1020 |
\clearpage |
| 1021 |
\pagestyle{headings} |
| 1022 |
\renewcommand*{\chapterpagestyle}{plain} |
| 1023 |
\end{lstcode} |
| 1024 |
You can also keep the redefinition local by using a group. This method has |
| 1025 |
the advantage that you do not need to make any assumptions about the what |
| 1026 |
the previous page style was in order to restore it after your local change: |
| 1027 |
\begin{lstcode} |
| 1028 |
\clearpage |
| 1029 |
\begingroup |
| 1030 |
\pagestyle{empty} |
| 1031 |
\renewcommand*{\chapterpagestyle}{empty} |
| 1032 |
\tableofcontents |
| 1033 |
\clearpage |
| 1034 |
\endgroup |
| 1035 |
\end{lstcode} |
| 1036 |
Note,\important{Attention!} however, that you never should put a numbered |
| 1037 |
sectioning command into a group. Otherwise you may get unpredictable results |
| 1038 |
with commands like \Macro{label}. |
| 1039 |
|
| 1040 |
On \DescPageRef{tocbasic.cmd.AfterTOCHead} in \autoref{sec:tocbasic.toc}, |
| 1041 |
you will discover the \DescRef{tocbasic.cmd.AfterTOCHead} command, which |
| 1042 |
makes a solution even easier: |
| 1043 |
\begin{lstcode} |
| 1044 |
\AfterTOCHead[toc]{% |
| 1045 |
\thispagestyle{empty}% |
| 1046 |
\pagestyle{empty}% |
| 1047 |
} |
| 1048 |
\end{lstcode}% |
| 1049 |
This takes advantage of the fact that if there are several |
| 1050 |
\DescRef{\LabelBase.cmd.thispagestyle} commands on the same page, the last |
| 1051 |
one always wins. |
| 1052 |
\end{Example} |
| 1053 |
|
| 1054 |
\begin{Explain} |
| 1055 |
You might think that you can put running heads on the first page of a |
| 1056 |
chapter simply by using the |
| 1057 |
\begin{lstcode} |
| 1058 |
\renewcommand*{\chapterpagestyle}{headings} |
| 1059 |
\end{lstcode} |
| 1060 |
command. Before you try this, you should read \iffree{}{more about the |
| 1061 |
background to \DescRef{maincls-experts.cmd.rightmark} in |
| 1062 |
\autoref{sec:maincls-experts.addInfos} on |
| 1063 |
\DescPageRef{maincls-experts.cmd.rightmark}. Also, }the remarks on |
| 1064 |
\DescRef{scrlayer-scrpage-experts.cmd.rightfirstmark} starting on page |
| 1065 |
\DescPageRef{scrlayer-scrpage-experts.cmd.rightfirstmark} in |
| 1066 |
\autoref{cha:scrlayer-scrpage-experts}, \autoref{part:forExperts} |
| 1067 |
\iffree{}{provide important information}.% |
| 1068 |
\end{Explain} |
| 1069 |
% |
| 1070 |
\EndIndexGroup |
| 1071 |
|
| 1072 |
|
| 1073 |
\begin{Declaration} |
| 1074 |
\Macro{pagenumbering}\Parameter{numbering style} |
| 1075 |
\end{Declaration} |
| 1076 |
This command works the same way in {\KOMAScript} as in the standard classes. |
| 1077 |
Strictly speaking, it is a feature of neither the standard classes nor the |
| 1078 |
\KOMAScript{} classes but of the {\LaTeX} kernel. This command is used to |
| 1079 |
change the \PName{numbering style} of page numbers. |
| 1080 |
|
| 1081 |
The changes take effect immediately, i.\,e., starting from the page that |
| 1082 |
contains the command. If necessary, you should first close the current page |
| 1083 |
with \DescRef{\LabelBase.cmd.clearpage} or better |
| 1084 |
\DescRef{\LabelBase.cmd.cleardoubleoddpage}% |
| 1085 |
\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% |
| 1086 |
\IndexCmd{cleardoubleoddpage}. You can find the available settings for |
| 1087 |
\PName{numbering style} in \autoref{tab:numberKind}. |
| 1088 |
% |
| 1089 |
\begin{table} |
| 1090 |
% \centering |
| 1091 |
\KOMAoptions{captions=topbeside}% |
| 1092 |
\setcapindent{0pt}% |
| 1093 |
% \caption |
| 1094 |
\begin{captionbeside} |
| 1095 |
{\label{tab:numberKind}% |
| 1096 |
Available numbering styles of page numbers} |
| 1097 |
\begin{tabular}[t]{lll} |
| 1098 |
\toprule |
| 1099 |
numbering style & example & description \\ |
| 1100 |
\midrule |
| 1101 |
\PValue{arabic} & 8 & Arabic numbers \\ |
| 1102 |
\PValue{roman} & viii & lower-case Roman numbers \\ |
| 1103 |
\PValue{Roman} & VIII & upper-case Roman numbers \\ |
| 1104 |
\PValue{alph} & h & letters \\ |
| 1105 |
\PValue{Alph} & H & capital letters \\ |
| 1106 |
\bottomrule |
| 1107 |
\end{tabular} |
| 1108 |
\end{captionbeside} |
| 1109 |
\end{table} |
| 1110 |
|
| 1111 |
Calling\textnote{Attention!} \Macro{pagenumbering} always resets the page |
| 1112 |
number\Index{page>number}. The current page becomes number 1 in the selected |
| 1113 |
\PName{numbering style}. In order that two-sided documents produce the correct |
| 1114 |
results on an even page, so that the left-hand page is not missing, you should |
| 1115 |
always add \DescRef{\LabelBase.cmd.cleardoubleoddpage}% |
| 1116 |
\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% |
| 1117 |
\IndexCmd{cleardoubleoddpage} before \Macro{pagenumbering}. The next section |
| 1118 |
provides more information about potentially inserted blank pages. |
| 1119 |
|
| 1120 |
\begin{Explain} |
| 1121 |
Let me say a word about a common mistake found in various templates |
| 1122 |
circulating on the Internet. If you encounter lines like the |
| 1123 |
following\,---\,without the initial comment naturally\,---\,this is an |
| 1124 |
unmistakable sign that the creator did not read or understand the |
| 1125 |
remark above: |
| 1126 |
\begin{lstcode} |
| 1127 |
% Attention! This example contains errors! |
| 1128 |
% Please note the explanation in the text! |
| 1129 |
\tableofcontents |
| 1130 |
\pagenumbering{arabic} |
| 1131 |
\setcounter{page}{1} |
| 1132 |
\end{lstcode} |
| 1133 |
Since \DescRef{\LabelBase.cmd.tableofcontents} outputs the table of contents |
| 1134 |
but does not automatically issue a page break at the end, the page numbering |
| 1135 |
is already changed on the last page of the table of contents. Because it |
| 1136 |
lacks a \DescRef{\LabelBase.cmd.cleardoubleoddpage} command before |
| 1137 |
\Macro{pagenumbering}, it receives a pagination of the Arabic number 1. |
| 1138 |
Additionally, the final line which sets the page numbering to 1 is |
| 1139 |
superfluous, since this is already done by \Macro{pagenumbering}. |
| 1140 |
|
| 1141 |
Sometimes\,---\,without the initial comment, naturally\,---\, you find: |
| 1142 |
\begin{lstcode} |
| 1143 |
% Attention! This example contains errors! |
| 1144 |
% Please note the explanation in the text! |
| 1145 |
\tableofcontents |
| 1146 |
\pagebreak |
| 1147 |
\pagenumbering{arabic} |
| 1148 |
\setcounter{page}{1} |
| 1149 |
\end{lstcode} |
| 1150 |
Here the creator tried to solve the problem with the final page of the table |
| 1151 |
of contents with the help of \Macro{pagebreak}\IndexCmd{pagebreak}. |
| 1152 |
|
| 1153 |
Unfortunately, this solution is not much better. Here there is a page break |
| 1154 |
after the last page of the table of contents. This may cause entries on the |
| 1155 |
last page of a two-sided document to have excess vertical spacing (see |
| 1156 |
\DescRef{\LabelBase.cmd.flushbottom}, |
| 1157 |
\DescPageRef{\LabelBase.cmd.flushbottom}). \Macro{pagebreak} is clearly |
| 1158 |
the wrong command here. |
| 1159 |
|
| 1160 |
Furthermore, \Macro{newpage}\IndexCmd{newpage} or |
| 1161 |
\DescRef{\LabelBase.cmd.clearpage} would not be sufficient for a two-sided |
| 1162 |
document. For example, if the last page of the table of contents had the |
| 1163 |
Roman numeral vii, the Arabic numbered right-side page 1 would immediately |
| 1164 |
follow the Roman numeral right-side page. A left-side page between the two |
| 1165 |
would be missing, which could cause serious problems with later printing. |
| 1166 |
|
| 1167 |
My advice: Avoid using templates that contain errors with respect to such |
| 1168 |
simple things. Incidentally, the correct way would be: |
| 1169 |
\begin{lstcode} |
| 1170 |
\tableofcontents |
| 1171 |
\cleardoubleoddpage |
| 1172 |
\pagenumbering{arabic} |
| 1173 |
\end{lstcode} |
| 1174 |
This also applies if \Class{scrartcl}\OnlyAt{\Class{scrartcl}} uses a class |
| 1175 |
that usually does not start a new page after the table of contents. If you |
| 1176 |
switch the page numbering, a new right-hand page must be started. If you do |
| 1177 |
not want such a change, you should keep the numbering style of pages |
| 1178 |
consistent throughout the document without changing it in between. |
| 1179 |
\iffalse% Umbruchkorrekturtext |
| 1180 |
For articles or other short documents, this is generally recommended. |
| 1181 |
\fi |
| 1182 |
|
| 1183 |
It is easier to change the numbering style when using |
| 1184 |
\Class{scrbook}\OnlyAt{\Class{scrbook}}. There you have the support of two |
| 1185 |
commands, \DescRef{\LabelBase.cmd.frontmatter}% |
| 1186 |
\important{\DescRef{\LabelBase.cmd.frontmatter}\\ |
| 1187 |
\DescRef{\LabelBase.cmd.mainmatter}}% |
| 1188 |
\IndexCmd{frontmatter} and \DescRef{\LabelBase.cmd.mainmatter}% |
| 1189 |
\IndexCmd{mainmatter}, for the most commonly used switching. For more |
| 1190 |
information, please see |
| 1191 |
\autoref{sec:maincls.separation}, |
| 1192 |
\DescPageRef{\LabelBase.cmd.mainmatter}.% |
| 1193 |
\end{Explain}% |
| 1194 |
\EndIndexGroup |
| 1195 |
\EndIndexGroup |
| 1196 |
|
| 1197 |
|
| 1198 |
\LoadCommonFile{interleafpage}% \section{Interleaf Pages} |
| 1199 |
|
| 1200 |
\LoadCommonFile{footnotes}% \section{Footnotes} |
| 1201 |
|
| 1202 |
\section[Book Structure]{Book Structure\protect\OnlyAt{\Class{scrbook}}} |
| 1203 |
\seclabel{separation} |
| 1204 |
|
| 1205 |
Sometimes books are loosely divided into \emph{front matter}% |
| 1206 |
\Index{front matter}, \emph{main matter}\Index{main matter}, and |
| 1207 |
\emph{back matter}\Index{back matter}. \KOMAScript{} also provides this |
| 1208 |
capability for \Class{scrbook}. |
| 1209 |
|
| 1210 |
|
| 1211 |
\begin{Declaration} |
| 1212 |
\Macro{frontmatter}\OParameter{numbering style} |
| 1213 |
\Macro{frontmatter*} |
| 1214 |
\Macro{mainmatter}\OParameter{numbering style} |
| 1215 |
\Macro{mainmatter*} |
| 1216 |
\Macro{backmatter}\OParameter{numbering style} |
| 1217 |
\Macro{backmatter*} |
| 1218 |
\end{Declaration}% |
| 1219 |
The front matter includes all the material which appears before the main text |
| 1220 |
begins, including title pages, preface, and table of contents. It is initiated |
| 1221 |
with \Macro{frontmatter}\important{\Macro{frontmatter}}. In the front matter, |
| 1222 |
Roman numerals are used for the page |
| 1223 |
numbers. If\ChangedAt{v3.49}{\Class{scrbook}} a different numbering style is |
| 1224 |
to be used, this can be set using an optional argument. All specifications |
| 1225 |
that are also possible for \DescRef{\LabelBase.cmd.pagenumbering}% |
| 1226 |
\important{\DescRef{\LabelBase.cmd.pagenumbering}} from |
| 1227 |
\autoref{sec:\LabelBase.pagestyle}, \DescPageRef{\LabelBase.cmd.pagenumbering} |
| 1228 |
are permitted here. If the page numbering is to be continuous, i.\,e., not |
| 1229 |
changed by \Macro{frontmatter}, either an empty optional argument or the star |
| 1230 |
form \Macro{frontmatter*} can be used. |
| 1231 |
|
| 1232 |
Chapter headings in the front matter are not numbered. However, section |
| 1233 |
headings are numbered consecutively, starting from chapter 0. This typically |
| 1234 |
does not matter, as the front matter is used only for the title pages, table |
| 1235 |
of contents% |
| 1236 |
\Index{table of contents}, lists of figures\Index{list of>figures}% |
| 1237 |
\Index{figures>list of} and tables\Index{tables>list of}, and a |
| 1238 |
preface\Index{preface} or foreword\Index{foreword}. The preface can thus be |
| 1239 |
created as a normal chapter. A preface should be as short as possible and |
| 1240 |
never divided into sections. The preface thus does not require a deeper level |
| 1241 |
of structure than the chapter. |
| 1242 |
|
| 1243 |
If you see things differently and want to use numbered |
| 1244 |
sections\Index{section>number} in the chapters of the front matter, as of |
| 1245 |
version~2.97e,\ChangedAt{v2.97e}{\Class{scrbook}}% |
| 1246 |
\important{\OptionValueRef{\LabelBase}{version}{2.97e}} the section numbering |
| 1247 |
no longer contains the chapter number. This change only takes effect when the |
| 1248 |
compatibility option is set to at least version~2.97e (see option |
| 1249 |
\DescRef{\LabelBase.option.version}, |
| 1250 |
\autoref{sec:\LabelBase.compatibilityOptions}, |
| 1251 |
\DescPageRef{\LabelBase.option.version}). It is explicitly noted that this |
| 1252 |
creates confusion with chapter numbers! The use of |
| 1253 |
\DescRef{\LabelBase.cmd.addsec} and \DescRef{\LabelBase.cmd.section*} (see |
| 1254 |
\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.cmd.section*} and |
| 1255 |
\DescPageRef{\LabelBase.cmd.addsec}) are thus, in the author's opinion, |
| 1256 |
greatly preferable. |
| 1257 |
|
| 1258 |
As of version~2.97e\ChangedAt{v2.97e}{\Class{scrbook}} the numbering of |
| 1259 |
floating environments, such as tables\Index{table>number} and |
| 1260 |
figures\Index{figure>number}, and equation numbers\Index{equation>number} in |
| 1261 |
the front matter also contains no chapter-number part. To take effect, this |
| 1262 |
too requires the corresponding compatibility setting (see the |
| 1263 |
\DescRef{\LabelBase.option.version} option, |
| 1264 |
\autoref{sec:\LabelBase.compatibilityOptions}, |
| 1265 |
\DescPageRef{\LabelBase.option.version}). |
| 1266 |
|
| 1267 |
The part of the book with the main text is introduced with |
| 1268 |
\Macro{mainmatter}\important{\Macro{mainmatter}}. If there is no front matter, |
| 1269 |
you can omit this command. The default page numbering in the main matter uses |
| 1270 |
Arabic numerals and (re)starts the page count at 1 at the start of the main |
| 1271 |
matter. If\ChangedAt{v3.49}{\Class{scrbook}} a different numbering style is to |
| 1272 |
be used, this can be set using an optional argument. All specifications that |
| 1273 |
are also possible for \DescRef{\LabelBase.cmd.pagenumbering}% |
| 1274 |
\important{\DescRef{\LabelBase.cmd.pagenumbering}} from |
| 1275 |
\autoref{sec:\LabelBase.pagestyle}, \DescPageRef{\LabelBase.cmd.pagenumbering} |
| 1276 |
are permitted here. If the page numbering is to be continuous, i.\,e., not |
| 1277 |
changed by \Macro{mainmatter}, either an empty optional argument or the star |
| 1278 |
form \Macro{mainmatter*} can be used. |
| 1279 |
|
| 1280 |
The back matter is introduced with |
| 1281 |
\Macro{backmatter}\important{\Macro{backmatter}}. Opinions differ as to what |
| 1282 |
belongs in the back matter. So in some cases you will find only the |
| 1283 |
bibliography\Index{bibliography}, in some cases only the index\Index{index}, |
| 1284 |
and in other cases both of these as well as the appendices. The chapters in |
| 1285 |
the back matter are similar to the chapters in the front matter, but page |
| 1286 |
numbering is not reset by default. If\ChangedAt{v3.49}{\Class{scrbook}} a |
| 1287 |
different page numbering style is |
| 1288 |
to be used, this can be set using an optional argument. All specifications |
| 1289 |
that are also possible for \DescRef{\LabelBase.cmd.pagenumbering}% |
| 1290 |
\important{\DescRef{\LabelBase.cmd.pagenumbering}} from |
| 1291 |
\autoref{sec:\LabelBase.pagestyle}, \DescPageRef{\LabelBase.cmd.pagenumbering} |
| 1292 |
are permitted here. The star variant \Macro{backmatter*} has the same |
| 1293 |
result as the normal variant \Macro{backmatter} without optional argument or |
| 1294 |
with an empty optional argument.% |
| 1295 |
% |
| 1296 |
\EndIndexGroup |
| 1297 |
|
| 1298 |
|
| 1299 |
\section{Document Structure} |
| 1300 |
\seclabel{structure}% |
| 1301 |
\BeginIndexGroup |
| 1302 |
\BeginIndex{}{document structure} |
| 1303 |
|
| 1304 |
The structure refers to dividing a document into parts, chapters, sections, |
| 1305 |
and additional levels of structure. |
| 1306 |
|
| 1307 |
|
| 1308 |
\begin{Declaration} |
| 1309 |
\OptionVName{open}{method} |
| 1310 |
\end{Declaration}% |
| 1311 |
The\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} \KOMAScript{} classes |
| 1312 |
\Class{scrbook} and \Class{scrreprt} give you the choice of where to start a |
| 1313 |
new chapter with two-sided printing. By default \Class{scrreprt} starts a new |
| 1314 |
chapter\Index{chapter>start} on the next page. This is equivalent to |
| 1315 |
\PName{method} \PValue{any}. However, \Class{scrbook} starts new chapters at |
| 1316 |
the next right-hand page. This is equivalent to \PName{method} \PValue{right} |
| 1317 |
and is usually used in books. But sometimes chapters should start on the |
| 1318 |
left-hand page of a two-page spread. You can accomplish this with the |
| 1319 |
\PName{method} \PValue{left}\ChangedAt{v3.00}{\Class{scrbook}\and |
| 1320 |
\Class{scrreprt}}. You can find a summary of the available values in |
| 1321 |
\autoref{tab:\LabelBase.open}. The table also describes the effects of |
| 1322 |
\DescRef{\LabelBase.cmd.cleardoublepage}, |
| 1323 |
\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1324 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1325 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, and |
| 1326 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage} (see |
| 1327 |
\autoref{sec:\LabelBase.emptypage}, |
| 1328 |
\DescPageRef{\LabelBase.cmd.cleardoublepage}). |
| 1329 |
|
| 1330 |
\begin{table} |
| 1331 |
\caption[{Available values for the \Option{open} option}]{Available values |
| 1332 |
for the \Option{open} option to select page breaks with interleaf pages |
| 1333 |
using \Class{scrbook} or \Class{scrreprt}} |
| 1334 |
\begin{desctabular} |
| 1335 |
\pventry{any}{% |
| 1336 |
Parts, chapter, index, and back matter use |
| 1337 |
\DescRef{\LabelBase.cmd.clearpage}, not |
| 1338 |
\DescRef{\LabelBase.cmd.cleardoublepage}; |
| 1339 |
\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1340 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1341 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1342 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1343 |
\DescRef{\LabelBase.cmd.cleardoublepage} behave the same as using |
| 1344 |
\OptionValue{open}{right}.% |
| 1345 |
\IndexOption{open~=\textKValue{any}}}% |
| 1346 |
\pventry{left}{% |
| 1347 |
Part, chapter, index, and back matter use |
| 1348 |
\DescRef{\LabelBase.cmd.cleardoublepage}; the commands |
| 1349 |
\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1350 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1351 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1352 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1353 |
\DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add |
| 1354 |
an interleaf page\Index{page>interleaf} if needed to reach the next |
| 1355 |
left-hand page.% |
| 1356 |
\IndexOption{open~=\textKValue{left}}}% |
| 1357 |
\pventry{right}{% |
| 1358 |
Part, chapter, index, and back matter use |
| 1359 |
\DescRef{\LabelBase.cmd.cleardoublepage}; the commands |
| 1360 |
\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1361 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1362 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1363 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1364 |
\DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add |
| 1365 |
an interleaf page\Index{page>interleaf} if needed to reach the next |
| 1366 |
right-hand page.% |
| 1367 |
\IndexOption{open~=\textKValue{right}}}% |
| 1368 |
\end{desctabular} |
| 1369 |
\label{tab:\LabelBase.open} |
| 1370 |
\end{table} |
| 1371 |
|
| 1372 |
Since \LaTeX{} does not differentiate between left-hand and right-hand pages |
| 1373 |
in one-sided printing, the option has no effect in that case. |
| 1374 |
|
| 1375 |
In the \Class{scrartcl} class, the section is the first structural element |
| 1376 |
below the part. For this reason, \Class{scrartcl} does not support this |
| 1377 |
option. |
| 1378 |
% |
| 1379 |
\EndIndexGroup |
| 1380 |
|
| 1381 |
|
| 1382 |
\begin{Declaration} |
| 1383 |
\OptionVName{chapterprefix}{simple switch} |
| 1384 |
\OptionVName{appendixprefix}{simple switch} |
| 1385 |
\Macro{IfChapterUsesPrefixLine}\Parameter{then code}\Parameter{else code} |
| 1386 |
\end{Declaration}% |
| 1387 |
With\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} the standard classes |
| 1388 |
\Class{book} and \Class{report}, a chapter |
| 1389 |
heading\Index[indexmain]{chapter>heading} consists of a line with the word |
| 1390 |
``Chapter''\footnote{When using another language the word ``Chapter'' is of |
| 1391 |
course translated to the appropriate language.} followed by the chapter |
| 1392 |
number. The heading itself is set left-justified on the following line. The |
| 1393 |
same effect is obtained in {\KOMAScript} with the \Option{chapterprefix} |
| 1394 |
option. You can use any value from \autoref{tab:truefalseswitch}, |
| 1395 |
\autopageref{tab:truefalseswitch} as the \PName{simple switch}. The default, |
| 1396 |
however, is \OptionValue{chapterprefix}{false}, the opposite |
| 1397 |
behaviour\textnote{\KOMAScript{} vs. standard classes} of that of the standard |
| 1398 |
classes, which corresponds to \OptionValue{chapterprefix}{true}. These options |
| 1399 |
also affect the automatic running heads in the headers (see |
| 1400 |
\autoref{sec:\LabelBase.pagestyle}, |
| 1401 |
\DescPageRef{\LabelBase.pagestyle.headings}). |
| 1402 |
|
| 1403 |
Sometimes you may want to use the simplified chapter headings produced by |
| 1404 |
\OptionValue{chapterprefix}{false} but at the same time to have the heading of |
| 1405 |
an appendix\Index{appendix} preceded by a line with ``Appendix'' followed by |
| 1406 |
the appendix letter. This is achieved by using the \Option{appendixprefix} |
| 1407 |
option (see \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}). |
| 1408 |
Since this results in an inconsistent document layout, I advise against using |
| 1409 |
this option. Ultimately, this option changes the \Option{chapterprefix} option |
| 1410 |
automatically at the beginning of the \DescRef{\LabelBase.cmd.appendix}. |
| 1411 |
|
| 1412 |
You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}} can execute code |
| 1413 |
depending on the current setting for the chapter preceding line using |
| 1414 |
\Macro{IfChapterUsesPrefixLine}. If \Option{chapterprefix} is currently |
| 1415 |
active, the \PName{then code} is executed; otherwise, the \PName{else code} is |
| 1416 |
executed. |
| 1417 |
|
| 1418 |
\BeginIndex{FontElement}{chapterprefix}% |
| 1419 |
You can change the font style of the chapter number line that uses |
| 1420 |
\OptionValue{chapterprefix}{true} or \OptionValue{appendixprefix}{true} |
| 1421 |
by using the |
| 1422 |
\FontElement{chapterprefix}\ChangedAt{v2.96a}{\Class{scrbook}\and |
| 1423 |
\Class{scrreprt}} element with the \DescRef{\LabelBase.cmd.setkomafont} and |
| 1424 |
\DescRef{\LabelBase.cmd.addtokomafont} commands (see |
| 1425 |
\autoref{sec:\LabelBase.textmarkup}, |
| 1426 |
\DescPageRef{\LabelBase.cmd.setkomafont}). The default is to use the |
| 1427 |
\DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} element |
| 1428 |
(see \DescPageRef{\LabelBase.cmd.chapter}, as well as |
| 1429 |
\autoref{tab:\LabelBase.structureElementsFont}, |
| 1430 |
\autopageref{tab:\LabelBase.structureElementsFont}). |
| 1431 |
|
| 1432 |
You can find additional settings for chapter headings in the explanation for |
| 1433 |
\DescRef{maincls-experts.cmd.RedeclareSectionCommand} and the commands |
| 1434 |
\DescRef{maincls-experts.cmd.chapterlineswithprefixformat} and |
| 1435 |
\DescRef{maincls-experts.cmd.chapterlinesformat} in |
| 1436 |
\autoref{sec:maincls-experts.sections}, \autoref{part:forExperts}.% |
| 1437 |
\EndIndexGroup |
| 1438 |
|
| 1439 |
|
| 1440 |
\begin{Declaration} |
| 1441 |
\OptionVName{headings}{setting} |
| 1442 |
\end{Declaration} |
| 1443 |
Headings\index{heading}\index{document structure} of sectioning levels |
| 1444 |
normally use a relatively large font size in both the standard classes and |
| 1445 |
{\KOMAScript}. This choice does not appeal to everyone and is especially |
| 1446 |
problematic for small paper sizes. Consequently, {\KOMAScript} provides, in |
| 1447 |
addition to the large headings defined by the |
| 1448 |
\OptionValue{headings}{big}\IndexOption{headings~=\textKValue{big}}% |
| 1449 |
\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% |
| 1450 |
\important{\OptionValue{headings}{big}\\ |
| 1451 |
\OptionValue{headings}{normal}\\ |
| 1452 |
\OptionValue{headings}{small}} option, the options |
| 1453 |
\OptionValue{headings}{normal}\IndexOption{headings~=\textKValue{normal}} and |
| 1454 |
\OptionValue{headings}{small}\IndexOption{headings~=\textKValue{small}}, which |
| 1455 |
allow for smaller headings. The font sizes resulting from these options for |
| 1456 |
\Class{scrbook} and \Class{scrreprt} are shown in |
| 1457 |
\autoref{tab:\LabelBase.structureElementsFont}, |
| 1458 |
\autopageref{tab:\LabelBase.structureElementsFont}. Specifically, all three |
| 1459 |
settings reset the elements \DescRef{\LabelBase.fontelement.chapter}% |
| 1460 |
\IndexFontElement{chapter}, |
| 1461 |
\DescRef{\LabelBase.fontelement.section}\IndexFontElement{section}, |
| 1462 |
\DescRef{\LabelBase.fontelement.subsection}\IndexFontElement{subsection}, |
| 1463 |
\DescRef{\LabelBase.fontelement.subsubsection}% |
| 1464 |
\IndexFontElement{subsubsection}, |
| 1465 |
\DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph}, and |
| 1466 |
\DescRef{\LabelBase.fontelement.subparagraph}\IndexFontElement{subparagraph} |
| 1467 |
to the corresponding defaults. \Class{scrartcl}\OnlyAt{\Class{scrbook}\and |
| 1468 |
\Class{scrreprt}} generally uses slightly smaller headings. The spacing |
| 1469 |
before and after chapter headings is also reset by these options. |
| 1470 |
|
| 1471 |
\iffalse% |
| 1472 |
Chapter headings also have the \Option{headings} option with the |
| 1473 |
\PValue{twolinechapter} or \PValue{onelinechapter} settings, which are |
| 1474 |
equivalent to the |
| 1475 |
\OptionValueRef{\LabelBase}{chapterprefix}{true} and |
| 1476 |
\OptionValueRef{\LabelBase}{chapterprefix}{false} options. In the appendix |
| 1477 |
there are additional effects of the \PValue{onelineappendix} and |
| 1478 |
\PValue{twolineappendix} options upon the \Option{headings} option, which |
| 1479 |
corresponds to |
| 1480 |
\OptionValueRef{\LabelBase}{appendixprefix}{false} and |
| 1481 |
\OptionValueRef{\LabelBase}{appendixprefix}{true} (see also |
| 1482 |
above). % |
| 1483 |
\else% |
| 1484 |
Chapter headings\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} also |
| 1485 |
have\important{% |
| 1486 |
\OptionValue{headings}{twolinechapter}\\ |
| 1487 |
\OptionValue{headings}{onelinechapter}\\ |
| 1488 |
\OptionValue{headings}{twolineappendix}\\ |
| 1489 |
\OptionValue{headings}{onelineappendix}% |
| 1490 |
} the two options \OptionValue{headings}{twolinechapter} and |
| 1491 |
\OptionValue{headings}{onelinechapter}, which correspond to |
| 1492 |
\OptionValueRef{\LabelBase}{chapterprefix}{true} and |
| 1493 |
\OptionValueRef{\LabelBase}{chapterprefix}{false} explained above. For the |
| 1494 |
appendix, |
| 1495 |
\OptionValueRef{\LabelBase}{appendixprefix}{true} and |
| 1496 |
\OptionValueRef{\LabelBase}{appendixprefix}{false} serve as alternatives for |
| 1497 |
the \OptionValue{headings}{twolineappendix} and |
| 1498 |
\OptionValue{headings}{onelineappendix} options. % |
| 1499 |
\iffalse% |
| 1500 |
For the appendix, \OptionValue{headings}{twolineappendix} and |
| 1501 |
\OptionValue{headings}{onelineappendix} are available, which correspond to |
| 1502 |
the \OptionValueRef{\LabelBase}{appendixprefix}{true} and |
| 1503 |
\OptionValueRef{\LabelBase}{appendixprefix}{false} options (also see above). |
| 1504 |
\fi% |
| 1505 |
Of course, these options do not exist with \Class{scrartcl}% |
| 1506 |
\iffree{}{% Umbruchkorrekturtext |
| 1507 |
, since this class does not have chapters}% |
| 1508 |
.% |
| 1509 |
\fi |
| 1510 |
|
| 1511 |
The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1512 |
\Class{scrartcl}} \OptionValue{headings}{standardclasses}% |
| 1513 |
\important{\OptionValue{headings}{standardclasses}} option adjusts the font |
| 1514 |
sizes of the headings to those of the standard classes. In addition, the font |
| 1515 |
for the \DescRef{\LabelBase.fontelement.disposition}% |
| 1516 |
\IndexFontElement{disposition} element is set to \Macro{bfseries}. It |
| 1517 |
therefore no longer uses a sans-serif font for the headings. If you use |
| 1518 |
\Class{scrbook}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} or |
| 1519 |
\Class{scrreprt}, \OptionValue{headings}{twolinechapter} is also set and the |
| 1520 |
spacing between the chapter headings is adjusted to that of the standard |
| 1521 |
classes. |
| 1522 |
|
| 1523 |
You\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} can set the method to specify |
| 1524 |
the page on which new chapters begin with |
| 1525 |
\OptionValue{headings}{openany}\important{% |
| 1526 |
\OptionValue{headings}{openany}\\ |
| 1527 |
\OptionValue{headings}{openright}\\ |
| 1528 |
\OptionValue{headings}{openleft}}, \OptionValue{headings}{openright}, and |
| 1529 |
\OptionValue{headings}{openleft}, or alternatively with the |
| 1530 |
\DescRef{\LabelBase.option.open} option, which takes the values \PValue{any}, |
| 1531 |
\PValue{right}, and \PValue{left} (see above). |
| 1532 |
|
| 1533 |
Another\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1534 |
\Class{scrartcl}} special feature of \KOMAScript{} is the handling of the |
| 1535 |
optional argument of the sectioning commands \DescRef{\LabelBase.cmd.part}, |
| 1536 |
\DescRef{\LabelBase.cmd.chapter}, etc. down to |
| 1537 |
\DescRef{\LabelBase.cmd.subparagraph}. You can change its function and |
| 1538 |
meaning\important{\OptionValue{headings}{optiontohead}\\ |
| 1539 |
\OptionValue{headings}{optiontotoc}\\ |
| 1540 |
\OptionValue{headings}{optiontoheadandtoc}} with the options |
| 1541 |
\OptionValue{headings}{optiontohead}% |
| 1542 |
\IndexOption{headings~=\textKValue{optiontohead}}, |
| 1543 |
\OptionValue{headings}{optiontotoc}% |
| 1544 |
\IndexOption{headings~=\textKValue{optiontotoc}} and |
| 1545 |
\OptionValue{headings}{optiontoheadandtoc}% |
| 1546 |
\IndexOption{headings~=\textKValue{optiontoheadandtoc}}. |
| 1547 |
|
| 1548 |
See \autoref{tab:\LabelBase.headings} for a summary of all available settings |
| 1549 |
for the \Option{headings} option. The explanations of the sectioning commands |
| 1550 |
below contain examples using some of these settings. |
| 1551 |
\begin{desclist} |
| 1552 |
\desccaption[{Available values for the \Option{headings} option}]{% |
| 1553 |
Available values for the \Option{headings} option to format |
| 1554 |
section headings% |
| 1555 |
\label{tab:\LabelBase.headings}% |
| 1556 |
}{% |
| 1557 |
Available values for the \Option{headings} option (\emph{continued})% |
| 1558 |
}% |
| 1559 |
\pventry{big}{% |
| 1560 |
Use large fonts in the headings for each of the default sectioning levels |
| 1561 |
with wide spacing above and below the titles. |
| 1562 |
\IndexOption{headings~=\textKValue{big}}}% |
| 1563 |
\pventry{normal}{% |
| 1564 |
Use medium-sized fonts in the headings with medium spacing above and below |
| 1565 |
the titles. \IndexOption{headings~=\textKValue{normal}}}% |
| 1566 |
\entry{\PValue{onelineappendix}, \PValue{noappendixprefix}, |
| 1567 |
\PValue{appendixwithoutprefix}, \PValue{appendixwithoutprefixline}% |
| 1568 |
\IndexOption{headings~=\textKValue{onelineappendix}}}{% |
| 1569 |
Chapter headings in the appendix are set like other headings.% |
| 1570 |
}% |
| 1571 |
\entry{\PValue{onelinechapter}, \PValue{nochapterprefix}, |
| 1572 |
\PValue{chapterwithoutprefix}, \PValue{chapterwithoutprefixline}% |
| 1573 |
\IndexOption{headings~=\textKValue{onelinechapter}}}{% |
| 1574 |
Chapter titles are set like other headings.% |
| 1575 |
}% |
| 1576 |
\pventry{openany}{% |
| 1577 |
The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1578 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1579 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1580 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1581 |
\DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert |
| 1582 |
an interleaf page\Index{interleaf page} if needed to reach the next |
| 1583 |
right-hand page in two-sided printing, the same as in |
| 1584 |
\OptionValue{headings}{openright}. Parts, chapter, the index, and back |
| 1585 |
matter use \DescRef{\LabelBase.cmd.clearpage} instead of |
| 1586 |
\DescRef{\LabelBase.cmd.cleardoublepage}.% |
| 1587 |
\IndexOption{headings~=\textKValue{openany}}}% |
| 1588 |
\pventry{openleft}{% |
| 1589 |
The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1590 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1591 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1592 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1593 |
\DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert |
| 1594 |
an interleaf page if needed to reach the next left-hand page in two-sided |
| 1595 |
printing. Part, chapter, index and back matter use |
| 1596 |
\DescRef{\LabelBase.cmd.cleardoublepage}.% |
| 1597 |
\IndexOption{headings~=\textKValue{openleft}}}% |
| 1598 |
\pventry{openright}{% |
| 1599 |
The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, |
| 1600 |
\DescRef{\LabelBase.cmd.cleardoublestandardpage}, |
| 1601 |
\DescRef{\LabelBase.cmd.cleardoubleplainpage}, |
| 1602 |
\DescRef{\LabelBase.cmd.cleardoubleemptypage}, and |
| 1603 |
\DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert |
| 1604 |
an interleaf page if needed to reach the next right-hand page in two-sided |
| 1605 |
printing. Part, chapter, index and back matter use |
| 1606 |
\DescRef{\LabelBase.cmd.cleardoublepage}.% |
| 1607 |
\IndexOption{headings~=\textKValue{openright}}}% |
| 1608 |
\pventry{optiontohead}{% |
| 1609 |
The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1610 |
\Class{scrartcl}} advanced functionality of the optional argument of the |
| 1611 |
sectioning commands \DescRef{\LabelBase.cmd.part} down to |
| 1612 |
\DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the |
| 1613 |
optional argument is used only for the running head.% |
| 1614 |
\IndexOption{headings~=\textKValue{optiontohead}}% |
| 1615 |
}% |
| 1616 |
\entry{\PValue{optiontoheadandtoc}, \PValue{optiontotocandhead}% |
| 1617 |
\IndexOption{headings~=\textKValue{optiontoheadandtoc}}}{% |
| 1618 |
The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1619 |
\Class{scrartcl}} advanced functionality of the optional argument of the |
| 1620 |
sectioning commands \DescRef{\LabelBase.cmd.part} down to |
| 1621 |
\DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the |
| 1622 |
optional argument is used for the running head and the table of contents.% |
| 1623 |
}% |
| 1624 |
\pventry{optiontotoc}{% |
| 1625 |
The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1626 |
\Class{scrartcl}} advanced functionality of the optional argument of the |
| 1627 |
sectioning commands \DescRef{\LabelBase.cmd.part} down to |
| 1628 |
\DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the |
| 1629 |
optional argument is used only for the table of contents.% |
| 1630 |
\IndexOption{headings~=\textKValue{optiontohead}}% |
| 1631 |
}% |
| 1632 |
\pventry{small}{% |
| 1633 |
Use small fonts in the headings with small spacing above and below the |
| 1634 |
titles.% |
| 1635 |
\IndexOption{headings~=\textKValue{small}}}% |
| 1636 |
\pventry{standardclasses}{% |
| 1637 |
\ChangedAt{v3.12}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% |
| 1638 |
Reset the font settings for each of the standard sectioning levels and use |
| 1639 |
headings with the sizes of the standard classes. For chapter headings, |
| 1640 |
\Class{scrbook} and \Class{scrreprt} set |
| 1641 |
\OptionValue{headings}{twolinechapter}.% |
| 1642 |
}% |
| 1643 |
\entry{\PValue{twolineappendix}, \PValue{appendixprefix}, |
| 1644 |
\PValue{appendixwithprefix}, \PValue{appendixwithprefixline}% |
| 1645 |
\IndexOption{headings~=\textKValue{twolineappendix}}}{% |
| 1646 |
Chapter titles in the appendix are set with a number line whose format is |
| 1647 |
determined by |
| 1648 |
\DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% |
| 1649 |
}% |
| 1650 |
\entry{\PValue{twolinechapter}, \PValue{chapterprefix}, |
| 1651 |
\PValue{chapterwithprefix}, \PValue{chapterwithprefixline}% |
| 1652 |
\IndexOption{headings~=\textKValue{twolinechapter}}}{% |
| 1653 |
Chapter titles are set with a number line whose format is determined by |
| 1654 |
\DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% |
| 1655 |
}% |
| 1656 |
\end{desclist} |
| 1657 |
% |
| 1658 |
\EndIndexGroup |
| 1659 |
|
| 1660 |
|
| 1661 |
\begin{Declaration} |
| 1662 |
\OptionVName{numbers}{setting} |
| 1663 |
\end{Declaration}% |
| 1664 |
According to {\small DUDEN}, if only Arabic numerals are used to number |
| 1665 |
section headings\Index{headings}, the German practice is to have no point at |
| 1666 |
the end (see \cite[R\,3]{DUDEN}). On the other hand, if Roman numerals or |
| 1667 |
letters appear in the numbering, then a point should appear at the end of the |
| 1668 |
numbering (see \cite[R\,4]{DUDEN}). {\KOMAScript} has a mechanism that tries |
| 1669 |
to automate this somewhat complex rule. The result is that normally after |
| 1670 |
the sectioning commands \DescRef{\LabelBase.cmd.part} and |
| 1671 |
\DescRef{\LabelBase.cmd.appendix} the numbering switches to using a final |
| 1672 |
point. This information is saved in the \File{aux} file and takes effect on |
| 1673 |
the next {\LaTeX} run. |
| 1674 |
|
| 1675 |
Sometimes the mechanism for placing or omitting the final point may fail. |
| 1676 |
Sometimes other languages have different rules. Therefore you can force the |
| 1677 |
use of the final point with the option |
| 1678 |
\OptionValue{numbers}{endperiod}\IndexOption{numbers~=\textKValue{endperiod}}% |
| 1679 |
\important{\OptionValue{numbers}{endperiod}\\ |
| 1680 |
\OptionValue{numbers}{noendperiod}} or to prohibit it with |
| 1681 |
\OptionValue{numbers}{noendperiod}. |
| 1682 |
|
| 1683 |
Note\textnote{Attention!} that this mechanism only takes effect on the |
| 1684 |
next {\LaTeX} run. Therefore, before you try to use these options to force |
| 1685 |
the correct numbering format, you should always perform another \LaTeX{} run |
| 1686 |
without modifying the document. |
| 1687 |
|
| 1688 |
When using the language setting \PValue{russian} of the package |
| 1689 |
\Package{polyglossia}\IndexPackage{polyglossia}\important{\Package{polyglossia}}, |
| 1690 |
the setting of the option is overwritten by redefining |
| 1691 |
\DescRef{\LabelBase.cmd.autodot}. Subsequent setting of the option then also |
| 1692 |
has no effect. However, from version 1.50a the package offers an option to |
| 1693 |
switch off this very restrictive behaviour. More details can be found in the |
| 1694 |
manual \cite{package:polyglossia}. |
| 1695 |
|
| 1696 |
You can find a summary of the available values for the \PName{setting} of |
| 1697 |
\PName{numbers} in \autoref{tab:\LabelBase.numbers}. Unlike most other |
| 1698 |
settings, this option can only be set in the document preamble, i.\,e. before |
| 1699 |
\Macro{begin}\PParameter{document}. |
| 1700 |
|
| 1701 |
\begin{table} |
| 1702 |
\caption[{Available values for the \Option{numbers} option}]{Available values |
| 1703 |
of the \Option{numbers} option to configure the final points of the |
| 1704 |
numbers for section headings} |
| 1705 |
\label{tab:\LabelBase.numbers} |
| 1706 |
\begin{desctabular} |
| 1707 |
\entry{\PValue{autoendperiod}, \PValue{autoenddot}, \PValue{auto}}{% |
| 1708 |
\KOMAScript{} decides whether to set the point at the end of sectioning |
| 1709 |
command numbers. If there are only Arabic numerals, the point will |
| 1710 |
be omitted. If a letter or Roman numeral is found, the |
| 1711 |
point is set. However, references to these numbers are set without |
| 1712 |
a final point.% |
| 1713 |
\IndexOption{numbers~=\textKValue{autoendperiod}}}% |
| 1714 |
\entry{\PValue{endperiod}, \PValue{withendperiod}, \PValue{periodatend}, |
| 1715 |
\PValue{enddot}, \PValue{withenddot}, \PValue{dotatend}}{% |
| 1716 |
All numbers of sectioning commands and their subordinate numbers are set |
| 1717 |
with a final point. Only references will be set without the final |
| 1718 |
point.% |
| 1719 |
\IndexOption{numbers~=\textKValue{endperiod}}}% |
| 1720 |
\entry{\PValue{noendperiod}, \PValue{noperiodatend}, |
| 1721 |
\PValue{noenddot}, \PValue{nodotatend}}{% |
| 1722 |
All numbers of sectioning commands are set without a final point.% |
| 1723 |
\IndexOption{numbers~=\textKValue{noendperiod}}}% |
| 1724 |
\end{desctabular} |
| 1725 |
\end{table} |
| 1726 |
% |
| 1727 |
\EndIndexGroup |
| 1728 |
|
| 1729 |
|
| 1730 |
\begin{Declaration} |
| 1731 |
\Option{chapteratlists}% |
| 1732 |
\OptionVName{chapteratlists}{value} |
| 1733 |
\end{Declaration}% |
| 1734 |
As mentioned in \autoref{sec:\LabelBase.floats}, |
| 1735 |
\DescPageRef{\LabelBase.option.listof}\OnlyAt{\Class{scrbook}\and |
| 1736 |
\Class{scrreprt}}, every chapter that is created with |
| 1737 |
\DescRef{\LabelBase.cmd.chapter} normally inserts a vertical space in the |
| 1738 |
lists of floating environments (e.\,g., tables and figures). |
| 1739 |
Since version~2.96a,\important{\OptionValueRef{\LabelBase}{version}{2.96a}}% |
| 1740 |
\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}} this also applies to |
| 1741 |
the \DescRef{\LabelBase.cmd.addchap} command unless you choose a compatibility |
| 1742 |
setting for an earlier version (see the \DescRef{\LabelBase.option.version} |
| 1743 |
option in \autoref{sec:\LabelBase.compatibilityOptions}, |
| 1744 |
\DescPageRef{\LabelBase.option.version}). |
| 1745 |
|
| 1746 |
In addition, you can use the \Option{chapteratlists} option to change the |
| 1747 |
vertical spacing by specifying the desired distance as the \PName{value}. |
| 1748 |
The default with \OptionValueRef{\LabelBase}{listof}{chaptergapsmall}% |
| 1749 |
\IndexOption{listof~=\textKValue{chaptergapsmall}} % |
| 1750 |
is 10\Unit{pt} (see the\DescRef{\LabelBase.option.version} option in |
| 1751 |
\autoref{sec:\LabelBase.compatibilityOptions}, |
| 1752 |
\DescPageRef{\LabelBase.option.version}). |
| 1753 |
|
| 1754 |
If you use \OptionValue{chapteratlists}{entry}% |
| 1755 |
\IndexOption{chapteratlists~=\textKValue{entry}}% |
| 1756 |
\important{\OptionValue{chapteratlists}{entry}} or \Option{chapteratlists} |
| 1757 |
without specifying a value, instead of a vertical space, the chapter entry |
| 1758 |
itself will be entered into the lists. Note that such an entry occurs even if |
| 1759 |
the chapter does not contain a floating environment. A method where only |
| 1760 |
chapters with floating environments are displayed in the respective list can |
| 1761 |
be found in the German-language \KOMAScript{} forum at |
| 1762 |
\cite{https://komascript.de/comment/5070}. |
| 1763 |
|
| 1764 |
Please\textnote{Attention!} note that changes to this option only takes |
| 1765 |
effect after two additional {\LaTeX} runs.% |
| 1766 |
% |
| 1767 |
\EndIndexGroup |
| 1768 |
|
| 1769 |
|
| 1770 |
\begin{Declaration} |
| 1771 |
\Macro{part}\OParameter{short version}\Parameter{heading}% |
| 1772 |
\Macro{chapter}\OParameter{short version}\Parameter{heading}% |
| 1773 |
\Macro{section}\OParameter{short version}\Parameter{heading}% |
| 1774 |
\Macro{subsection}\OParameter{short version}\Parameter{heading}% |
| 1775 |
\Macro{subsubsection}\OParameter{short version}\Parameter{heading}% |
| 1776 |
\Macro{paragraph}\OParameter{short version}\Parameter{heading}% |
| 1777 |
\Macro{subparagraph}\OParameter{short version}\Parameter{heading} |
| 1778 |
\end{Declaration}% |
| 1779 |
\Index[indexmain]{part}% |
| 1780 |
\Index[indexmain]{chapter}% |
| 1781 |
\Index[indexmain]{section}% |
| 1782 |
The standard sectioning commands in {\KOMAScript} work the same way as those |
| 1783 |
in the standard classes. Thus, you can specify an alternative text for the |
| 1784 |
table of contents and running heads as an optional argument to the sectioning |
| 1785 |
commands. |
| 1786 |
|
| 1787 |
However, with\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1788 |
\Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} the |
| 1789 |
\important{\DescRef{\LabelBase.option.headings}} |
| 1790 |
\OptionValueRef{\LabelBase}{headings}{optiontohead}% |
| 1791 |
\IndexOption[indexmain]{headings~=\textKValue{optiontohead}} option, |
| 1792 |
\KOMAScript{} only uses the optional argument \PName{short version} in the |
| 1793 |
running head, not the table of contents. Of course, this text will only appear |
| 1794 |
if you use a page style\Index{page>style} that puts the corresponding |
| 1795 |
sectioning level in the running head. See \autoref{sec:\LabelBase.pagestyle} |
| 1796 |
and \autoref{cha:scrlayer-scrpage}. With the |
| 1797 |
\OptionValueRef{\LabelBase}{headings}{optiontotoc}% |
| 1798 |
\IndexOption[indexmain]{headings~=\textKValue{optiontotoc}} option, |
| 1799 |
\KOMAScript{} uses the optional argument \PName{short version} exclusively for |
| 1800 |
the table of contents and not the running head. However, the entry will be |
| 1801 |
shown only if the \DescRef{\LabelBase.counter.tocdepth} counter is great |
| 1802 |
enough (see \autoref{sec:\LabelBase.toc}, |
| 1803 |
\DescPageRef{\LabelBase.counter.tocdepth}). With the |
| 1804 |
\OptionValueRef{\LabelBase}{headings}{optiontoheadandtoc}% |
| 1805 |
\IndexOption[indexmain]{headings~=\textKValue{optiontoheadandtoc}} option, |
| 1806 |
\KOMAScript{} uses the optional argument \PName{short version} in both the |
| 1807 |
table of contents and the running head. These three options all activate the |
| 1808 |
extended interpretation of the optional argument \PName{short version}, which |
| 1809 |
is not active by default. |
| 1810 |
|
| 1811 |
The \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1812 |
\Class{scrartcl}} extended interpretation of the optional argument checks to |
| 1813 |
see if there is an equals sign in \PName{short version}. If so, the optional |
| 1814 |
argument will be interpreted as an \PName{option list}. |
| 1815 |
Three options\,---\,\OptionVName{head}{running head}\important{\Option{head}\\ |
| 1816 |
\Option{tocentry}\\ |
| 1817 |
\Option{reference}\\ |
| 1818 |
\Option{nonumber}}, \OptionVName{tocentry}{table of contents entry}, |
| 1819 |
\OptionVName{reference}{reference title}% |
| 1820 |
\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}, |
| 1821 |
and \OptionVName{nonumber}{simple switch}\ChangedAt{v3.27}{\Class{scrbook}\and |
| 1822 |
\Class{scrreprt}\and \Class{scrartcl}}\,---\,are supported with this |
| 1823 |
format. To use commas or equals signs within the values of those options, you |
| 1824 |
must enclose them in braces. |
| 1825 |
|
| 1826 |
Please\textnote{Attention!} note that this mechanism only works as long as |
| 1827 |
\KOMAScript{} controls the sectioning commands. If you use package that |
| 1828 |
redefines the \KOMAScript{}'s or the internal \LaTeX{} kernel's sectioning |
| 1829 |
commands, \KOMAScript{} can no longer provide this extended mechanism. This |
| 1830 |
also applies to a \KOMAScript{} extension that is always active: sectioning |
| 1831 |
commands with no heading text\textnote{empty headings} do not create entries |
| 1832 |
in the table of contents. If you really want an entry with empty heading text, |
| 1833 |
you can use an invisible entry like \lstinline|\mbox{}|. |
| 1834 |
|
| 1835 |
\begin{Example} |
| 1836 |
Suppose you have a document with very long chapter headings. These headings |
| 1837 |
should appear in the table of contents, but you want to limit the running |
| 1838 |
head to short, single-line headings. You can do this with the optional |
| 1839 |
argument of \Macro{chapter}. |
| 1840 |
\begin{lstcode} |
| 1841 |
\chapter[short version of chapter heading] |
| 1842 |
{The Sectioning Command for Chapters |
| 1843 |
Supports not only the Heading Text |
| 1844 |
Itself but also a Short Version Whose |
| 1845 |
Use can be Controlled} |
| 1846 |
\end{lstcode} |
| 1847 |
|
| 1848 |
A little later you realize that the line breaks for this long heading are |
| 1849 |
very inappropriate. You therefore want to choose the breaks |
| 1850 |
yourself. Nevertheless, you still want automatic line breaking in the table |
| 1851 |
of contents. With |
| 1852 |
\begin{lstcode} |
| 1853 |
\chapter[head={short version of chapter heading}, |
| 1854 |
tocentry={The Sectioning |
| 1855 |
Command for Chapters Supports not |
| 1856 |
only the Heading Text Itself but |
| 1857 |
also a Short Version Whose Use |
| 1858 |
can be Controlled}] |
| 1859 |
{The Sectioning\\ |
| 1860 |
Command for Chapters\\ |
| 1861 |
Supports not only\\ |
| 1862 |
the Heading Text Itself\\ |
| 1863 |
but also\\ |
| 1864 |
a Short Version Whose\\ |
| 1865 |
Use can be Controlled} |
| 1866 |
\end{lstcode} |
| 1867 |
you create separate entries for the table of contents, running head, and |
| 1868 |
chapter heading itself. The arguments of the options \Option{head} and |
| 1869 |
\Option{tocentry} have been enclosed in braces so their contents |
| 1870 |
can be arbitrary. |
| 1871 |
|
| 1872 |
The need for braces in the example above is best illustrated by another |
| 1873 |
example. Suppose you chose the |
| 1874 |
\OptionValueRef{\LabelBase}{headings}{optiontotoc} option and set the title |
| 1875 |
this way: |
| 1876 |
\begin{lstcode} |
| 1877 |
\section[head=\emph{value}] |
| 1878 |
{Option head=\emph{value}} |
| 1879 |
\end{lstcode} |
| 1880 |
This results in the entry ``Option head=\emph{value}'' in the table of |
| 1881 |
contents but ``\emph{value}'' in the running head. But surely you wanted the |
| 1882 |
entry ``head=\emph{value}'' in the table of contents and the complete |
| 1883 |
heading text in the running head. You can do this using braces: |
| 1884 |
\begin{lstcode} |
| 1885 |
\section[head{=}\emph{value}] |
| 1886 |
{Option head=\emph{value}} |
| 1887 |
\end{lstcode} |
| 1888 |
|
| 1889 |
A similar case concerns the comma. Using the same |
| 1890 |
\DescRef{\LabelBase.option.headings} option as before |
| 1891 |
\begin{lstcode} |
| 1892 |
\section[head=0, 1, 2, 3, \dots] |
| 1893 |
{Natural Numbers Including the Zero} |
| 1894 |
\end{lstcode} |
| 1895 |
results in an error because the comma is interpreted as the |
| 1896 |
separator between the individual options of the option list % |
| 1897 |
``\lstinline|0, 1, 2, 3, \dots|''. But writing |
| 1898 |
\begin{lstcode} |
| 1899 |
\section[head={0, 1, 2, 3, \dots}] |
| 1900 |
{Natural Numbers Including the Zero} |
| 1901 |
\end{lstcode} |
| 1902 |
makes ``\lstinline|0, 1, 2, 3, \dots|'' the argument of |
| 1903 |
the \Option{head} option. |
| 1904 |
\end{Example} |
| 1905 |
|
| 1906 |
Like\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1907 |
\Class{scrartcl}} setting the title of a running head with the \Option{head} |
| 1908 |
option, or setting the title of a table-of-contents entry with the |
| 1909 |
\Option{tocentry} option, you can set the title of a reference with the |
| 1910 |
\Package{nameref}\IndexPackage{nameref}\important{\Package{nameref}\\ |
| 1911 |
\Package{titleref}\\ |
| 1912 |
\Package{zref-titleref}} or |
| 1913 |
\Package{titleref}\IndexPackage{titleref} packages, or with the |
| 1914 |
\Package{titleref}\IndexPackage{zref-titleref} module of the |
| 1915 |
\Package{zref}\IndexPackage{zref} package, using the \Option{reference}% |
| 1916 |
\important{\Option{reference}} option. Note that the support for the |
| 1917 |
\Package{titleref} package is rather rudimentary, since that package's |
| 1918 |
performance is poor compared to the other two, and it is not fully compatible |
| 1919 |
with \Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}}. |
| 1920 |
|
| 1921 |
You can deactivate the numbering using |
| 1922 |
\OptionValue{nonumber}{true}\important{\Option{nonumber}}% |
| 1923 |
\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} |
| 1924 |
in the extended optional argument. In contrast to the |
| 1925 |
\hyperref[desc:maincls.cmd.part*]{starred versions of the sectioning commands} |
| 1926 |
explained below, the titles will still be added to the table of contents and, |
| 1927 |
if applicable, used for the running head. For \Macro{part}, \Macro{chapter}, |
| 1928 |
and \Macro{section}, using \OptionValue{nonumber}{true} this essentially |
| 1929 |
corresponds to the \DescRef{\LabelBase.cmd.addpart}, |
| 1930 |
\DescRef{\LabelBase.cmd.addchap}, and \DescRef{\LabelBase.cmd.addsec} |
| 1931 |
commands, which are explained on \DescPageRef{\LabelBase.cmd.addpart}. |
| 1932 |
|
| 1933 |
The part-level title\important{\Macro{part}} (\Macro{part}) differs from other |
| 1934 |
sectioning levels by being numbered independently. This means that the chapter |
| 1935 |
level (in \Class{scrbook} or \Class{scrreprt}), or the section level (in |
| 1936 |
\Class{scrartcl}) is numbered consecutively over all parts. Furthermore, for |
| 1937 |
the \Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and |
| 1938 |
\Class{scrreprt} classes, the title of the part level together with the |
| 1939 |
corresponding preamble (see \DescRef{\LabelBase.cmd.setpartpreamble}, |
| 1940 |
\DescPageRef{\LabelBase.cmd.setpartpreamble}) is set on a separate page. |
| 1941 |
|
| 1942 |
The \Macro{chapter}\important{\Macro{chapter}}\OnlyAt{\Class{scrbook}\and |
| 1943 |
\Class{scrreprt}} command only exists in the book and report classes, that |
| 1944 |
is, in \Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreprt}, |
| 1945 |
but not in the article classes \Class{article} and \Class{scrartcl}. |
| 1946 |
Furthermore, the \Macro{chapter}\textnote{\KOMAScript{} vs. standard classes} |
| 1947 |
command in {\KOMAScript} differs substantially from the version in the |
| 1948 |
standard classes. In the standard classes, the chapter number is used together |
| 1949 |
with the prefix ``Chapter'', or the corresponding word in the appropriate |
| 1950 |
language, on a separate line above the actual chapter title text. |
| 1951 |
\KOMAScript{} replaces this |
| 1952 |
overpowering\important{\DescRef{\LabelBase.option.chapterprefix}\\ |
| 1953 |
\DescRef{\LabelBase.option.appendixprefix}} style with a simple chapter |
| 1954 |
number before the chapter title, but you can restore the original behaviour |
| 1955 |
with the \DescRef{\LabelBase.option.chapterprefix} option (see |
| 1956 |
\DescPageRef{\LabelBase.option.chapterprefix}). |
| 1957 |
|
| 1958 |
Please\textnote{Attention!} note that \Macro{part} and \Macro{chapter} in the |
| 1959 |
\Class{scrbook} and \Class{scrreprt} |
| 1960 |
\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} classes change the page style for |
| 1961 |
one page. The page style applied in {\KOMAScript} is defined in the macros |
| 1962 |
\DescRef{\LabelBase.cmd.partpagestyle} and |
| 1963 |
\DescRef{\LabelBase.cmd.chapterpagestyle} (see |
| 1964 |
\autoref{sec:\LabelBase.pagestyle}, |
| 1965 |
\DescPageRef{\LabelBase.cmd.titlepagestyle}). |
| 1966 |
|
| 1967 |
\BeginIndexGroup |
| 1968 |
\BeginIndex[indexother]{}{font}% |
| 1969 |
\BeginIndex[indexother]{}{font>style}% |
| 1970 |
\BeginIndex[indexother]{}{font>size}% |
| 1971 |
\BeginIndex{FontElement}{part}\LabelFontElement{part}% |
| 1972 |
\BeginIndex{FontElement}{partnumber}\LabelFontElement{partnumber}% |
| 1973 |
\BeginIndex{FontElement}{chapter}\LabelFontElement{chapter}% |
| 1974 |
\BeginIndex{FontElement}{chapterprefix}\LabelFontElement{chapterprefix}% |
| 1975 |
\BeginIndex{FontElement}{section}\LabelFontElement{section}% |
| 1976 |
\BeginIndex{FontElement}{subsection}\LabelFontElement{subsection}% |
| 1977 |
\BeginIndex{FontElement}{subsubsection}\LabelFontElement{subsubsection}% |
| 1978 |
\BeginIndex{FontElement}{paragraph}\LabelFontElement{paragraph}% |
| 1979 |
\BeginIndex{FontElement}{subparagraph}\LabelFontElement{subparagraph}% |
| 1980 |
\BeginIndex{FontElement}{disposition}\LabelFontElement{disposition}% |
| 1981 |
You\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and |
| 1982 |
\Class{scrartcl}} can change the font style for all headings with the |
| 1983 |
\DescRef{\LabelBase.cmd.setkomafont}\IndexCmd{setkomafont} and |
| 1984 |
\DescRef{\LabelBase.cmd.addtokomafont}\IndexCmd{addtokomafont} commands (see |
| 1985 |
\autoref{sec:\LabelBase.textmarkup}, |
| 1986 |
\DescPageRef{\LabelBase.cmd.setkomafont}). In doing so, the element |
| 1987 |
\FontElement{disposition}\important{\FontElement{disposition}} is applied |
| 1988 |
first, followed by the specific element\important{% |
| 1989 |
\FontElement{part}\\ |
| 1990 |
\FontElement{chapter}\\ |
| 1991 |
\FontElement{section}\\ |
| 1992 |
\FontElement{subsection}\\ |
| 1993 |
\FontElement{paragraph}\\ |
| 1994 |
\FontElement{subparagraph}} for each sectioning level (see |
| 1995 |
\autoref{tab:\LabelBase.fontelements}, |
| 1996 |
\autopageref{tab:\LabelBase.fontelements}). There is a separate elements, |
| 1997 |
\FontElement{partnumber}, for the number of the part heading, and |
| 1998 |
\FontElement{chapterprefix}, for the optional prefix line of chapter headings. |
| 1999 |
The initial definition for the \FontElement{disposition} element is |
| 2000 |
\ChangedAt{v3.39}{\Class{scrbook}\and \Class{scrartcl}\and \Class{scrreprt}}% |
| 2001 |
\Macro{normalcolor}\linebreak[2]% |
| 2002 |
\DescRef{\LabelBase.cmd.maybesffamily}\IndexCmd{maybysffamily}\linebreak[2]% |
| 2003 |
\Macro{bfseries}. |
| 2004 |
The default font sizes for the specific elements depends on the options |
| 2005 |
\OptionValueRef{\LabelBase}{headings}{big}, |
| 2006 |
\OptionValueRef{\LabelBase}{headings}{normal}, and |
| 2007 |
\OptionValueRef{\LabelBase}{headings}{small} (see |
| 2008 |
\DescPageRef{\LabelBase.option.headings}). They are listed in |
| 2009 |
\autoref{tab:\LabelBase.structureElementsFont}. |
| 2010 |
% Umbruchkorrektur: Tabelle verschoben |
| 2011 |
\begin{table} |
| 2012 |
% \centering% |
| 2013 |
% \caption |
| 2014 |
\KOMAoptions{captions=topbeside}% |
| 2015 |
\setcapindent{0pt}% |
| 2016 |
\begin{captionbeside}[{Default font sizes for different levels of document |
| 2017 |
sectioning}]{% |
| 2018 |
\label{tab:\LabelBase.structureElementsFont}% |
| 2019 |
Default font sizes for different levels of document sectioning in |
| 2020 |
\Class{scrbook} and \Class{scrreprt}}[l] |
| 2021 |
\begin{tabular}[t]{lll} |
| 2022 |
\toprule |
| 2023 |
Class Option & Element & Default\\ |
| 2024 |
\midrule |
| 2025 |
\OptionValueRef{\LabelBase}{headings}{big} |
| 2026 |
& \DescRef{\LabelBase.fontelement.part}\IndexFontElement{part} |
| 2027 |
& \Macro{Huge} \\ |
| 2028 |
& \DescRef{\LabelBase.fontelement.partnumber}% |
| 2029 |
\IndexFontElement{partnumber} |
| 2030 |
& \Macro{huge} \\ |
| 2031 |
& \DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} |
| 2032 |
& \Macro{huge} \\ |
| 2033 |
& \DescRef{\LabelBase.fontelement.chapterprefix}% |
| 2034 |
\IndexFontElement{chapterprefix} |
| 2035 |
& \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ |
| 2036 |
& \DescRef{\LabelBase.fontelement.section}\IndexFontElement{section} |
| 2037 |
& \Macro{Large} \\ |
| 2038 |
& \DescRef{\LabelBase.fontelement.subsection}% |
| 2039 |
\IndexFontElement{subsection} |
| 2040 |
& \Macro{large} \\ |
| 2041 |
& \DescRef{\LabelBase.fontelement.subsubsection}% |
| 2042 |
\IndexFontElement{subsubsection} |
| 2043 |
& \Macro{normalsize} \\ |
| 2044 |
& \DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph} |
| 2045 |
& \Macro{normalsize} \\ |
| 2046 |
& \DescRef{\LabelBase.fontelement.subparagraph}% |
| 2047 |
\IndexFontElement{subparagraph} |
| 2048 |
& \Macro{normalsize} \\[1ex] |
| 2049 |
\OptionValueRef{\LabelBase}{headings}{normal} |
| 2050 |
& \DescRef{\LabelBase.fontelement.part} & \Macro{huge} \\ |
| 2051 |
& \DescRef{\LabelBase.fontelement.partnumber} & \Macro{huge} \\ |
| 2052 |
& \DescRef{\LabelBase.fontelement.chapter} & \Macro{LARGE} \\ |
| 2053 |
& \FontElement{chapterprefix}\IndexFontElement{chapterprefix} |
| 2054 |
& \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ |
| 2055 |
& \DescRef{\LabelBase.fontelement.section} & \Macro{Large} \\ |
| 2056 |
& \DescRef{\LabelBase.fontelement.subsection} & \Macro{large} \\ |
| 2057 |
& \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ |
| 2058 |
& \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ |
| 2059 |
& \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize} \\[1ex] |
| 2060 |
\OptionValueRef{\LabelBase}{headings}{small} |
| 2061 |
& \DescRef{\LabelBase.fontelement.part} & \Macro{LARGE} \\ |
| 2062 |
& \DescRef{\LabelBase.fontelement.partnumber} & \Macro{LARGE} \\ |
| 2063 |
& \DescRef{\LabelBase.fontelement.chapter} & \Macro{Large} \\ |
| 2064 |
& \FontElement{chapterprefix}\IndexFontElement{chapterprefix} |
| 2065 |
& \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ |
| 2066 |
& \DescRef{\LabelBase.fontelement.section} & \Macro{large} \\ |
| 2067 |
& \DescRef{\LabelBase.fontelement.subsection} & \Macro{normalsize} \\ |
| 2068 |
& \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ |
| 2069 |
& \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ |
| 2070 |
& \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize}\\ |
| 2071 |
\bottomrule |
| 2072 |
\end{tabular} |
| 2073 |
\end{captionbeside} |
| 2074 |
\end{table} |
| 2075 |
% |
| 2076 |
\begin{Example} |
| 2077 |
Suppose you use the \OptionValueRef{\LabelBase}{headings}{big} class option |
| 2078 |
and notice that the very large headings of the document parts are too bold. |
| 2079 |
You could change this as follows: |
| 2080 |
\begin{lstcode} |
| 2081 |
\setkomafont{disposition}{\normalcolor\maybesffamily} |
| 2082 |
\part{Appendices} |
| 2083 |
\addtokomafont{disposition}{\bfseries} |
| 2084 |
\end{lstcode} |
| 2085 |
Using the command above you only switch off the font attribute |
| 2086 |
\textbf{bold} for a heading ``Appendices''. A much more convenient |
| 2087 |
and elegant solution is to change all \Macro{part} headings at once. |
| 2088 |
This is done either by: |
| 2089 |
\begin{lstcode} |
| 2090 |
\addtokomafont{part}{\normalfont\maybesffamily} |
| 2091 |
\addtokomafont{partnumber}{\normalfont\maybesffamily} |
| 2092 |
\end{lstcode} |
| 2093 |
or simply: |
| 2094 |
\begin{lstcode} |
| 2095 |
\addtokomafont{part}{\mdseries} |
| 2096 |
\addtokomafont{partnumber}{\mdseries} |
| 2097 |
\end{lstcode} |
| 2098 |
The second version is preferred because it gives you the correct result |
| 2099 |
even if you change the \DescRef{\LabelBase.fontelement.disposition} |
| 2100 |
element\IndexFontElement{disposition}, for instance: |
| 2101 |
\begin{lstcode} |
| 2102 |
\setkomafont{disposition}{\normalcolor\bfseries} |
| 2103 |
\end{lstcode} |
| 2104 |
With this change, it is possible to set all section levels at once to no |
| 2105 |
longer use sans serif fonts. |
| 2106 |
\end{Example} |
| 2107 |
|
| 2108 |
I strongly advise against using the ability to switch fonts in order to mix |
| 2109 |
fonts, font sizes, and font attributes wildly. Picking the right font for the |
| 2110 |
job is a matter for experts and has almost nothing to do with the personal |
| 2111 |
tastes of non-experts. See the citation at the end of |
| 2112 |
\autoref{sec:typearea.tips}, \autopageref{sec:typearea.tips.cite} and to the |
| 2113 |
following explanation. |
| 2114 |
|
| 2115 |
\begin{Explain} |
| 2116 |
It is possible to use different font types for different sectioning |
| 2117 |
levels in {\KOMAScript}. Non-experts in typography should absolutely avoid |
| 2118 |
doing so for excellent typographical reasons. |
| 2119 |
|
| 2120 |
A rule of typography states that you should mix as few fonts as possible. |
| 2121 |
Using sans serif for headings already seems to violate this rule. However, |
| 2122 |
you should realize that large, bold, serif letters are much too heavy for |
| 2123 |
headings. Strictly speaking, you should then use a normal instead of a bold |
| 2124 |
or semi-bold font. However, in deeper levels of the sectioning, a normal |
| 2125 |
font may then appear too light. On the other hand, sans serif fonts have a |
| 2126 |
very pleasant appearance in headings, and almost solely in headings. There |
| 2127 |
is, therefore, good reason why sans serif is the default in {\KOMAScript}. |
| 2128 |
|
| 2129 |
Greater variety should, however, be avoided. Font mixing is something for |
| 2130 |
professionals. For this reason, if you want to use fonts other than the |
| 2131 |
standard {\TeX} fonts\,---\,regardless of whether these are CM\Index{CM |
| 2132 |
fonts}, EC\Index{EC fonts}, or LM fonts\Index{LM fonts}\,---\,you should |
| 2133 |
consult an expert about the compatibility of the sans serif and serif fonts, |
| 2134 |
or redefine the element |
| 2135 |
\DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} |
| 2136 |
as a precautionary measure. The author considers the commonly encountered |
| 2137 |
combinations of Times and Helvetica or Palatino with Helvetica to be |
| 2138 |
awkward. |
| 2139 |
\end{Explain} |
| 2140 |
\EndIndexGroup |
| 2141 |
% |
| 2142 |
\EndIndexGroup |
| 2143 |
|
| 2144 |
|
| 2145 |
\begin{Declaration} |
| 2146 |
\Macro{part*}\Parameter{heading}% |
| 2147 |
\Macro{chapter*}\Parameter{heading}% |
| 2148 |
\Macro{section*}\Parameter{heading}% |
| 2149 |
\Macro{subsection*}\Parameter{heading}% |
| 2150 |
\Macro{subsubsection*}\Parameter{heading}% |
| 2151 |
\Macro{paragraph*}\Parameter{heading}% |
| 2152 |
\Macro{subparagraph*}\Parameter{heading} |
| 2153 |
\end{Declaration}% |
| 2154 |
The starred variants of all sectioning commands produce |
| 2155 |
unnumbered\Index{numbering} headings which do not appear in the table of |
| 2156 |
contents\Index{table>of contents}\Index{contents>table of} or in the running |
| 2157 |
head\Index{running head}. The absence of a running head often has an unwanted |
| 2158 |
side effect. If, for example, a chapter set using \Macro{chapter*} spans |
| 2159 |
several pages, then the running head of the previous chapter suddenly |
| 2160 |
reappears. {\KOMAScript} offers a solution for this problem, described below. |
| 2161 |
\Macro{chapter*}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} only exists in |
| 2162 |
book and report classes, that is, \Class{book}, \Class{scrbook}, |
| 2163 |
\Class{report} and \Class{scrreprt}, not in the article classes |
| 2164 |
\Class{article} and \Class{scrartcl}. |
| 2165 |
|
| 2166 |
Please\textnote{Attention!} note that \DescRef{\LabelBase.cmd.part} and |
| 2167 |
\DescRef{\LabelBase.cmd.chapter} change the page style for one page. While the |
| 2168 |
standard classes use the \PageStyle{plain} page style, {\KOMAScript} applies |
| 2169 |
the style defined in the \DescRef{\LabelBase.cmd.partpagestyle} and |
| 2170 |
\DescRef{\LabelBase.cmd.chapterpagestyle} macros (see |
| 2171 |
\autoref{sec:\LabelBase.pagestyle}, |
| 2172 |
\DescPageRef{\LabelBase.cmd.titlepagestyle}). |
| 2173 |
|
| 2174 |
The possibilities for switching fonts\ChangedAt{v2.8p}{% |
| 2175 |
\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % |
| 2176 |
described above for the unstarred variants apply without change. The elements |
| 2177 |
use the same names since they do not indicate variants but structuring |
| 2178 |
levels.% |
| 2179 |
% |
| 2180 |
\EndIndexGroup |
| 2181 |
|
| 2182 |
|
| 2183 |
\iffalse% Umbruchkorrekturtext |
| 2184 |
In the standard classes\textnote{\KOMAScript{} vs. standard classes} there |
| 2185 |
are no further structuring commands. In particular, there are no commands |
| 2186 |
which can produce unnumbered chapters or sections which show up in the table |
| 2187 |
of contents and in the running heading.% |
| 2188 |
\fi |
| 2189 |
|
| 2190 |
|
| 2191 |
\begin{Declaration} |
| 2192 |
\Macro{addpart}\OParameter{short version}\Parameter{heading}% |
| 2193 |
\Macro{addpart*}\Parameter{heading}% |
| 2194 |
\Macro{addchap}\OParameter{short version}\Parameter{heading}% |
| 2195 |
\Macro{addchap*}\Parameter{heading}% |
| 2196 |
\Macro{addsec}\OParameter{short version}\Parameter{heading}% |
| 2197 |
\Macro{addsec*}\Parameter{heading} |
| 2198 |
\textnote[n]{\KOMAScript{} vs. standard classes} |
| 2199 |
\end{Declaration}% |
| 2200 |
In addition to the commands of the standard classes, {\KOMAScript} offers the |
| 2201 |
new commands \Macro{addpart}, \Macro{addsec} and \Macro{addchap}. They are |
| 2202 |
similar to the standard commands \DescRef{\LabelBase.cmd.part}\IndexCmd{part}% |
| 2203 |
\important{\DescRef{\LabelBase.cmd.part}, \DescRef{\LabelBase.cmd.chapter}, |
| 2204 |
\DescRef{\LabelBase.cmd.section}}, |
| 2205 |
\DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} and |
| 2206 |
\DescRef{\LabelBase.cmd.section}\IndexCmd{section} except that they are |
| 2207 |
unnumbered. They thus produce both a running head and an entry in the table of |
| 2208 |
contents which take into account the \DescRef{\LabelBase.option.headings}% |
| 2209 |
\important{\DescRef{\LabelBase.option.headings}} option settings, especially |
| 2210 |
the handling of the optional argument. However, enabling or disabling the |
| 2211 |
\Option{nonumber} switch will have no effect. |
| 2212 |
|
| 2213 |
The starred variants \Macro{addchap*} and \Macro{addsec*} are similar to the |
| 2214 |
standard commands \DescRef{\LabelBase.cmd.chapter*} and |
| 2215 |
\DescRef{\LabelBase.cmd.section*} except for a small but important difference: |
| 2216 |
the running heads are deleted. This eliminates the side effect of obsolete |
| 2217 |
headers mentioned above. Instead, the running heads on subsequent pages remain |
| 2218 |
empty. \OnlyAt{\Class{book}\and \Class{scrreprt}}\Macro{addchap} and |
| 2219 |
\Macro{addchap*} only exist, of course, in book and report classes, namely |
| 2220 |
\Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreprt}, not in |
| 2221 |
the article classes \Class{article} and \Class{scrartcl}. |
| 2222 |
|
| 2223 |
The \Macro{addpart} command produces an unnumbered document part with an |
| 2224 |
entry in the table of contents. Since the running heads are already deleted |
| 2225 |
by \DescRef{\LabelBase.cmd.part} and \DescRef{\LabelBase.cmd.part*} the |
| 2226 |
previously mentioned problem with obsolete headers does not exist. The starred |
| 2227 |
version \Macro{addpart*} is thus identical to \DescRef{\LabelBase.cmd.part*} |
| 2228 |
and is only defined for reasons of consistency. |
| 2229 |
|
| 2230 |
Please note\textnote{Attention!} that \Macro{addpart} and \Macro{addchap} and |
| 2231 |
their starred variants change the page style for one page. The particular page |
| 2232 |
style is defined in the macros \DescRef{\LabelBase.cmd.partpagestyle} and |
| 2233 |
\DescRef{\LabelBase.cmd.chapterpagestyle} (see |
| 2234 |
\autoref{sec:\LabelBase.pagestyle}, |
| 2235 |
\DescPageRef{\LabelBase.cmd.titlepagestyle}). |
| 2236 |
\iffree{\iffalse}{\csname iftrue\endcsname}% Umbruchkorrekturbeispiel |
| 2237 |
\begin{Example} |
| 2238 |
You write a book with a long afterword that spans several pages. This |
| 2239 |
should receive neither a running head nor an entry in the table of |
| 2240 |
contents. Therefore, you first use \DescRef{\LabelBase.cmd.chapter*}: |
| 2241 |
\begin{lstcode} |
| 2242 |
\documentclass{scrbook} |
| 2243 |
\usepackage{blindtext} |
| 2244 |
\begin{document} |
| 2245 |
\tableofcontents |
| 2246 |
\blinddocument |
| 2247 |
\chapter*{Afterword} |
| 2248 |
\Blindtext[10] |
| 2249 |
\end{document} |
| 2250 |
\end{lstcode} |
| 2251 |
However, you discover that the running head of the previous chapter |
| 2252 |
reappears on the second and third pages of the afterword. Naturally, you do |
| 2253 |
not want that. Therefore, you use \Macro{addchap*}: |
| 2254 |
\begin{lstcode} |
| 2255 |
\documentclass{scrbook} |
| 2256 |
\usepackage{blindtext} |
| 2257 |
\begin{document} |
| 2258 |
\tableofcontents |
| 2259 |
\blinddocument |
| 2260 |
\addchap*{Afterword} |
| 2261 |
\Blindtext[10] |
| 2262 |
\end{document} |
| 2263 |
\end{lstcode} |
| 2264 |
The complete postscript is now without a running head, if that is what you |
| 2265 |
want. But even that does not quite meet your expectations. A running head |
| 2266 |
would be nice. With |
| 2267 |
\begin{lstcode} |
| 2268 |
\documentclass{scrbook} |
| 2269 |
\usepackage{blindtext} |
| 2270 |
\begin{document} |
| 2271 |
\tableofcontents |
| 2272 |
\blinddocument |
| 2273 |
\addchap{Afterword} |
| 2274 |
\Blindtext[10] |
| 2275 |
\end{document} |
| 2276 |
\end{lstcode} |
| 2277 |
you now get both ``Afterword'' as the running head on the even pages and an |
| 2278 |
entry in the table of contents. But this entry bothers your publisher. He |
| 2279 |
insists that the afterword have no entry in the table of contents. Even if |
| 2280 |
that seems strange to you, you want to satisfy the publisher, so with |
| 2281 |
\OptionValueRef{\LabelBase}{headings}{optiontotocandhead} you first |
| 2282 |
activate the extended function for the optional argument and then |
| 2283 |
explicitly set an empty argument for the table of contents: |
| 2284 |
\begin{lstcode} |
| 2285 |
\documentclass[headings=optiontotocandhead] |
| 2286 |
{scrbook} |
| 2287 |
\usepackage{blindtext} |
| 2288 |
\begin{document} |
| 2289 |
\tableofcontents |
| 2290 |
\blinddocument |
| 2291 |
\addchap[tocentry={}]{Afterword} |
| 2292 |
\Blindtext[10] |
| 2293 |
\end{document} |
| 2294 |
\end{lstcode} |
| 2295 |
The running head is not changed by \OptionValue{tocentry}{\{\}}. Since |
| 2296 |
\Class{scrbook} automatically omits empty entries in the table of contents, |
| 2297 |
the publisher is now satisfied. |
| 2298 |
\end{Example}% |
| 2299 |
\fi |
| 2300 |
|
| 2301 |
The possibilities for switching fonts\ChangedAt{v2.8p}{% |
| 2302 |
\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % |
| 2303 |
described above for the unstarred variant of the sectioning commands apply |
| 2304 |
without change. The elements have the same names since they do not designate |
| 2305 |
variants but sectioning levels.% |
| 2306 |
% |
| 2307 |
\EndIndexGroup |
| 2308 |
|
| 2309 |
|
| 2310 |
\begin{Declaration} |
| 2311 |
\Macro{minisec}\Parameter{heading} |
| 2312 |
\end{Declaration}% |
| 2313 |
Sometimes you want a heading\Index{heading} that is highlighted but also |
| 2314 |
closely linked to the following text. Such a heading should not be separated |
| 2315 |
by a large vertical skip. |
| 2316 |
|
| 2317 |
The \Macro{minisec} command is designed for this situation. This heading is |
| 2318 |
not associated with any sectioning level\textnote{no sectioning level}. Such a |
| 2319 |
\emph{mini-section} does not produce an entry in the table of contents, nor |
| 2320 |
does it receive any numbering. |
| 2321 |
|
| 2322 |
\BeginIndexGroup |
| 2323 |
\BeginIndex{FontElement}{minisec}\LabelFontElement{minisec}% |
| 2324 |
You can change the font of the \Macro{minisec} command using the |
| 2325 |
\DescRef{\LabelBase.fontelement.disposition}% |
| 2326 |
\important{\DescRef{\LabelBase.fontelement.disposition}\\ |
| 2327 |
\FontElement{minisec}} and \FontElement{minisec}\ChangedAt{v2.96a}{% |
| 2328 |
\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} element (see |
| 2329 |
\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). |
| 2330 |
The default of the \FontElement{minisec} element is empty, so by default only |
| 2331 |
the \DescRef{\LabelBase.fontelement.disposition} element is used.% |
| 2332 |
\EndIndexGroup |
| 2333 |
|
| 2334 |
\begin{Example} |
| 2335 |
You have developed a kit for building a mouse trap and want the |
| 2336 |
documentation separated into a list of necessary items and an |
| 2337 |
assembly description. You could write the following: |
| 2338 |
\begin{lstcode} |
| 2339 |
\documentclass{scrartcl} |
| 2340 |
|
| 2341 |
\begin{document} |
| 2342 |
|
| 2343 |
\title{DIY Projects} |
| 2344 |
\author{Two Left Thumbs} |
| 2345 |
\date{\today} |
| 2346 |
\maketitle |
| 2347 |
|
| 2348 |
\section{Mousetrap} |
| 2349 |
|
| 2350 |
The first project is suitable for beginners and only requires |
| 2351 |
a few components that should be found in every household. |
| 2352 |
|
| 2353 |
\minisec{Material Required} |
| 2354 |
|
| 2355 |
\begin{flushleft} |
| 2356 |
1 board ($100\times 50 \times 12$)\\ |
| 2357 |
1 swing-top cap of a beer-bottle\\ |
| 2358 |
1 ballpoint pen\\ |
| 2359 |
1 push pin\\ |
| 2360 |
2 screws\\ |
| 2361 |
1 hammer\\ |
| 2362 |
1 knife |
| 2363 |
\end{flushleft} |
| 2364 |
|
| 2365 |
\minisec{Assembly} |
| 2366 |
First, find the mouse hole and put the push pin directly behind |
| 2367 |
the hole so that the mouse cannot escape during the following |
| 2368 |
actions. |
| 2369 |
|
| 2370 |
Next tap the swing-top cap into the mouse hole with the hammer. |
| 2371 |
If the cap is not big enough to block the hole completely and |
| 2372 |
permanently, take the board instead and screw it to the front |
| 2373 |
of the mouse hole using the two screws and the knife. Of |
| 2374 |
course, you can use a screwdriver instead of a knife. The |
| 2375 |
ballpoint pen has fallen victim to animal welfare. |
| 2376 |
\end{document} |
| 2377 |
\end{lstcode} |
| 2378 |
The main part, starting with the heading ``Material Required'' will look |
| 2379 |
like this: |
| 2380 |
\begin{ShowOutput}[\baselineskip]\setlength{\parindent}{1em} |
| 2381 |
\minisec{Material Required} |
| 2382 |
|
| 2383 |
\begin{flushleft} |
| 2384 |
1 board ($100\times 50 \times 12$)\\ |
| 2385 |
1 swing-top cap of a beer-bottle\\ |
| 2386 |
1 ballpoint pen\\ |
| 2387 |
1 push pin\\ |
| 2388 |
2 screws\\ |
| 2389 |
1 hammer\\ |
| 2390 |
1 knife |
| 2391 |
\end{flushleft} |
| 2392 |
|
| 2393 |
\minisec{Assembly} |
| 2394 |
First, find the mouse hole and put the push pin directly behind the hole |
| 2395 |
so that the mouse cannot escape during the following actions. |
| 2396 |
|
| 2397 |
Next tap the swing-top cap into the mouse hole with the hammer. If the cap |
| 2398 |
is not big enough to block the hole completely and permanently, take the |
| 2399 |
board instead and screw it to the front of the mouse hole using the two |
| 2400 |
screws and the knife. Of course, you can use a screwdriver instead of a |
| 2401 |
knife. The ballpoint pen has fallen victim to animal welfare. |
| 2402 |
\end{ShowOutput} |
| 2403 |
\end{Example} |
| 2404 |
% |
| 2405 |
\EndIndexGroup |
| 2406 |
|
| 2407 |
|
| 2408 |
\begin{Declaration} |
| 2409 |
\Macro{raggedsection}% |
| 2410 |
\Macro{raggedchapter}% |
| 2411 |
\Macro{raggedpart} |
| 2412 |
\end{Declaration}% |
| 2413 |
In the standard classes\textnote{\KOMAScript{} vs. standard classes}, headings |
| 2414 |
are set as justified text. That means that hyphenated words can occur and |
| 2415 |
multi-line headings are stretched up to the text width. This approach is |
| 2416 |
rather uncommon in typography. {\KOMAScript} therefore sets the |
| 2417 |
headings left aligned with hanging indentation using \Macro{raggedsection} |
| 2418 |
with the default: |
| 2419 |
\begin{lstcode} |
| 2420 |
\newcommand*{\raggedsection}{\raggedright} |
| 2421 |
\end{lstcode} |
| 2422 |
You can redefine this command with \Macro{renewcommand}. |
| 2423 |
\begin{Example} |
| 2424 |
You prefer justified headings, so you write in the preamble of your document: |
| 2425 |
\begin{lstcode} |
| 2426 |
\renewcommand*{\raggedsection}{} |
| 2427 |
\end{lstcode} |
| 2428 |
or more compactly: |
| 2429 |
\begin{lstcode} |
| 2430 |
\let\raggedsection\relax |
| 2431 |
\end{lstcode} |
| 2432 |
You will get heading formatting which is very close to that of the standard |
| 2433 |
classes. It will become even closer when you combine this change with the |
| 2434 |
change to the |
| 2435 |
\DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} |
| 2436 |
element mentioned above. |
| 2437 |
\end{Example} |
| 2438 |
|
| 2439 |
Because\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}} some users want |
| 2440 |
a different alignment for the \DescRef{\LabelBase.cmd.chapter} level than for |
| 2441 |
the other sectioning levels, you can change the |
| 2442 |
\DescRef{\LabelBase.cmd.chapter} justification separately by redefining |
| 2443 |
\Macro{raggedchapter}. By default, however, this command simply uses |
| 2444 |
\Macro{raggedsection}, so changing \Macro{raggedsection} indirectly affects |
| 2445 |
\Macro{raggedchapter}. |
| 2446 |
|
| 2447 |
By default, part headings (\DescRef{\LabelBase.cmd.part}) are set horizontally |
| 2448 |
centred rather than ragged right. This formatting is performed by the |
| 2449 |
\Macro{raggedpart} statement, which has the default definition |
| 2450 |
\begin{lstcode} |
| 2451 |
\let\raggedpart\centering |
| 2452 |
\end{lstcode} |
| 2453 |
You can also redefine this command using \Macro{renewcommand}. |
| 2454 |
\begin{Example} |
| 2455 |
You want the headings for \DescRef{\LabelBase.cmd.part} to be formatted the |
| 2456 |
same as any other sectioning command. To do so, put |
| 2457 |
\begin{lstcode} |
| 2458 |
\renewcommand*{\raggedpart}{\raggedsection} |
| 2459 |
\end{lstcode} |
| 2460 |
in the preamble of your document. In\textnote{Hint!} this case, and unlike |
| 2461 |
in the example above, we did not use \Macro{let} because \Macro{let} would |
| 2462 |
set \Macro{raggedpart} to the underlying value of \Macro{raggedsection}. |
| 2463 |
Subsequent changes to \Macro{raggedsection} would then not change the |
| 2464 |
behaviour of \Macro{raggedpart}. By redefining with \Macro{renewcommand}, |
| 2465 |
\Macro{raggedpart} will use the current meaning of \Macro{raggedsection} at |
| 2466 |
the time it is used rather than when it was redefined. |
| 2467 |
\end{Example}% |
| 2468 |
% |
| 2469 |
\EndIndexGroup |
| 2470 |
|
| 2471 |
|
| 2472 |
\begin{Declaration} |
| 2473 |
\Macro{partformat} |
| 2474 |
\Macro{chapterformat} |
| 2475 |
\Macro{sectionformat} |
| 2476 |
\Macro{subsectionformat} |
| 2477 |
\Macro{subsubsectionformat} |
| 2478 |
\Macro{paragraphformat} |
| 2479 |
\Macro{subparagraphformat} |
| 2480 |
\Macro{othersectionlevelsformat}\Parameter{sectioning name}\Parameter{} |
| 2481 |
\Parameter{counter output} |
| 2482 |
\Macro{IfUsePrefixLine}\Parameter{then code}\Parameter{else code} |
| 2483 |
\Macro{autodot} |
| 2484 |
\end{Declaration}% |
| 2485 |
{\KOMAScript} adds another logical layer above \Macro{the\PName{sectioning |
| 2486 |
name}} to format the sectioning numbers. The counters for each heading are |
| 2487 |
not merely output. They are formatted using the commands \Macro{partformat}, |
| 2488 |
\Macro{chapterformat}, down to |
| 2489 |
\Macro{subparagraphformat}\ChangedAt{v3.17}{\Class{scrbook}\and |
| 2490 |
\Class{scrreprt}\and \Class{scrartcl}}. Of course the \Macro{chapterformat} |
| 2491 |
command, like \Macro{thechapter}, does not exist in the \Class{scrartcl} |
| 2492 |
class, but only in the \Class{scrbook} and \Class{scrreprt} |
| 2493 |
classes.\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} |
| 2494 |
|
| 2495 |
As already explained for the \DescRef{\LabelBase.option.numbers}% |
| 2496 |
\important{\DescRef{\LabelBase.option.numbers}} option at the beginning of |
| 2497 |
this section (see \DescPageRef{\LabelBase.option.numbers}), {\KOMAScript}'s |
| 2498 |
handling of points in section numbers implements the rules given in |
| 2499 |
\cite{DUDEN}, which are standard in German-language typography, in the |
| 2500 |
\Macro{autodot} command. In all levels except for |
| 2501 |
\DescRef{\LabelBase.cmd.part}, a point is followed by a further |
| 2502 |
\Macro{enskip}. This corresponds to a horizontal skip of 0.5\Unit{em}. |
| 2503 |
|
| 2504 |
Since \KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and |
| 2505 |
\Class{scrreprt}\and \Class{scrartcl}}, the command |
| 2506 |
\Macro{othersectionlevelsformat} is used only in rare circumstances, i.\,e., |
| 2507 |
if the corresponding format command to a section command does not exist or is |
| 2508 |
\Macro{relax}. This should not happen for any section commands defined by |
| 2509 |
\KOMAScript{} itself. Therefore the command is no longer officially |
| 2510 |
documented. Nevertheless, if you select a compatibility level prior to |
| 2511 |
3.17\important{\OptionValueRef{\LabelBase}{version}{3.17}} (see option |
| 2512 |
\DescRef{\LabelBase.option.version}, |
| 2513 |
\autoref{sec:\LabelBase.compatibilityOptions}, |
| 2514 |
\DescPageRef{\LabelBase.option.version}), commands \Macro{sectionformat} down |
| 2515 |
to \Macro{subparagraphformat} are ignored by \KOMAScript{}. Instead, these |
| 2516 |
layers will continue to use \Macro{othersectionlevelsformat}. |
| 2517 |
|
| 2518 |
You can redefine the formatting commands using \Macro{renewcommand} to fit |
| 2519 |
them to your personal needs. The following default definitions are used by the |
| 2520 |
{\KOMAScript} classes: |
| 2521 |
\begin{lstcode} |
| 2522 |
\newcommand*{\partformat}{\partname~\thepart\autodot} |
| 2523 |
\newcommand*{\chapterformat}{% |
| 2524 |
\mbox{\chapappifchapterprefix{\nobreakspace}\thechapter |
| 2525 |
\autodot\IfUsePrefixLine{}{\enskip}}} |
| 2526 |
\newcommand*{\sectionformat}{\thesection\autodot\enskip} |
| 2527 |
\newcommand*{\subsectionformat}{% |
| 2528 |
\thesubsection\autodot\enskip} |
| 2529 |
\newcommand*{\subsubsectionformat}{% |
| 2530 |
\thesubsubsection\autodot\enskip} |
| 2531 |
\newcommand*{\paragraphformat}{\theparagraph\autodot\enskip} |
| 2532 |
\newcommand*{\subparagraphformat}{% |
| 2533 |
\thesubparagraph\autodot\enskip} |
| 2534 |
\newcommand*{\othersectionlevelsformat}[3]{% |
| 2535 |
#3\autodot\enskip} |
| 2536 |
\end{lstcode} |
| 2537 |
|
| 2538 |
Because\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}} it uses |
| 2539 |
\Macro{IfUsePrefixLine}, \Macro{chapterformat} should not be used outside of |
| 2540 |
\DescRef{\LabelBase.cmd.chapter}. \Macro{IfUsePrefixLine} is only valid inside |
| 2541 |
\KOMAScript{} sectioning commands. Within those commands, it executes the |
| 2542 |
\PName{then code} if a prefix line for the number is used and the \PName{else |
| 2543 |
code} otherwise. |
| 2544 |
|
| 2545 |
Please also remember\textnote{Attention!} to replace \Macro{newcommand} with |
| 2546 |
\Macro{renewcommand} if you want to redefine one of the commands above. |
| 2547 |
|
| 2548 |
\begin{Example} |
| 2549 |
Suppose you do not want the word ``Part'' written in front of the part |
| 2550 |
number when you use \DescRef{\LabelBase.cmd.part}. You can put the |
| 2551 |
following command in the preamble of your document: |
| 2552 |
\begin{lstcode} |
| 2553 |
\renewcommand*{\partformat}{\thepart\autodot} |
| 2554 |
\end{lstcode} |
| 2555 |
In fact, you could do without \Macro{autodot} here and insert a fixed point |
| 2556 |
instead. Since \DescRef{\LabelBase.cmd.part} is numbered with Roman numerals, |
| 2557 |
it must be followed by a point according to \cite{DUDEN}. However, by using |
| 2558 |
\Macro{autodot} you retain the ability to use the |
| 2559 |
\DescRef{\LabelBase.option.numbers}% |
| 2560 |
\important{\DescRef{\LabelBase.option.numbers}} option |
| 2561 |
\OptionValueRef{\LabelBase}{numbers}{endperiod} and thus deviate from |
| 2562 |
the rule. You can find more details concerning class options on |
| 2563 |
\DescPageRef{\LabelBase.option.numbers}. |
| 2564 |
|
| 2565 |
Another possibility is to place the section numbers in the left margin in |
| 2566 |
such a way that the heading text is left aligned with the surrounding text. |
| 2567 |
You can accomplish this with: |
| 2568 |
\begin{lstcode} |
| 2569 |
\renewcommand*{\sectionformat}{% |
| 2570 |
\makebox[0pt][r]{\thesection\autodot\enskip}} |
| 2571 |
\renewcommand*{\subsectionformat}{% |
| 2572 |
\makebox[0pt][r]{\thesubsection\autodot\enskip}} |
| 2573 |
\renewcommand*{\subsubsectionformat}{% |
| 2574 |
\makebox[0pt][r]{% |
| 2575 |
\thesubsubsection\autodot\enskip}} |
| 2576 |
\renewcommand*{\paragraphformat}{% |
| 2577 |
\makebox[0pt][r]{\theparagraph\autodot\enskip}} |
| 2578 |
\renewcommand*{\paragraphformat}{% |
| 2579 |
\makebox[0pt][r]{% |
| 2580 |
\thesubparagraph\autodot\enskip}} |
| 2581 |
\end{lstcode} |
| 2582 |
The optional arguments of the \Macro{makebox} command require \LaTeX{} to |
| 2583 |
create a zero-width box with right-justified content. As a result, the |
| 2584 |
contents of the box are output to the left of the current position.% |
| 2585 |
\iffree{}{ %Umbruchkorrekturtext |
| 2586 |
This popular trick avoids the need first to measure the width of the |
| 2587 |
number and the spacing, and then to change the current position |
| 2588 |
appropriately with \Macro{hspace}.} |
| 2589 |
You can find more about the optional arguments of \Macro{makebox} in |
| 2590 |
\cite{latex:usrguide}. |
| 2591 |
\end{Example} |
| 2592 |
|
| 2593 |
For formatting changes in the headings that go beyond merely formatting the |
| 2594 |
unit number, please refer to |
| 2595 |
\DescRef{maincls-experts.cmd.partlineswithprefixformat}% |
| 2596 |
\IndexCmd{partlineswithprefixformat}, |
| 2597 |
\DescRef{maincls-experts.cmd.chapterlineswithprefixformat}% |
| 2598 |
\IndexCmd{chapterlineswithprefixformat} and |
| 2599 |
\DescRef{maincls-experts.cmd.chapterlinesformat}\IndexCmd{chapterlinesformat}, |
| 2600 |
as well as |
| 2601 |
\DescRef{maincls-experts.cmd.sectionlinesformat}\IndexCmd{sectionlinesformat} |
| 2602 |
and its \DescRef{maincls-experts.cmd.sectioncatchphraseformat}% |
| 2603 |
\IndexCmd{sectioncatchphraseformat} format in |
| 2604 |
\autoref{sec:maincls-experts.sections}, starting from |
| 2605 |
\DescPageRef{maincls-experts.cmd.partlineswithprefixformat}. |
| 2606 |
|
| 2607 |
It is expressly stated that the package |
| 2608 |
\Package{polyglossia}\IndexPackage{polyglossia}\important{\Package{polyglossia}} |
| 2609 |
redefines some of the instructions documented here depending on the |
| 2610 |
language. This concerns, for example, the language settings \PValue{russian} |
| 2611 |
and \PValue{hungarian}. For more details, see its manual |
| 2612 |
\cite{package:polyglossia}.% |
| 2613 |
\EndIndexGroup |
| 2614 |
|
| 2615 |
|
| 2616 |
\begin{Declaration} |
| 2617 |
\Macro{chapappifchapterprefix}\Parameter{additional text}% |
| 2618 |
\Macro{chapapp} |
| 2619 |
\end{Declaration}% |
| 2620 |
These\ChangedAt{v2.8o}{\Class{scrbook}\and\Class{scrreprt}} two commands are |
| 2621 |
used internally by {\KOMAScript} and also made available to the user. Later, |
| 2622 |
you will see how to use them, for example to redefine other commands.% |
| 2623 |
\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} |
| 2624 |
|
| 2625 |
If you use the layout option \OptionValueRef{\LabelBase}{chapterprefix}{true}% |
| 2626 |
\important{\DescRef{\LabelBase.option.chapterprefix}} (see |
| 2627 |
\DescPageRef{\LabelBase.option.chapterprefix}), \Macro{chapappifchapterprefix} |
| 2628 |
outputs the word ``Chapter''\Index{chapter>heading} in the body of the text in |
| 2629 |
the current language, followed by \PName{additional text}. In the |
| 2630 |
appendix\Index{appendix}, the word ``Appendix'' in the current language is |
| 2631 |
output instead, followed by \PName{additional text}. If the option |
| 2632 |
\OptionValue{\LabelBase}{chapterprefix}{false} is set, then nothing is output. |
| 2633 |
|
| 2634 |
The \Macro{chapapp} command always outputs the word ``Chapter'' or |
| 2635 |
``Appendix'', regardless of the setting of the |
| 2636 |
\DescRef{\LabelBase.option.chapterprefix} option. |
| 2637 |
|
| 2638 |
Since chapters only exist in the classes \Class{scrbook} and \Class{scrreprt}, |
| 2639 |
these commands only exist in these classes.% |
| 2640 |
% |
| 2641 |
\EndIndexGroup |
| 2642 |
|
| 2643 |
|
| 2644 |
\begin{Declaration} |
| 2645 |
\Macro{chaptermark}\Parameter{running head}% |
| 2646 |
\Macro{addchapmark}\Parameter{running head}% |
| 2647 |
\Macro{sectionmark}\Parameter{running head}% |
| 2648 |
\Macro{addsecmark}\Parameter{running head}% |
| 2649 |
\Macro{subsectionmark}\Parameter{running head}% |
| 2650 |
\Macro{chaptermarkformat}% |
| 2651 |
\Macro{sectionmarkformat}% |
| 2652 |
\Macro{subsectionmarkformat} |
| 2653 |
\end{Declaration}% |
| 2654 |
\begin{Explain}% |
| 2655 |
As mentioned in \autoref{sec:\LabelBase.pagestyle}, the |
| 2656 |
\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% |
| 2657 |
\important{\DescRef{\LabelBase.pagestyle.headings}} page style works with |
| 2658 |
automatic running heads\Index{running heads>automatic}. For this, the |
| 2659 |
commands \Macro{chaptermark} and \Macro{sectionmark}, or \Macro{sectionmark} |
| 2660 |
and \Macro{subsectionmark}, are defined accordingly. Every sectioning |
| 2661 |
command (\DescRef{\LabelBase.cmd.chapter}, \DescRef{\LabelBase.cmd.section}, |
| 2662 |
etc.) automatically executes the corresponding \Macro{\dots mark} command. |
| 2663 |
The parameter passed contains the text of the section heading% |
| 2664 |
\Index{heading}. The corresponding section number is added automatically in |
| 2665 |
the \Macro{\dots mark} command. The formatting is done according to the |
| 2666 |
sectioning level with one of the three commands \Macro{chaptermarkformat}, |
| 2667 |
\Macro{sectionmarkformat}, or \Macro{subsectionmarkformat}. |
| 2668 |
|
| 2669 |
Note\textnote{Attention!} that the running heads of |
| 2670 |
\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} and |
| 2671 |
\DescRef{\LabelBase.cmd.addsec}\IndexCmd{addsec} are also based on |
| 2672 |
\Macro{chaptermark} and \Macro{sectionmark}. However, the |
| 2673 |
\DescRef{\LabelBase.counter.secnumdepth} counter is set locally to a value |
| 2674 |
that switches off the numbering of chapters or sections. You should consider |
| 2675 |
this, for example, if you redefine \Macro{chaptermark} or |
| 2676 |
\Macro{sectionmark} (see \DescRef{\LabelBase.cmd.Ifnumbered} on |
| 2677 |
\DescPageRef{\LabelBase.cmd.Ifnumbered}). The starred variants |
| 2678 |
\DescRef{\LabelBase.cmd.addchap*} and \DescRef{\LabelBase.cmd.addsec*} use |
| 2679 |
additional commands \Macro{addchapmark} and \Macro{addsecmark} that are also |
| 2680 |
defined based on \Macro{chaptermark} and \Macro{sectionmark} with local |
| 2681 |
changes of \DescRef{\LabelBase.counter.secnumdepth}. |
| 2682 |
|
| 2683 |
Although\OnlyAt{\Class{scrartcl}} there is no \Macro{chaptermark} or |
| 2684 |
\Macro{chaptermarkformat} command in \Class{scrartcl}, there are two |
| 2685 |
commands, \Macro{subsectionmark} and \Macro{subsectionmarkformat}, which |
| 2686 |
exist only in \Class{scrartcl}. However using the |
| 2687 |
\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% |
| 2688 |
\IndexPackage{scrlayer-scrpage} package changes this (see |
| 2689 |
\autoref{cha:scrlayer-scrpage}). |
| 2690 |
\end{Explain} |
| 2691 |
Just as numbers in the sectioning-command headers are formatted with |
| 2692 |
\DescRef{\LabelBase.cmd.partformat} down to |
| 2693 |
\DescRef{\LabelBase.cmd.subparagraphformat}, \Macro{chaptermarkformat}, |
| 2694 |
\Macro{sectionmarkformat}, and \Macro{subsectionmarkformat} define the |
| 2695 |
formatting of the sectioning numbers in the automatic running heads. They can |
| 2696 |
be adapted to your personal needs with \Macro{renewcommand}. The original |
| 2697 |
definitions for the {\KOMAScript} classes are: |
| 2698 |
\begin{lstcode} |
| 2699 |
\newcommand*{\chaptermarkformat}{% |
| 2700 |
\chapappifchapterprefix{\ }\thechapter\autodot\enskip} |
| 2701 |
\newcommand*{\sectionmarkformat}{% |
| 2702 |
\thesection\autodot\enskip} |
| 2703 |
\newcommand*{\subsectionmarkformat}{% |
| 2704 |
\thesubsection\autodot\enskip} |
| 2705 |
\end{lstcode} |
| 2706 |
\begin{Example} |
| 2707 |
Suppose you want the word ``Chapter'' to precede the chapter number in the |
| 2708 |
running head. You could put the following definition in the preamble of your |
| 2709 |
document: |
| 2710 |
\begin{lstcode} |
| 2711 |
\renewcommand*{\chaptermarkformat}{% |
| 2712 |
\chapapp~\thechapter\autodot\enskip} |
| 2713 |
\end{lstcode} |
| 2714 |
\end{Example} |
| 2715 |
As you can see, both \DescRef{\LabelBase.cmd.chapapp} and |
| 2716 |
\DescRef{\LabelBase.cmd.chapappifchapterprefix}, explained above, are used |
| 2717 |
here.% |
| 2718 |
\EndIndexGroup |
| 2719 |
|
| 2720 |
|
| 2721 |
\begin{Declaration} |
| 2722 |
\Counter{secnumdepth} |
| 2723 |
\Macro{partnumdepth} |
| 2724 |
\Macro{chapternumdepth} |
| 2725 |
\Macro{sectionnumdepth} |
| 2726 |
\Macro{subsectionnumdepth} |
| 2727 |
\Macro{subsubsectionnumdepth} |
| 2728 |
\Macro{paragraphnumdepth} |
| 2729 |
\Macro{subparagraphnumdepth} |
| 2730 |
\end{Declaration}% |
| 2731 |
\BeginIndex{}{Nummerierung}% |
| 2732 |
Normally, the \Class{scrbook}\IndexClass{scrbook} and |
| 2733 |
\Class{scrreprt}\IndexClass{scrreprt} classes number the section headings |
| 2734 |
from \DescRef{\LabelBase.cmd.part}\IndexCmd{part}\IndexCmd{chapter}% |
| 2735 |
\IndexCmd{section} down to |
| 2736 |
\DescRef{\LabelBase.cmd.subsection}\IndexCmd{subsection} and the |
| 2737 |
\Class{scrartcl}\IndexClass{scrartcl} class numbers them from |
| 2738 |
\DescRef{\LabelBase.cmd.part} down to |
| 2739 |
\DescRef{\LabelBase.cmd.subsubsection}\IndexCmd{subsubsection}. The actual |
| 2740 |
depth to which headings are numbered is controlled by the \LaTeX{} counter |
| 2741 |
\Counter{secnumdepth}. |
| 2742 |
|
| 2743 |
To\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} |
| 2744 |
save users the trouble of having to remember abstract numbers, the commands |
| 2745 |
\Macro{partnumdepth} to \Macro{subparagraphnumdepth} return the appropriate |
| 2746 |
number for the section level in their name. |
| 2747 |
|
| 2748 |
\begin{Example} |
| 2749 |
For a book project, you want the section levels from part down to section |
| 2750 |
to be numbered. To achieve this, you have to set counter |
| 2751 |
\Counter{secnumdepth} to the value represented by \Macro{sectionnumdepth} in |
| 2752 |
the preamble of your document: |
| 2753 |
\begin{lstcode} |
| 2754 |
\setcounter{secnumdepth}{\sectionnumdepth} |
| 2755 |
\end{lstcode} |
| 2756 |
\end{Example} |
| 2757 |
No provision is made for redefining these commands. Doing so could lead to |
| 2758 |
unexpected results, not only with \KOMAScript{} but also with third party |
| 2759 |
packages. Thus, you should never redefine them. |
| 2760 |
|
| 2761 |
Do\textnote{Attention!} not confuse the \Counter{secnumdepth} and |
| 2762 |
\DescRef{\LabelBase.counter.tocdepth} counters (see |
| 2763 |
\autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.counter.tocdepth}). |
| 2764 |
Depending on the class you are using, the meaning of the values of the |
| 2765 |
\Counter{secnumdepth} and \DescRef{\LabelBase.counter.tocdepth} counters may |
| 2766 |
differ for the same section level.% |
| 2767 |
% |
| 2768 |
\EndIndexGroup |
| 2769 |
|
| 2770 |
\begin{Declaration} |
| 2771 |
\Macro{Ifnumbered}\Parameter{section level}% |
| 2772 |
\Parameter{then code}\Parameter{else code}% |
| 2773 |
\Macro{Ifunnumbered}\Parameter{section level}% |
| 2774 |
\Parameter{then code}\Parameter{else code} |
| 2775 |
\end{Declaration} |
| 2776 |
The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 2777 |
\Class{scrartcl}}\ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and |
| 2778 |
\Class{scrartcl}} commands \Macro{Ifnumbered} and \Macro{Ifunnumbered} |
| 2779 |
determine which section-level headings are numbered, using the technique |
| 2780 |
described above, and execute code depending on whether a \PName{section level} |
| 2781 |
is numbered or not. If a \PName{section level} is numbered with the current |
| 2782 |
settings, \Macro{Ifnumbered} executes the \PName{then code}. If the section |
| 2783 |
level is unnumbered, the \PName{else code} is executed. The |
| 2784 |
\Macro{Ifunnumbered} command behaves in exactly the opposite manner, executing |
| 2785 |
the \PName{then code} if the current level is unnumbered and the \PName{else |
| 2786 |
code} if it is. The \PName{section level} parameter is simply the \LaTeX{} |
| 2787 |
name of a section like \PValue{part}, \PValue{chapter}, \PValue{section}, |
| 2788 |
\PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph}, or |
| 2789 |
\PValue{subparagraph}. |
| 2790 |
|
| 2791 |
\KOMAScript{} itself uses these tests, for example, in the definition of |
| 2792 |
\DescRef{\LabelBase.cmd.chaptermark}\IndexCmd{chaptermark} in the |
| 2793 |
\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style. |
| 2794 |
This indirectly ensures that headings inserted by |
| 2795 |
\DescRef{\LabelBase.cmd.addchap} do not set a number inside the running head |
| 2796 |
(see also \DescRef{\LabelBase.cmd.addchapmark}, |
| 2797 |
\DescPageRef{\LabelBase.cmd.addchapmark}).% |
| 2798 |
\EndIndexGroup |
| 2799 |
|
| 2800 |
|
| 2801 |
\begin{Declaration} |
| 2802 |
\Macro{setpartpreamble}% |
| 2803 |
\OParameter{position}\OParameter{width}\Parameter{preamble} |
| 2804 |
\Macro{setchapterpreamble}% |
| 2805 |
\OParameter{position}\OParameter{width}\Parameter{preamble} |
| 2806 |
\end{Declaration}% |
| 2807 |
Parts\OnlyAt{\Class{scrbook}\and |
| 2808 |
\Class{scrreprt}}\Index{part>preamble}\Index{chapter>preamble} and chapters |
| 2809 |
in {\KOMAScript} can be given a \PName{preamble}. This is particularly useful |
| 2810 |
when you are using a two-column format with the class option |
| 2811 |
\Option{twocolumn}\IndexOption{twocolumn}, since the heading and the |
| 2812 |
\PName{preamble} are always set in a one-column layout. The \PName{preamble} |
| 2813 |
can contain more than one paragraph. The command to set the \PName{preamble} |
| 2814 |
must come before the respective \DescRef{\LabelBase.cmd.part}, |
| 2815 |
\DescRef{\LabelBase.cmd.addpart}, \DescRef{\LabelBase.cmd.chapter}, or |
| 2816 |
\DescRef{\LabelBase.cmd.addchap} command. |
| 2817 |
\begin{Example} |
| 2818 |
You are writing a report about the condition of a company. You organize the |
| 2819 |
report in such a way that every department gets its own partial report. |
| 2820 |
Each of these parts should be introduced by an abstract on the corresponding |
| 2821 |
title page. You could write the following: |
| 2822 |
\begin{lstcode} |
| 2823 |
\setpartpreamble{% |
| 2824 |
\begin{abstract} |
| 2825 |
This is a filler text. It serves merely to demonstrate the |
| 2826 |
capabilities of {\KOMAScript}. If you read this text, you will |
| 2827 |
get no information. |
| 2828 |
\end{abstract} |
| 2829 |
} |
| 2830 |
\part{Department for Word Processing} |
| 2831 |
\end{lstcode} |
| 2832 |
Depending on the settings for the heading font size\Index{heading} |
| 2833 |
(see \DescPageRef{\LabelBase.option.headings}) and the options for |
| 2834 |
the \DescRef{\LabelBase.env.abstract} environment\IndexEnv{abstract} (see |
| 2835 |
\autoref{sec:\LabelBase.abstract}, |
| 2836 |
\DescPageRef{\LabelBase.option.abstract}), the result will look something |
| 2837 |
like this: |
| 2838 |
\begin{ShowOutput}\centering |
| 2839 |
{\LARGE\usekomafont{disposition} Part III.\par\vspace{14pt}} |
| 2840 |
{\LARGE\usekomafont{disposition} Department for Word Processing\strut\par} |
| 2841 |
\begin{quote}\small |
| 2842 |
\vspace{4ex} |
| 2843 |
\begin{center} |
| 2844 |
\usekomafont{disposition}\abstractname |
| 2845 |
\end{center} |
| 2846 |
\vspace{2ex} |
| 2847 |
This is a filler text. It serves merely to demonstrate the |
| 2848 |
capabilities of {\KOMAScript}. If you read this text, you will |
| 2849 |
get no information. |
| 2850 |
\end{quote} |
| 2851 |
\end{ShowOutput} |
| 2852 |
\end{Example} |
| 2853 |
Please\textnote{Attention!} note that \emph{you} are responsible for the |
| 2854 |
spacing between the heading, preamble, and the following text. Note also that |
| 2855 |
there is no \DescRef{\LabelBase.env.abstract} environment in the |
| 2856 |
\Class{scrbook} class (see \autoref{sec:\LabelBase.abstract}, |
| 2857 |
\DescPageRef{\LabelBase.env.abstract}). |
| 2858 |
|
| 2859 |
The\ChangedAt{v2.8p}{\Class{scrbook}\and\Class{scrreprt}} first optional |
| 2860 |
argument, \PName{position}, determines the position at which the preamble |
| 2861 |
is placed with the help of one or two letters. For vertical placement |
| 2862 |
there are two possibilities at present: |
| 2863 |
\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt |
| 2864 |
\item [\quad\texttt{o}] above the heading |
| 2865 |
\item [\quad\texttt{u}] below the heading |
| 2866 |
\end{labeling} |
| 2867 |
You can therefore put one preamble above and another below a heading. For |
| 2868 |
horizontal placement you have three options: |
| 2869 |
\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt |
| 2870 |
\item [\quad\texttt{l}] left-aligned |
| 2871 |
\item [\quad\texttt{r}] right-aligned |
| 2872 |
\item [\quad\texttt{c}] centred |
| 2873 |
\end{labeling} |
| 2874 |
This setting does not affect the alignment of the text in the |
| 2875 |
\PName{preamble}. Instead, it aligns the box that contains the preamble. The |
| 2876 |
width of this box is determined by the second optional argument, |
| 2877 |
\PName{width}. If you omit this second argument, the box uses the full text |
| 2878 |
width. In that case, the option for horizontal positioning has no effect. You |
| 2879 |
can combine exactly one letter from the vertical with one letter from the |
| 2880 |
horizontal positioning. |
| 2881 |
|
| 2882 |
A typical use for \Macro{setchapterpreamble} would be something like an |
| 2883 |
epigraph, a wise saying, or a dictum. The |
| 2884 |
\DescRef{\LabelBase.cmd.dictum}\IndexCmd{dictum} command, which you can use |
| 2885 |
for this purpose, is described in the next section. You will also find an |
| 2886 |
example there. |
| 2887 |
|
| 2888 |
Please note\textnote{Attention!} that a \PName{preamble} placed above the |
| 2889 |
heading is set within the existing vertical space above the heading. The |
| 2890 |
heading will not be moved down. You are therefore responsible for ensuring |
| 2891 |
that the \PName{preamble} is not too large and that the space above the |
| 2892 |
heading is sufficient. See also the \Option{beforeskip} setting for |
| 2893 |
\DescRef{maincls-experts.cmd.RedeclareSectionCommand} in |
| 2894 |
\autoref{sec:maincls-experts.sections}, |
| 2895 |
\autoref{tab:maincls-experts.declarechapterstyle.keys}, |
| 2896 |
\autopageref{tab:maincls-experts.declarechapterstyle.keys}. |
| 2897 |
% |
| 2898 |
% |
| 2899 |
\EndIndexGroup |
| 2900 |
% |
| 2901 |
\EndIndexGroup |
| 2902 |
|
| 2903 |
|
| 2904 |
\LoadCommonFile{dictum}% \section{Dicta} |
| 2905 |
|
| 2906 |
\LoadCommonFile{lists}% \section{Lists} |
| 2907 |
|
| 2908 |
\section{Mathematics} |
| 2909 |
\seclabel{math}% |
| 2910 |
\BeginIndexGroup |
| 2911 |
\BeginIndex{}{equations}% |
| 2912 |
\BeginIndex{}{formulas}% |
| 2913 |
\BeginIndex{}{mathematics}% |
| 2914 |
|
| 2915 |
\KOMAScript{} classes do not provide their own environments for formulas, |
| 2916 |
systems of equations, or similar mathematical elements. Instead, \KOMAScript{} |
| 2917 |
relies fully on the maths features of the \LaTeX{} kernel. This also applies to |
| 2918 |
the the options \DescRef{\LabelBase.option.leqno} and |
| 2919 |
\DescRef{\LabelBase.option.fleqn}. |
| 2920 |
|
| 2921 |
You will not find a description of the maths environments of the \LaTeX{} |
| 2922 |
kernel here. If you want to use |
| 2923 |
\Environment{displaymath}\IndexEnv{displaymath}, |
| 2924 |
\Environment{equation}\IndexEnv{equation}, or |
| 2925 |
\Environment{eqnarray}\IndexEnv{eqnarray} you should read an introduction to |
| 2926 |
\LaTeX{} like \cite{lshort}. But\textnote{Hint!} if you want more than very |
| 2927 |
simple mathematics, you should use the \Package{amsmath} package (see |
| 2928 |
\cite{package:amsmath}). |
| 2929 |
|
| 2930 |
\begin{Declaration} |
| 2931 |
\Option{leqno} |
| 2932 |
\end{Declaration}% |
| 2933 |
Equations are normally numbered\Index{equation>number} on the right. The |
| 2934 |
\Option{leqno} option loads the standard option file \File{leqno.clo}. The |
| 2935 |
equations are then numbered on the left. You\textnote{Attention!} must use |
| 2936 |
this option as an optional argument of \DescRef{\LabelBase.cmd.documentclass}. |
| 2937 |
Using it as an argument of \DescRef{\LabelBase.cmd.KOMAoptions} or |
| 2938 |
\DescRef{\LabelBase.cmd.KOMAoption} is not supported. The latter |
| 2939 |
would not make sense because the recommended maths package \Package{amsmath} |
| 2940 |
can only respond to this option at load time and does not react to run-time |
| 2941 |
changes of the option. |
| 2942 |
% |
| 2943 |
\EndIndexGroup |
| 2944 |
|
| 2945 |
|
| 2946 |
\begin{Declaration} |
| 2947 |
\Option{fleqn} |
| 2948 |
\end{Declaration}% |
| 2949 |
Displayed equations\Index{equation>alignment} are normally centred. The |
| 2950 |
standard option \Option{fleqn} loads the standard option file |
| 2951 |
\File{fleqn.clo}. Displayed equations are then left-justified. |
| 2952 |
You\textnote{Attention!} must use this option as an optional argument of |
| 2953 |
\DescRef{\LabelBase.cmd.documentclass}. Using it as an argument of |
| 2954 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} is |
| 2955 |
not supported. The latter would not make sense because the recommended maths |
| 2956 |
package \Package{amsmath} can only respond to this option at load time and |
| 2957 |
does not react to run-time changes of the option. |
| 2958 |
% |
| 2959 |
\EndIndexGroup |
| 2960 |
% |
| 2961 |
\EndIndexGroup |
| 2962 |
|
| 2963 |
|
| 2964 |
\section{Floating Environments for Tables and Figures} |
| 2965 |
\seclabel{floats} |
| 2966 |
\BeginIndexGroup |
| 2967 |
\BeginIndex{}{floats}% |
| 2968 |
\BeginIndex{}{tables}% |
| 2969 |
\BeginIndex{}{figures}% |
| 2970 |
|
| 2971 |
With the floating environments, {\LaTeX} offers a powerful and convenient |
| 2972 |
mechanism to arrange figures\Index{figure} and tables\Index{table} |
| 2973 |
automatically. |
| 2974 |
% Im Deutschen ist hier ein Absatz, den wir nicht uebernehmen! |
| 2975 |
Frequently,\textnote{Attention!} beginners do not properly understand these |
| 2976 |
floating environments\Index[indexmain]{floating environments}. They often ask |
| 2977 |
to specify the exact position of a table or figure within the text. However, |
| 2978 |
this is usually unnecessary, since the text will contain references to these |
| 2979 |
floating environments. It is also not sensible because such an object can only |
| 2980 |
be set on the page if there is enough space left for it. If this is not the |
| 2981 |
case, the object would have to be shifted onto the next page, possibly leaving |
| 2982 |
a huge empty space on the previous page. |
| 2983 |
|
| 2984 |
Often\textnote{Attention!} a document will use the same optional argument to |
| 2985 |
position every floating object. This also makes no sense. In such cases, you |
| 2986 |
should instead change the default value globally. For more details, see |
| 2987 |
\cite{DANTE:FAQ}. |
| 2988 |
|
| 2989 |
One\textnote{Attention!} final, important note before starting this section: |
| 2990 |
most of mechanisms described here, which extend the capabilities of the |
| 2991 |
standard classes, no longer work correctly when used with packages that modify |
| 2992 |
the appearance of figure and table captions. This should be self-evident, but |
| 2993 |
it is often overlooked. |
| 2994 |
|
| 2995 |
\begin{Declaration} |
| 2996 |
\begin{Environment}{figure} |
| 2997 |
\end{Environment} |
| 2998 |
\begin{Environment}{figure*} |
| 2999 |
\end{Environment} |
| 3000 |
\begin{Environment}{figure-} |
| 3001 |
\end{Environment} |
| 3002 |
\begin{Environment}{table} |
| 3003 |
\end{Environment} |
| 3004 |
\begin{Environment}{table*} |
| 3005 |
\end{Environment} |
| 3006 |
\begin{Environment}{table-} |
| 3007 |
\end{Environment} |
| 3008 |
\end{Declaration} |
| 3009 |
The KOMA-Script{} classes \Class{scrbook}, \Class{scrreprt}, |
| 3010 |
and \Class{scrartcl} use the \DescRef{tocbasic.cmd.DeclareNewTOC} statement |
| 3011 |
documented in \autoref{sec:tocbasic.declarenewtoc}, |
| 3012 |
\DescPageRef{tocbasic.cmd.DeclareNewTOC} to define the \Environment{figure} |
| 3013 |
and \Environment{table} environments familiar from the standard classes. Of |
| 3014 |
course, this also defines the \Environment{figure*} and \Environment{table*} |
| 3015 |
environments provided for the two-column mode, which are intended for |
| 3016 |
cross-column figures and tables at the top of the page. Since in addition to |
| 3017 |
the \Option{float} setting the definition also uses |
| 3018 |
\Option{nonfloat}\ChangedAt{v3.36}{\Class{scrartcl}\and \Class{scrbook}\and |
| 3019 |
\Class{scrreprt}}, the non-floating environments \Environment{figure-} and |
| 3020 |
\Environment{table-} are also defined. These can be used like the other |
| 3021 |
environments and ultimately span a \Environment{minipage} with appropriate |
| 3022 |
spacing before and after it. With\textnote{Attention!} mixed use of floating |
| 3023 |
and non-floating environments, the user himself is responsible for the correct |
| 3024 |
order in output and thus in numbering.% |
| 3025 |
\EndIndexGroup |
| 3026 |
|
| 3027 |
\begin{Declaration} |
| 3028 |
\OptionVName{captions}{setting} |
| 3029 |
\end{Declaration} |
| 3030 |
In the standard classes, the titles of floating environments, which are |
| 3031 |
formatted with the \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption} command |
| 3032 |
(see below), are set off from the float with vertical spacing appropriate for |
| 3033 |
putting the caption beneath the float, like a signature. They also distinguish |
| 3034 |
between one-line and multi-line captions. One-line captions are centred while |
| 3035 |
multi-line captions are left-justified. |
| 3036 |
|
| 3037 |
\leavevmode\LabelOptionValue{captions}{tableheading}\nobreak% |
| 3038 |
For tables, however, you want the caption% |
| 3039 |
\important{\Option{captions}{tableheading}} to appear as a heading instead of |
| 3040 |
a signature. That's because tables can span multiple pages. With such tables, |
| 3041 |
the reader wants to know the purpose of the table on the first page. |
| 3042 |
Furthermore, tables are usually read row by row, from top to bottom. So there |
| 3043 |
are normally at least two good reasons to provide all tables with headings. |
| 3044 |
\KOMAScript{} therefore offers the \OptionValue{captions}{tableheading}% |
| 3045 |
\IndexOption{captions~=\textKValue{tableheading}} option, which changes the |
| 3046 |
formatting of table captions for use above the |
| 3047 |
table. Internally\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3048 |
\Class{scrartcl}}, this is achieved by using the \Package{tocbasic} option |
| 3049 |
\OptionValueRef{tocbasic}{tablecaptionposition}{top}% |
| 3050 |
\IndexOption{tablecaptionposition~=top}. |
| 3051 |
|
| 3052 |
Note\textnote{Attention!} that multi-page tabulars cannot use a floating |
| 3053 |
environment. To have an automatic page break in a tabular you need an |
| 3054 |
additional package like \Package{longtable}\IndexPackage{longtable} (see |
| 3055 |
\cite{package:longtable}) or \Package{supertabular}\IndexPackage{supertabular} |
| 3056 |
(see \cite{package:supertabular}). |
| 3057 |
|
| 3058 |
You\important{\OptionValue{captions}{tablesignature}} can switch back to the |
| 3059 |
default caption formatting using \OptionValue{captions}{tablesignature}% |
| 3060 |
\IndexOption{captions~=\textKValue{tablesignature}}. Internally\ChangedAt{v3.46}{\Class{scrbook}\and |
| 3061 |
\Class{scrreprt}\and \Class{scrartcl}}, this is achieved by using the |
| 3062 |
\Package{tocbasic} option |
| 3063 |
\OptionValueRef{tocbasic}{tablecaptionposition}{bottom}% |
| 3064 |
\IndexOption{tablecaptionposition~=bottom}. |
| 3065 |
|
| 3066 |
Note\textnote{Attention!} |
| 3067 |
that these options change only the formatting, not the actual position of the |
| 3068 |
caption. Whether the caption is placed above or below a float depends solely |
| 3069 |
upon where you use the \DescRef{\LabelBase.cmd.caption} command inside float |
| 3070 |
environment. However, this can change when using the \Package{float}% |
| 3071 |
\IndexPackage{float} package with the \Macro{restylefloats} command (see |
| 3072 |
\cite{package:float}). |
| 3073 |
|
| 3074 |
Of course\important{\OptionValue{captions}{figureheading}\\ |
| 3075 |
\OptionValue{captions}{figuresignature}}, corresponding functions |
| 3076 |
exist\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3077 |
\Class{scrartcl}} for figures using the options |
| 3078 |
\OptionValue{captions}{figureheading}% |
| 3079 |
\IndexOption{captions~=\textKValue{figureheading}} and |
| 3080 |
\OptionValue{captions}{figuresignature}% |
| 3081 |
\IndexOption{captions~=\textKValue{figuresignature}}. |
| 3082 |
Internally\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3083 |
\Class{scrartcl}}, this is achieved by using the \Package{tocbasic} option |
| 3084 |
\OptionValueRef{tocbasic}{figurecaptionposition}{top}% |
| 3085 |
\IndexOption{figurecaptionposition~=top} |
| 3086 |
resp. \OptionValueRef{tocbasic}{figurecaptionposition}{bottom}% |
| 3087 |
\IndexOption{figurecaptionposition~=bottom}. However, figures such as photos |
| 3088 |
tend to be viewed as a whole, and a diagram or graph will mostly be examined |
| 3089 |
starting from the lower left. Therefore, it only rarely makes sense to change |
| 3090 |
the caption format for figures alone from signatures to headings. |
| 3091 |
|
| 3092 |
Sometimes, however, all floating environments should use headings. Therefore |
| 3093 |
\KOMAScript{} provides\ChangedAt{v3.09}{\Class{scrbook}\and |
| 3094 |
\Class{scrreprt}\and \Class{scrartcl}} |
| 3095 |
options\important{\OptionValue{captions}{heading}\\ |
| 3096 |
\OptionValue{captions}{signature}} |
| 3097 |
\OptionValue{captions}{heading}\IndexOption{captions~=\textKValue{heading}} |
| 3098 |
and \OptionValue{captions}{signature}% |
| 3099 |
\IndexOption{captions~=\textKValue{signature}} to switch the format of every |
| 3100 |
floating environment. Internally\ChangedAt{v3.46}{\Class{scrbook}\and |
| 3101 |
\Class{scrreprt}\and \Class{scrartcl}}, this is achieved by using the |
| 3102 |
\Package{tocbasic} option \OptionValueRef{tocbasic}{captionposition}{top}% |
| 3103 |
\IndexOption{captionposition~=top} |
| 3104 |
resp. \OptionValueRef{tocbasic}{captionposition}{bottom}% |
| 3105 |
\IndexOption{figurecaptionposition~=bottom}. |
| 3106 |
|
| 3107 |
Please note\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float} |
| 3108 |
when using the \Package{float} package that the settings for signatures or |
| 3109 |
headings will no longer work once \Macro{restylefloat} is applied to tables or |
| 3110 |
figures. For details about the \Package{float} package and |
| 3111 |
\Macro{restylefloat}, please refer to \cite{package:float}. This also applies |
| 3112 |
to \DescRef{\LabelBase.cmd.caption} within new floating environments defined |
| 3113 |
with \Package{float}. You can find additional support which \KOMAScript{} |
| 3114 |
provides when using the \Package{float} package in the explanation of |
| 3115 |
\PValue{komaabove} (see \DescPageRef{\LabelBase.floatstyle.komaabove}). As an |
| 3116 |
alternative to \Package{float}, you can also consult |
| 3117 |
\DescRef{\LabelBase.cmd.captionof} (see |
| 3118 |
\DescPageRef{\LabelBase.cmd.captionof}) and |
| 3119 |
\DescRef{tocbasic.cmd.DeclareNewTOC} (see |
| 3120 |
\DescPageRef{tocbasic.cmd.DeclareNewTOC}). Additionally, when using |
| 3121 |
\Package{float}, the |
| 3122 |
\href{https://www.ctan.org/pkg/floatbytocbasic}{\Package{floatbytocbasic}}% |
| 3123 |
\IndexPackage{floatbytocbasic}% |
| 3124 |
\important{% |
| 3125 |
\href{https://www.ctan.org/pkg/floatbytocbasic}{\Package{floatbytocbasic}}} |
| 3126 |
package is expressly recommended (see \cite{pkg:floatbytocbasic:manual}). |
| 3127 |
|
| 3128 |
\leavevmode |
| 3129 |
\LabelOptionValue{captions}{nooneline}\nobreak |
| 3130 |
\LabelOptionValue{captions}{oneline}\nobreak |
| 3131 |
Furthermore\important{\OptionValue{captions}{nooneline}}, \KOMAScript{} offers |
| 3132 |
the option to disable the distinction between one-line and multi-line captions |
| 3133 |
using the \OptionValue{captions}{nooneline}% |
| 3134 |
\IndexOption{captions~=\textKValue{nooneline}}% |
| 3135 |
\important{\OptionValue{captions}{nooneline}} option. This can be useful, for |
| 3136 |
example, if you do not want one-line captions to be centred. The default, |
| 3137 |
where one-line captions are centred, corresponds to |
| 3138 |
\OptionValue{captions}{oneline}. |
| 3139 |
|
| 3140 |
Another special feature of \KOMAScript{} is the ability to put the caption |
| 3141 |
beside the floating object rather than above or below it. For this, you need |
| 3142 |
the environment\important{\DescRef{\LabelBase.env.captionbeside}} |
| 3143 |
\DescRef{\LabelBase.env.captionbeside}\IndexEnv{captionbeside}, which is |
| 3144 |
explained starting on \DescPageRef{\LabelBase.env.captionbeside}. The settings |
| 3145 |
for this environment can also be changed with the \Option{caption} option. You |
| 3146 |
can find the available values for the corresponding \PName{settings} in |
| 3147 |
\autoref{tab:\LabelBase.captions}. |
| 3148 |
% |
| 3149 |
\begin{desclist} |
| 3150 |
\desccaption[{Available values for the \Option{captions}} option]{% |
| 3151 |
Available values for the \Option{captions} option for setting formatting of |
| 3152 |
captions as headings or signatures in floating environments% |
| 3153 |
\label{tab:\LabelBase.captions}% |
| 3154 |
}{% |
| 3155 |
Available values for the \Option{captions} option (\emph{continued})% |
| 3156 |
}% |
| 3157 |
\entry{\PValue{bottombeside}, \PValue{besidebottom}}{% |
| 3158 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3159 |
\autoref{sec:\LabelBase.floats}, |
| 3160 |
\DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with |
| 3161 |
the bottommost baseline of the contents of the floating environment.% |
| 3162 |
\IndexOption{captions~=\textKValue{bottombeside}}}% |
| 3163 |
\entry{\PValue{centeredbeside}, \PValue{besidecentered}, |
| 3164 |
\PValue{middlebeside}, \PValue{besidemiddle}}{% |
| 3165 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3166 |
\autoref{sec:\LabelBase.floats}, |
| 3167 |
\DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with |
| 3168 |
the center of the contents of the floating environment.% |
| 3169 |
\IndexOption{captions~=\textKValue{centeredbeside}}}% |
| 3170 |
\entry{\PValue{figureheading}, \PValue{figureabove}, \PValue{abovefigure}, |
| 3171 |
\PValue{topatfigure}% |
| 3172 |
\IndexOption{captions~=\textKValue{figureheading}}}{% |
| 3173 |
\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3174 |
\Class{scrartcl}}% |
| 3175 |
Captions for figures use heading format\,---\,possibly deviating from |
| 3176 |
\OptionValue{captions}{signature}. This\ChangedAt{v3.46}{\Class{scrbook}\and |
| 3177 |
\Class{scrreprt}\and \Class{scrartcl}} option is based on option |
| 3178 |
\OptionValueRef{tocbasic}{figurecaptionposition}{top}% |
| 3179 |
\IndexOption{figurecaptionposition~=\KValue{top}} from package |
| 3180 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3181 |
\autopageref{sec:tocbasic.caption}.% |
| 3182 |
}% |
| 3183 |
\entry{\PValue{figuresignature}, \PValue{belowfigure}, |
| 3184 |
\PValue{bottomatfiggure}% |
| 3185 |
\IndexOption{captions~=\textKValue{figuresignature}}}{% |
| 3186 |
\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3187 |
\Class{scrartcl}}% |
| 3188 |
Captions for figures use signature format\,---\,possibly deviating from |
| 3189 |
\OptionValue{captions}{headings}. This\ChangedAt{v3.46}{\Class{scrbook}\and |
| 3190 |
\Class{scrreprt}\and \Class{scrartcl}} option is based on option |
| 3191 |
\OptionValueRef{tocbasic}{figurecaptionposition}{bottom}% |
| 3192 |
\IndexOption{figurecaptionposition~=\KValue{bottom}} from package |
| 3193 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3194 |
\autopageref{sec:tocbasic.caption}.% |
| 3195 |
}% |
| 3196 |
\entry{\PValue{heading}, \PValue{above}, \PValue{top}% |
| 3197 |
\IndexOption{captions~=\textKValue{heading}}}{% |
| 3198 |
\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3199 |
\Class{scrartcl}} Captions for floating environments use formatting |
| 3200 |
suitable for use in a heading. This setting does not control whether they |
| 3201 |
are placed at the top or the bottom of the |
| 3202 |
object. This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3203 |
\Class{scrartcl}} option also implies |
| 3204 |
\OptionValue{captions}{tableheading} and |
| 3205 |
\OptionValue{captions}{figureheading}. This option is based on option |
| 3206 |
\OptionValueRef{tocbasic}{captionposition}{top}% |
| 3207 |
\IndexOption{captionposition~=\KValue{top}} from package |
| 3208 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3209 |
\autopageref{sec:tocbasic.caption}.% |
| 3210 |
}% |
| 3211 |
\entry{\PValue{innerbeside}, |
| 3212 |
\PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{% |
| 3213 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3214 |
\autoref{sec:\LabelBase.floats}, |
| 3215 |
\DescPageRef{\LabelBase.env.captionbeside}) are placed inside of and next |
| 3216 |
to the contents of the environment in two-sided printing. In one-sided |
| 3217 |
printing, \OptionValue{captions}{leftbeside} is used.% |
| 3218 |
}% |
| 3219 |
\entry{\PValue{leftbeside}, |
| 3220 |
\PValue{besideleft}\IndexOption{captions~=\textKValue{leftbeside}}}{% |
| 3221 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3222 |
\autoref{sec:\LabelBase.floats}, |
| 3223 |
\DescPageRef{\LabelBase.env.captionbeside}) are placed to the left of the |
| 3224 |
contents of the floating environment.% |
| 3225 |
}% |
| 3226 |
\pventry{nooneline}{% |
| 3227 |
Single-line captions are handled the same as multi-line captions.% |
| 3228 |
\IndexOption{captions~=\textKValue{nooneline}}}% |
| 3229 |
\pventry{oneline}{% |
| 3230 |
Single-line captions are centred horizontally.% |
| 3231 |
\IndexOption{captions~=\textKValue{oneline}}}% |
| 3232 |
\entry{\PValue{outerbeside}, \PValue{besideouter}% |
| 3233 |
\IndexOption{captions~=\textKValue{outerbeside}}}{% |
| 3234 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3235 |
\autoref{sec:\LabelBase.floats}, |
| 3236 |
\DescPageRef{\LabelBase.env.captionbeside}) are placed outside of and next |
| 3237 |
to the contents of the environment in two-sided printing. In one-sided |
| 3238 |
printing, \OptionValue{captions}{rightbeside} is used.% |
| 3239 |
}% |
| 3240 |
\entry{\PValue{rightbeside}, \PValue{besideright}% |
| 3241 |
\IndexOption{captions~=\textKValue{rightbeside}}}{% |
| 3242 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3243 |
\autoref{sec:\LabelBase.floats}, |
| 3244 |
\DescPageRef{\LabelBase.env.captionbeside}) are placed to the right of the |
| 3245 |
contents of the floating environment.% |
| 3246 |
}% |
| 3247 |
\entry{\PValue{signature}, \PValue{below}, \PValue{bot}, \PValue{bottom}% |
| 3248 |
\IndexOption{captions~=\textKValue{signature}}}{% |
| 3249 |
\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3250 |
\Class{scrartcl}}% |
| 3251 |
Captions for floating environments use signature format. This setting does |
| 3252 |
not control whether they are placed at the top or the bottom of the |
| 3253 |
object. This options also implies \OptionValue{captions}{tablesignature} |
| 3254 |
and \OptionValue{captions}{figuresignature}. |
| 3255 |
This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3256 |
\Class{scrartcl}} option is based on option |
| 3257 |
\OptionValueRef{tocbasic}{captionposition}{bottom}% |
| 3258 |
\IndexOption{captionposition~=\KValue{bottom}} from package |
| 3259 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3260 |
\autopageref{sec:tocbasic.caption}.% |
| 3261 |
}% |
| 3262 |
\entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable}, |
| 3263 |
\PValue{abovetabular}, \PValue{topattable}% |
| 3264 |
\IndexOption{captions~=\textKValue{tableheading}}}{% |
| 3265 |
Captions for tables use heading format\,---\,possibly deviating from |
| 3266 |
\OptionValue{captions}{signature}. |
| 3267 |
This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3268 |
\Class{scrartcl}} option is based on option |
| 3269 |
\OptionValueRef{tocbasic}{tablecaptionposition}{top}% |
| 3270 |
\IndexOption{tablecaptionposition~=\KValue{top}} from package |
| 3271 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3272 |
\autopageref{sec:tocbasic.caption}.% |
| 3273 |
}% |
| 3274 |
\entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular}, |
| 3275 |
\PValue{bottomattable}% |
| 3276 |
\IndexOption{captions~=\textKValue{tablesignature}}}{% |
| 3277 |
Captions for tables use signature format\,---\,possibly deviating from |
| 3278 |
\OptionValue{captions}{heading}. |
| 3279 |
This\ChangedAt{v3.46}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3280 |
\Class{scrartcl}} option is based on option |
| 3281 |
\OptionValueRef{tocbasic}{tablecaptionposition}{bottom}% |
| 3282 |
\IndexOption{tablecaptionposition~=\KValue{bottom}} from package |
| 3283 |
\Package{tocbasic}. See \autoref{sec:tocbasic.caption}, from |
| 3284 |
\autopageref{sec:tocbasic.caption}.% |
| 3285 |
}% |
| 3286 |
\entry{\PValue{topbeside}, \PValue{besidetop}}{% |
| 3287 |
Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see |
| 3288 |
\autoref{sec:\LabelBase.floats}, |
| 3289 |
\DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned to the |
| 3290 |
baseline at the top of the floating environment.% |
| 3291 |
\IndexOption{captions~=\textKValue{topbeside}}}% |
| 3292 |
\end{desclist}% |
| 3293 |
% |
| 3294 |
\EndIndexGroup |
| 3295 |
|
| 3296 |
|
| 3297 |
\begin{Declaration} |
| 3298 |
\Macro{caption}\OParameter{entry}\Parameter{title} |
| 3299 |
\Macro{captionbelow}\OParameter{entry}\Parameter{title} |
| 3300 |
\Macro{captionabove}\OParameter{entry}\Parameter{title} |
| 3301 |
\Macro{captionof}\Parameter{float type}\OParameter{entry}% |
| 3302 |
\Parameter{title}% |
| 3303 |
\Macro{captionbelowof}\Parameter{float type}\OParameter{entry}% |
| 3304 |
\Parameter{title}% |
| 3305 |
\Macro{captionaboveof}\Parameter{float type}\OParameter{entry}% |
| 3306 |
\Parameter{title} |
| 3307 |
\end{Declaration}% |
| 3308 |
With regard to the general function of these commands for setting a caption |
| 3309 |
for tables and figures, please refer to \autoref{sec:tocbasic.caption}, from |
| 3310 |
\autopageref{sec:tocbasic.caption}. |
| 3311 |
|
| 3312 |
\BeginIndex[indexother]{}{font>style}% |
| 3313 |
\BeginIndex{FontElement}{caption}\LabelFontElement{caption}% |
| 3314 |
\BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}% |
| 3315 |
The font style\ChangedAt{v2.8p}{% |
| 3316 |
\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} for the description |
| 3317 |
and the label\,---\,``Figure'' or ``Table'', followed by the number and the |
| 3318 |
delimiter\,---\,can be changed with the commands |
| 3319 |
\DescRef{\LabelBase.cmd.setkomafont} and |
| 3320 |
\DescRef{\LabelBase.cmd.addtokomafont} (see |
| 3321 |
\autoref{sec:\LabelBase.textmarkup}, |
| 3322 |
\DescPageRef{\LabelBase.cmd.setkomafont}). The respective elements for this |
| 3323 |
are \FontElement{caption}\important[i]{\FontElement{caption}\\ |
| 3324 |
\FontElement{captionlabel}} and \FontElement{captionlabel} (see |
| 3325 |
\autoref{tab:\LabelBase.fontelements}, |
| 3326 |
\autopageref{tab:\LabelBase.fontelements}). The font style for the element |
| 3327 |
\FontElement{caption} is applied to the element \FontElement{captionlabel} |
| 3328 |
before the font style of \FontElement{captionlabel} itself is applied. The |
| 3329 |
default settings are listed in \autoref{tab:\LabelBase.captionFont}. |
| 3330 |
% |
| 3331 |
\begin{table} |
| 3332 |
% \centering% |
| 3333 |
% \caption |
| 3334 |
\begin{captionbeside} |
| 3335 |
{Font defaults for the elements of figure or table captions} |
| 3336 |
[l] |
| 3337 |
\begin{tabular}[t]{ll} |
| 3338 |
\toprule |
| 3339 |
element & default \\ |
| 3340 |
\midrule |
| 3341 |
\DescRef{\LabelBase.fontelement.caption} & \Macro{normalfont} \\ |
| 3342 |
\DescRef{\LabelBase.fontelement.captionlabel} & \Macro{normalfont}\\ |
| 3343 |
\bottomrule |
| 3344 |
\end{tabular} |
| 3345 |
\end{captionbeside} |
| 3346 |
\label{tab:\LabelBase.captionFont} |
| 3347 |
\end{table} |
| 3348 |
% |
| 3349 |
\begin{Example} |
| 3350 |
You want the table and figure descriptions typeset in a smaller font |
| 3351 |
size. Thus you could write the following in the preamble of your |
| 3352 |
document: |
| 3353 |
\begin{lstcode} |
| 3354 |
\addtokomafont{caption}{\small} |
| 3355 |
\end{lstcode} |
| 3356 |
Furthermore, you would like the labels to be printed in sans serif and |
| 3357 |
bold. You add: |
| 3358 |
\begin{lstcode} |
| 3359 |
\setkomafont{captionlabel}{\sffamily\bfseries} |
| 3360 |
\end{lstcode} |
| 3361 |
As you can see, simple extensions of the default definitions are |
| 3362 |
possible. |
| 3363 |
\end{Example}% |
| 3364 |
\EndIndexGroup |
| 3365 |
\ExampleEndFix |
| 3366 |
|
| 3367 |
\begin{Declaration} |
| 3368 |
\begin{Environment}{captionbeside} |
| 3369 |
\OParameter{short title} |
| 3370 |
\Parameter{caption text} |
| 3371 |
\OParameter{placement} |
| 3372 |
\OParameter{width} |
| 3373 |
\OParameter{offset} |
| 3374 |
\end{Environment} |
| 3375 |
\labelsuffix[*]% |
| 3376 |
\begin{Environment}{captionbeside} |
| 3377 |
\OParameter{short title} |
| 3378 |
\Parameter{caption text} |
| 3379 |
\OParameter{placement} |
| 3380 |
\OParameter{width} |
| 3381 |
\OParameter{offset}\PValue{*}% |
| 3382 |
\end{Environment} |
| 3383 |
\end{Declaration} |
| 3384 |
In addition\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3385 |
\Class{scrartcl}} to captions above and below the figure, you will often |
| 3386 |
find captions, in particular for small figures, which are placed beside the |
| 3387 |
figure. The bottom edge of the caption is normally aligned with the bottom of |
| 3388 |
the figure. Of course, you can achieve the same thing in the standard classes |
| 3389 |
with some fiddling and the use of two \Macro{parbox} commands. However, |
| 3390 |
\KOMAScript{} offers a special environment for this which you can use within |
| 3391 |
the floating environments. The first optional parameter, |
| 3392 |
\PName{short title}\important{\PName{short title}\\\PName{caption text}}, and |
| 3393 |
the required parameter \PName{caption text} have the same meaning as the |
| 3394 |
corresponding parameters of \DescRef{\LabelBase.cmd.caption}, |
| 3395 |
\DescRef{\LabelBase.cmd.captionabove} or |
| 3396 |
\DescRef{\LabelBase.cmd.captionbelow}. The \PName{caption text} is |
| 3397 |
placed beside the content of the environment in this case. |
| 3398 |
|
| 3399 |
The \PName{placement}\important{\PName{placement}} parameter can determine |
| 3400 |
whether the \PName{caption text} is placed on the left or the right. Exactly |
| 3401 |
one of the following letters is allowed: |
| 3402 |
\begin{labeling}[~--]{\quad\PValue{o}}\setlength{\itemsep}{-1\parsep plus 1ex}% |
| 3403 |
\item[\PValue{l}] left |
| 3404 |
\item[\PValue{r}] right |
| 3405 |
\item[\PValue{i}] inner margin in two-sided printing |
| 3406 |
\item[\PValue{o}] outer margin in two-sided printing |
| 3407 |
\end{labeling} |
| 3408 |
The default placement is to the right of the content of the environment. You |
| 3409 |
can change this default\ChangedAt{v3.00}{\Class{scrbook}\and |
| 3410 |
\Class{scrreprt}\and \Class{scrartcl}} using the |
| 3411 |
\DescRef{\LabelBase.option.captions}\IndexOption{captions}% |
| 3412 |
\important{\DescRef{\LabelBase.option.captions}} option (see |
| 3413 |
\DescPageRef{\LabelBase.option.captions}) with values like |
| 3414 |
\PValue{innerbeside}\IndexOption[indexmain]{captions~=\textKValue{innerbeside}}, |
| 3415 |
\PValue{leftbeside}\IndexOption[indexmain]{captions~=\textKValue{leftbeside}}, |
| 3416 |
\PValue{outerbeside}\IndexOption[indexmain]{captions~=\textKValue{outerbeside}}, |
| 3417 |
and |
| 3418 |
\PValue{rightbeside}\IndexOption[indexmain]{captions~=\textKValue{rightbeside}}. |
| 3419 |
If either \PValue{o} or \PValue{i} are used you may need to run {\LaTeX} twice |
| 3420 |
to obtain the correct placement. |
| 3421 |
|
| 3422 |
Normally\important{\PName{width}}, the content of the environment and the |
| 3423 |
\PName{caption text} fill the entire available text width. However, you can |
| 3424 |
specify a different width using the optional parameter \PName{width}. This can |
| 3425 |
be greater than the current text width. |
| 3426 |
|
| 3427 |
When specifying a \PName{width}\important{\PName{width}\\\PName{offset}}, the |
| 3428 |
width used is usually centred with respect to the body text. Using the |
| 3429 |
optional parameter \PName{offset}, you can shift the environment relative to |
| 3430 |
the left margin. A positive value corresponds to a shift to the right, whereas |
| 3431 |
a negative value corresponds to a shift to the left. An \PName{offset} of |
| 3432 |
0\Unit{pt} gives you a left-aligned output. |
| 3433 |
|
| 3434 |
If\important{\PValue{*}} you add a star to the optional \PName{offset} |
| 3435 |
parameter, the value represents a shift relative to the right margin on |
| 3436 |
left-hand pages in a two-sided layout. A positive value corresponds to a shift |
| 3437 |
towards the outer margin, whereas a negative value corresponds to a shift |
| 3438 |
towards the inner margin. An \PName{offset} of 0\Unit{pt} means alignment with |
| 3439 |
the inner margin. This variant may require two {\LaTeX} runs to achieve the |
| 3440 |
correct offset. |
| 3441 |
|
| 3442 |
The default vertical alignment is bottom. This means that the bottommost base |
| 3443 |
lines of the contents of the environment and of the caption are aligned. |
| 3444 |
You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3445 |
\Class{scrartcl}} can change this setting using the |
| 3446 |
\DescRef{\LabelBase.option.captions}\IndexOption{captions}% |
| 3447 |
\important{\DescRef{\LabelBase.option.captions}} option (see |
| 3448 |
\DescPageRef{\LabelBase.option.captions}) with the value |
| 3449 |
\PValue{topbeside}\IndexOption[indexmain]{captions~=\textKValue{topbeside}}, |
| 3450 |
\PValue{centeredbeside}% |
| 3451 |
\IndexOption[indexmain]{captions~=\textKValue{centeredbeside}}, or |
| 3452 |
\PValue{bottombeside}% |
| 3453 |
\IndexOption[indexmain]{captions~=\textKValue{bottombeside}}. |
| 3454 |
With the setting \PValue{topbeside}, the topmost base lines of the environment |
| 3455 |
contents and caption will be aligned. With \PValue{centeredbeside}, they will |
| 3456 |
be centred vertically. In this context, note that the base line of a figure is |
| 3457 |
usually the bottom of the figure. You can change this using, for example, |
| 3458 |
\Macro{raisebox}\IndexCmd{raisebox}. |
| 3459 |
|
| 3460 |
\begin{Example} |
| 3461 |
You can find an example using the \Environment{captionbeside} environment in |
| 3462 |
\autoref{fig:\LabelBase.captionbeside}. This figure was typeset with: |
| 3463 |
\begin{lstcode} |
| 3464 |
\begin{figure} |
| 3465 |
\begin{captionbeside}[Example: Figure beside description]% |
| 3466 |
{A figure description which is neither above nor |
| 3467 |
below, but beside the figure}[i][\linewidth][% |
| 3468 |
[i][\linewidth][% |
| 3469 |
\dimexpr\marginparwidth+\marginparsep\relax]* |
| 3470 |
\fbox{% |
| 3471 |
\parbox[b][5\baselineskip][c]{.25\textwidth} |
| 3472 |
{% |
| 3473 |
\hspace*{\fill}\KOMAScript |
| 3474 |
\hspace*{\fill}\par |
| 3475 |
}% |
| 3476 |
} |
| 3477 |
\end{captionbeside} |
| 3478 |
\label{fig:\LabelBase.captionbeside} |
| 3479 |
\end{figure} |
| 3480 |
\end{lstcode} |
| 3481 |
\begin{figure} |
| 3482 |
\begin{captionbeside}[Example: Figure beside description]% |
| 3483 |
{A figure description which is neither above nor |
| 3484 |
below, but beside the figure}[i][\linewidth][2em]* |
| 3485 |
\fbox{% |
| 3486 |
\parbox[b][5\baselineskip][c]{.25\textwidth}{% |
| 3487 |
\hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} |
| 3488 |
\end{captionbeside} |
| 3489 |
\label{fig:\LabelBase.captionbeside} |
| 3490 |
\end{figure} |
| 3491 |
The total width is thus the currently available width of |
| 3492 |
\PValue{\Macro{linewidth}}. However, this width is shifted |
| 3493 |
$\Length{marginparwidth} + \Length{marginparsep}$ to the outside. The |
| 3494 |
caption text or description is placed on the inner side beside the figure. |
| 3495 |
The figure itself is shifted 2\Unit{em} into the outer margin. |
| 3496 |
|
| 3497 |
\iffalse% Umbruchkorrekturtext |
| 3498 |
The \Macro{dimexp} macro is an \eTeX{} command. This should not be a |
| 3499 |
problem at all because \KOMAScript{} itself requires \eTeX{} and every almost |
| 3500 |
up-to-date \LaTeX{} distribution uses \eTeX already. |
| 3501 |
\fi |
| 3502 |
|
| 3503 |
\hyperref[fig:\LabelBase.captionbesidecentered]% |
| 3504 |
{Figure~\ref*{fig:\LabelBase.captionbesidecentered}} |
| 3505 |
shows a centred caption with: |
| 3506 |
\begin{lstcode} |
| 3507 |
\KOMAoption{captions}{centeredbeside} |
| 3508 |
\end{lstcode} |
| 3509 |
\iffalse % Umbruchalternativen |
| 3510 |
Even a typographical novice will immediately realize that you should |
| 3511 |
usually avoid this alignment. |
| 3512 |
\else |
| 3513 |
This is certainly not a recommended solution. |
| 3514 |
\fi |
| 3515 |
|
| 3516 |
\begin{figure} |
| 3517 |
\begin{captionbeside}[Example: Description centered beside figure]% |
| 3518 |
{A figure description which is neither above nor |
| 3519 |
below, but centred beside the figure}[i][\linewidth][2em]* |
| 3520 |
\fbox{% |
| 3521 |
\parbox[b][5\baselineskip][c]{.25\textwidth}{% |
| 3522 |
\hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} |
| 3523 |
\end{captionbeside} |
| 3524 |
\label{fig:\LabelBase.captionbesidecentered} |
| 3525 |
\end{figure} |
| 3526 |
|
| 3527 |
In contrast, you can use the top-aligned format seen in |
| 3528 |
\autoref{fig:\LabelBase.captionbesidetop}. To illustrate how to shift the |
| 3529 |
baseline using \Macro{raisebox}, here is a complete example. You can apply |
| 3530 |
this not only to a substitute figure, as previously shown, but also, for |
| 3531 |
example, to \Macro{includegraphics} (see \cite{package:graphics}). |
| 3532 |
\begin{lstcode} |
| 3533 |
\documentclass[captions=topbeside]{scrbook} |
| 3534 |
\usepackage[english]{babel} |
| 3535 |
\usepackage{graphics} |
| 3536 |
\begin{document} |
| 3537 |
\chapter{An Example} |
| 3538 |
\begin{figure} |
| 3539 |
\begin{captionbeside}% |
| 3540 |
[Example: Figure title top beside]% |
| 3541 |
{A figure description which is neither above nor |
| 3542 |
below, but top beside the figure}% |
| 3543 |
[i][\linewidth][% |
| 3544 |
\dimexpr\marginparwidth+\marginparsep\relax |
| 3545 |
]* |
| 3546 |
\raisebox{% |
| 3547 |
\dimexpr\baselineskip-\totalheight\relax |
| 3548 |
}{% |
| 3549 |
\includegraphics{examplepicture}% |
| 3550 |
}% |
| 3551 |
\end{captionbeside} |
| 3552 |
\label{fig:\LabelBase.captionbesidetop} |
| 3553 |
\end{figure} |
| 3554 |
\end{document} |
| 3555 |
\end{lstcode} |
| 3556 |
\begin{figure} |
| 3557 |
\KOMAoption{captions}{topbeside} |
| 3558 |
\begin{captionbeside}[Example: Figure title top beside]% |
| 3559 |
{A figure description which is neither above nor |
| 3560 |
below, but top beside the figure}% |
| 3561 |
[i][\linewidth] |
| 3562 |
\raisebox{\dimexpr\baselineskip-\totalheight}{% |
| 3563 |
\fbox{% |
| 3564 |
\parbox[b][5\baselineskip][c]{.25\textwidth}{% |
| 3565 |
\hspace*{\fill}\KOMAScript\hspace*{\fill}\par}}% |
| 3566 |
}% |
| 3567 |
\end{captionbeside} |
| 3568 |
\label{fig:\LabelBase.captionbesidetop} |
| 3569 |
\end{figure} |
| 3570 |
\end{Example} |
| 3571 |
% |
| 3572 |
\EndIndexGroup |
| 3573 |
|
| 3574 |
|
| 3575 |
\begin{Declaration} |
| 3576 |
\begin{Environment}{captionofbeside} |
| 3577 |
\Parameter{float type} |
| 3578 |
\OParameter{short title} |
| 3579 |
\Parameter{caption text} |
| 3580 |
\OParameter{placement} |
| 3581 |
\OParameter{width} |
| 3582 |
\OParameter{offset} |
| 3583 |
\begin{Body}\BodyDots\end{Body} |
| 3584 |
\end{Environment} |
| 3585 |
\labelsuffix[*]% |
| 3586 |
\begin{Environment}{captionofbeside} |
| 3587 |
\Parameter{float type} |
| 3588 |
\OParameter{short title} |
| 3589 |
\Parameter{caption text} |
| 3590 |
\OParameter{placement} |
| 3591 |
\OParameter{width} |
| 3592 |
\OParameter{offset}\PValue{*}% |
| 3593 |
\begin{Body}\BodyDots\end{Body} |
| 3594 |
\end{Environment} |
| 3595 |
\end{Declaration} |
| 3596 |
As\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3597 |
\Class{scrartcl}} is the case for \DescRef{\LabelBase.cmd.caption}, there is |
| 3598 |
a variant for \DescRef{\LabelBase.cmd.captionof} where the \PName{float type} |
| 3599 |
is not defined by using it within a floating environment of this type, so you |
| 3600 |
can specify a suitable environment for \DescRef{\LabelBase.env.captionbeside} |
| 3601 |
with \Environment{captionofbeside}. In contrast to |
| 3602 |
\DescRef{\LabelBase.env.captionbeside}, the \PName{float type} must be |
| 3603 |
specified as an additional, first argument.% |
| 3604 |
% |
| 3605 |
\EndIndexGroup |
| 3606 |
|
| 3607 |
\begin{Declaration} |
| 3608 |
\FloatStyle{komaabove}% |
| 3609 |
\FloatStyle{komabelow} |
| 3610 |
\end{Declaration}% |
| 3611 |
If you use\OnlyAt{\Package{float}} the \Package{float}\IndexPackage{float} |
| 3612 |
package, the appearance of the float environments is solely defined by the |
| 3613 |
\emph{float} style. This includes whether captions appear above or below. In |
| 3614 |
the \Package{float} package, there is no predefined style which gives you the |
| 3615 |
same output and offers the same setting options (see below) as \KOMAScript{}. |
| 3616 |
Therefore \KOMAScript{} defines the two additional styles, \PValue{komaabove} |
| 3617 |
and \PValue{komabelow}. When using the \Package{float} package, you can |
| 3618 |
activate these styles just like the styles |
| 3619 |
\PValue{plain}\IndexFloatstyle{plain}, \PValue{boxed}\IndexFloatstyle{boxed}, |
| 3620 |
or \PValue{ruled}\IndexFloatstyle{ruled} defined in \Package{float}. For |
| 3621 |
details refer to \cite{package:float}. The style \PValue{komaabove} inserts |
| 3622 |
\DescRef{\LabelBase.cmd.caption}, \DescRef{\LabelBase.cmd.captionabove}, and |
| 3623 |
\DescRef{\LabelBase.cmd.captionbelow} above, whereas \PValue{komabelow} |
| 3624 |
inserts them below the float content. |
| 3625 |
% |
| 3626 |
\EndIndexGroup |
| 3627 |
|
| 3628 |
|
| 3629 |
\begin{Declaration} |
| 3630 |
\Macro{captionformat} |
| 3631 |
\end{Declaration}% |
| 3632 |
In {\KOMAScript} there are various ways to change the formatting of |
| 3633 |
the caption text. The definition of different font styles has already |
| 3634 |
been explained above. The delimiter or delimiters between the label and |
| 3635 |
actual caption text is specified by the macro \Macro{captionformat}. |
| 3636 |
In contrast to all other \Macro{\dots}format commands, this is not the counter |
| 3637 |
but only the items which follow it. The original definition is: |
| 3638 |
\begin{lstcode} |
| 3639 |
\newcommand*{\captionformat}{:\ } |
| 3640 |
\end{lstcode} |
| 3641 |
You can change this too with \Macro{renewcommand}. |
| 3642 |
\begin{Example} |
| 3643 |
For some inexplicable reason, you want a dash surrounded by spaces |
| 3644 |
instead of a colon followed by a space as a label delimiter. You |
| 3645 |
therefore define: |
| 3646 |
\begin{lstcode} |
| 3647 |
\renewcommand*{\captionformat}{~--~} |
| 3648 |
\end{lstcode} |
| 3649 |
This definition should be put in the preamble of your document. |
| 3650 |
\end{Example} |
| 3651 |
% |
| 3652 |
\EndIndexGroup |
| 3653 |
|
| 3654 |
|
| 3655 |
\begin{Declaration} |
| 3656 |
\Macro{figureformat}% |
| 3657 |
\Macro{tableformat} |
| 3658 |
\end{Declaration}% |
| 3659 |
It has already been mentioned that \DescRef{\LabelBase.cmd.captionformat} does |
| 3660 |
not contain formatting for the label itself. You should not alter this by |
| 3661 |
redefining the commands for the output of the \Macro{thefigure} or |
| 3662 |
\Macro{thetable} counters. Such a redefinition would have unwanted side |
| 3663 |
effects on the output of \Macro{ref}, the table of contents, the list of |
| 3664 |
figures, and the list of tables. Instead, {\KOMAScript} offers two |
| 3665 |
\Macro{\dots format} commands. These have the following defaults: |
| 3666 |
\begin{lstcode} |
| 3667 |
\newcommand*{\figureformat}{\figurename~\thefigure\autodot} |
| 3668 |
\newcommand*{\tableformat}{\tablename~\thetable\autodot} |
| 3669 |
\end{lstcode} |
| 3670 |
They can also be customised to your requirements with \Macro{renewcommand}. |
| 3671 |
\begin{Example} |
| 3672 |
From time to time, it is required to have captions without labels or |
| 3673 |
delimiters. With {\KOMAScript} the following definitions suffice to |
| 3674 |
achieve this: |
| 3675 |
\begin{lstcode} |
| 3676 |
\renewcommand*{\figureformat}{} |
| 3677 |
\renewcommand*{\tableformat}{} |
| 3678 |
\renewcommand*{\captionformat}{} |
| 3679 |
\end{lstcode} |
| 3680 |
It should be noted, however, that although no numbering is output, the |
| 3681 |
internal counters are nevertheless incremented. This becomes especially |
| 3682 |
important if this redefinition is applied only to selected |
| 3683 |
\Environment{figure} or \Environment{table} environments. |
| 3684 |
\end{Example} |
| 3685 |
% |
| 3686 |
\EndIndexGroup |
| 3687 |
|
| 3688 |
|
| 3689 |
\begin{Declaration} |
| 3690 |
\Macro{setcapindent}\Parameter{indent}% |
| 3691 |
\Macro{setcapindent*}\Parameter{xindent}% |
| 3692 |
\Macro{setcaphanging} |
| 3693 |
\end{Declaration}% |
| 3694 |
As mentioned previously, in the standard classes the captions are set in a |
| 3695 |
non-hanging style. In other words, in multi-line captions the second and |
| 3696 |
subsequent lines start directly beneath the label. The standard classes |
| 3697 |
provide no direct mechanism to change this behaviour. In {\KOMAScript}, on the |
| 3698 |
contrary, beginning at the second line all lines are indented by the width of |
| 3699 |
the label so that the caption text is aligned. |
| 3700 |
|
| 3701 |
You can change this behaviour, which corresponds to using |
| 3702 |
\Macro{setcaphanging}, at any time with the \Macro{setcapindent} or |
| 3703 |
\Macro{setcapindent*} command. Here the parameter \PName{indent} determines |
| 3704 |
the indentation of the second and subsequent lines. If you want a line break |
| 3705 |
after the label and before the caption text, then you can define the |
| 3706 |
indentation \PName{xindent} of the caption text with the starred version of |
| 3707 |
the command instead: \Macro{setcapindent*}. |
| 3708 |
|
| 3709 |
A negative value of \PName{indent}, on the other hand, results in a line break |
| 3710 |
before the caption text, and only the first line of the caption text, not |
| 3711 |
subsequent lines, is indented by the absolute value of \PName{indent}. |
| 3712 |
|
| 3713 |
Whether one-line captions are set the same way as multi-line captions or are |
| 3714 |
treated separately is specified with the option |
| 3715 |
\DescRef{\LabelBase.option.captions}. For details please refer to the |
| 3716 |
explanations of this option on |
| 3717 |
\DescPageRef{\LabelBase.option.captions.oneline}. |
| 3718 |
|
| 3719 |
\begin{Example} |
| 3720 |
The illustrations~\ref{fig:\LabelBase.caption.first} to |
| 3721 |
\ref{fig:\LabelBase.caption.last} show the effects of different settings. As |
| 3722 |
you can see, using a fully hanging indentation with a narrow column width is |
| 3723 |
awkward. To illustrate, the source code for the second figure is given here |
| 3724 |
with a modified caption text: |
| 3725 |
\begin{lstcode} |
| 3726 |
\begin{figure} |
| 3727 |
\setcapindent{1em} |
| 3728 |
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} |
| 3729 |
\caption{Example with partially indented caption |
| 3730 |
starting from the second line} |
| 3731 |
\end{figure} |
| 3732 |
\end{lstcode} |
| 3733 |
As you can see, the formatting can also be changed locally within the |
| 3734 |
\Environment{figure} environment\IndexEnv{figure}. The change then affects |
| 3735 |
only the current figure. Subsequent figures once again use the default |
| 3736 |
settings or global settings that you set, for example, in the preamble. This |
| 3737 |
also, of course, applies to tables. |
| 3738 |
\begin{figure} |
| 3739 |
\typeout{^^J--- Ignore underfull and overfull \string\hbox:} |
| 3740 |
\addtokomafont{caption}{\small} |
| 3741 |
\addtokomafont{captionlabel}{\bfseries} |
| 3742 |
\centering% |
| 3743 |
\begin{minipage}{.9\linewidth} |
| 3744 |
\begin{minipage}[t]{.48\linewidth}\sloppy |
| 3745 |
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} |
| 3746 |
\caption[Example: Default caption]% |
| 3747 |
{\sloppy With the default setting, like using |
| 3748 |
\Macro{setcaphanging}} |
| 3749 |
\label{fig:\LabelBase.caption.first} |
| 3750 |
\end{minipage} |
| 3751 |
\hspace{.02\linewidth} |
| 3752 |
\begin{minipage}[t]{.48\linewidth}\sloppy |
| 3753 |
\setcapindent{1em} |
| 3754 |
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} |
| 3755 |
\caption[Example: Caption with partially hanging indention]% |
| 3756 |
{With partially hanging indentation starting from the second line |
| 3757 |
by using \Macro{setcapindent}\PParameter{1em}} |
| 3758 |
\end{minipage} |
| 3759 |
\end{minipage} |
| 3760 |
|
| 3761 |
\vspace*{2ex}\noindent% |
| 3762 |
\begin{minipage}{.9\linewidth} |
| 3763 |
\begin{minipage}[t]{.48\linewidth}\sloppy |
| 3764 |
\setcapindent*{1em} |
| 3765 |
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} |
| 3766 |
\caption[Example: Caption with hanging indention and line break]% |
| 3767 |
{With hanging indentation starting from the second line and line |
| 3768 |
break before the description using |
| 3769 |
\Macro{setcapindent*}\PParameter{1em}} |
| 3770 |
\end{minipage} |
| 3771 |
\hspace{.02\linewidth} |
| 3772 |
\begin{minipage}[t]{.48\linewidth}\sloppy |
| 3773 |
\setcapindent{-1em} |
| 3774 |
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} |
| 3775 |
\caption[Example: Caption with indention in the second line]% |
| 3776 |
{With indentation only in the second line and a line break |
| 3777 |
before the description using |
| 3778 |
\Macro{setcapindent}\PParameter{-1em}} |
| 3779 |
\label{fig:\LabelBase.caption.last} |
| 3780 |
\end{minipage} |
| 3781 |
\end{minipage} |
| 3782 |
\typeout{^^J--- Don't ignore underfull and overfull |
| 3783 |
\string\hbox:^^J} |
| 3784 |
\end{figure} |
| 3785 |
\end{Example} |
| 3786 |
% |
| 3787 |
\EndIndexGroup |
| 3788 |
|
| 3789 |
|
| 3790 |
\begin{Declaration} |
| 3791 |
\Macro{setcapwidth}\OParameter{justification}\Parameter{width}% |
| 3792 |
\Macro{setcapdynwidth}\OParameter{justification}\Parameter{width}% |
| 3793 |
\Macro{setcapmargin}\OParameter{left margin}\Parameter{margin}% |
| 3794 |
\Macro{setcapmargin*}\OParameter{inside margin}\Parameter{margin} |
| 3795 |
\end{Declaration} |
| 3796 |
Using\ChangedAt{v2.8q}{% |
| 3797 |
\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} these three |
| 3798 |
commands, you can specify the width and justification of the caption |
| 3799 |
text. Normally, the entire text or column width is available for the caption. |
| 3800 |
|
| 3801 |
With\important{\Macro{setcapwidth}} the \Macro{setcapwidth} command, you can |
| 3802 |
decrease this \PName{width}. The mandatory argument determines the maximum |
| 3803 |
\PName{width} of the caption. As an optional argument, you can supply exactly |
| 3804 |
one letter which specifies the horizontal justification. The possible |
| 3805 |
justifications are given in the following list: |
| 3806 |
\begin{labeling}[~--]{\quad\PValue{o}}% |
| 3807 |
\itemsep=.5\topsep plus .5\topsep minus .5\topsep |
| 3808 |
\rightskip=1em |
| 3809 |
\item[\PValue{l}] left-justified |
| 3810 |
\item[\PValue{c}] centred |
| 3811 |
\item[\PValue{r}] right-aligned |
| 3812 |
\item[\PValue{i}] aligned to the inner margin in two-sided printing |
| 3813 |
\item[\PValue{o}] aligned to the outer margin in two-sided printing |
| 3814 |
\end{labeling} |
| 3815 |
Inside and outside justification corresponds to left-aligned and right-aligned |
| 3816 |
justification, respectively, in one-sided printing. |
| 3817 |
Within\textnote{Attention!} \Package{longtable}\IndexPackage{longtable}% |
| 3818 |
\important{\Package{longtable}} tables, inside and outside justification does |
| 3819 |
not work correctly. In particular, the captions on subsequent pages of such |
| 3820 |
tables are aligned according to the format of the caption on the first page of |
| 3821 |
the table. This is a conceptual problem in the implementation of the |
| 3822 |
\Package{longtable} package. |
| 3823 |
|
| 3824 |
Note\ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3825 |
\Class{scrartcl}}\textnote{Attention!} that \Macro{setcapwidth} immediately |
| 3826 |
sets the width to the value of the \PName{width} parameter at the time of the |
| 3827 |
assignment, as \Macro{setlength} does. If\important{\Macro{setcapdynwidth}} |
| 3828 |
you instead want to use the current value of \PName{width} when the caption is |
| 3829 |
set, you should use \Macro{setcapdynwidth}. There can be significant |
| 3830 |
differences in the result if, for example, you use lengths like |
| 3831 |
\Length{linewidth} or other commands as \PName{width} arguments. |
| 3832 |
|
| 3833 |
With\important{\Macro{setcapmargin}} the \Macro{setcapmargin} command, instead |
| 3834 |
of specifying the width of the caption text, you can specify a \PName{margin} |
| 3835 |
to be set next to the caption text in addition to the normal text margin. If |
| 3836 |
you want margins with different widths on the left and right sides, you can |
| 3837 |
use the optional argument to specify a \PName{left margin} that differs from |
| 3838 |
\PName{margin}. Instead of a \PName{left margin}, the starred version |
| 3839 |
\Macro{setcapmargin*} defines an \PName{inside margin} in a two-sided layout. |
| 3840 |
The same problem arises here with with inside and outside justification inside |
| 3841 |
\Package{longtable}\IndexPackage{longtable}\important{\Package{longtable}} |
| 3842 |
tables that occurs with \Macro{setcapwidth}. Furthermore, using |
| 3843 |
\Macro{setcapmargin} or \Macro{setcapmargin*} activates the |
| 3844 |
\OptionValueRef{\LabelBase}{captions}{nooneline} option (see |
| 3845 |
\DescPageRef{\LabelBase.option.captions.nooneline}) for captions which are |
| 3846 |
typeset with this margin setting. |
| 3847 |
|
| 3848 |
You\textnote{Hint!} can also specify negative values for \PName{margin} and |
| 3849 |
\PName{left margin} or \PName{inside margin}. This has the effect of making |
| 3850 |
the caption protrude into the margin.% |
| 3851 |
\iffalse\par% Anhang wurde entfernt. |
| 3852 |
Experts\textnote{Hint!} and advanced users can find a a somewhat tricky |
| 3853 |
application of \Macro{setcapwidth} in |
| 3854 |
\iffree{\cite{book:komascript}}{\autoref{cha:floattricks}, |
| 3855 |
\autopageref{cha:floattricks}}.% |
| 3856 |
\fi% |
| 3857 |
% |
| 3858 |
\EndIndexGroup |
| 3859 |
|
| 3860 |
\begin{Declaration} |
| 3861 |
\Macro{setcaptionalignment}\OParameter{float type}\Parameter{alignment} |
| 3862 |
\end{Declaration} |
| 3863 |
Normally\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3864 |
\Class{scrartcl}}, multi-line\textnote{alignment of multi-line captions} |
| 3865 |
captions are fully justified. This corresponds to |
| 3866 |
\Macro{setcaptionalignment}\PParameter{j}. Sometimes, however, you want a |
| 3867 |
different alignment, for example ragged right. An appropriate change is |
| 3868 |
possible at any time with \Macro{setcaptionalignment}. You can specify exactly |
| 3869 |
one of the letters listed in \autoref{tab:maincls.captionalignment} for the |
| 3870 |
\PName{alignment}. If you specify an unknown \PName{alignment}, you will |
| 3871 |
receive an error message. |
| 3872 |
% |
| 3873 |
\begin{table} |
| 3874 |
% \centering |
| 3875 |
\KOMAoptions{captions=topbeside}% |
| 3876 |
\setcapindent{0pt}% |
| 3877 |
\begin{captionbeside} |
| 3878 |
[{Alignments for multi-line captions of floating environments}] |
| 3879 |
{\label{tab:maincls.captionalignment}% |
| 3880 |
Alignments for multi-line captions of floating environments} |
| 3881 |
[l] |
| 3882 |
\begin{tabular}[t]{ll} |
| 3883 |
\toprule |
| 3884 |
c & centred \\ |
| 3885 |
j & fully justified \\ |
| 3886 |
l & left justified \\ |
| 3887 |
r & right justified \\ |
| 3888 |
C & centred with \Package{ragged2e} \\ |
| 3889 |
J & fully justified with \Package{ragged2e} \\ |
| 3890 |
L & left justified with \Package{ragged2e} \\ |
| 3891 |
R & right justified with \Package{ragged2e} \\ |
| 3892 |
\bottomrule |
| 3893 |
\end{tabular} |
| 3894 |
\end{captionbeside} |
| 3895 |
\end{table} |
| 3896 |
|
| 3897 |
The four possibilities with the |
| 3898 |
\Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} |
| 3899 |
package are only available if that package was loaded before you use |
| 3900 |
\Macro{setcaptionalignment}. Otherwise, they are converted to the |
| 3901 |
corresponding options without \Package{ragged2e}. For safety reasons, a |
| 3902 |
warning is issued in this case. |
| 3903 |
|
| 3904 |
When using this command without\textnote{without optional parameter} the |
| 3905 |
optional parameter, the result depends on whether the call occurs inside or |
| 3906 |
outside of a floating environment. Inside a floating environment, the |
| 3907 |
alignment is then set for this floating environment. Outside, on the other |
| 3908 |
hand, the optional parameter is assumed to be empty. |
| 3909 |
|
| 3910 |
Using this command with an empty\textnote{empty optional parameter} optional |
| 3911 |
parameter, or outside a floating environment and also without any optional |
| 3912 |
parameter, sets the general alignment. This is used whenever the current |
| 3913 |
floating environment type does not define an alignment. |
| 3914 |
|
| 3915 |
If you only want to set the alignment of a particular type of floating |
| 3916 |
environment\textnote{with \PName{float type}} without changing the |
| 3917 |
\PName{alignment} for other types of floating environments, then the type of |
| 3918 |
floating environment, e.\,g., \PValue{figure} or \PValue{table}, is given as |
| 3919 |
the optional parameter \PName{float type}. |
| 3920 |
% |
| 3921 |
\begin{Example} |
| 3922 |
You want captions to be centred under the images even if they are |
| 3923 |
multi-line. To text this for a single image, use\textnote{in the |
| 3924 |
floating environment}: |
| 3925 |
\begin{lstcode} |
| 3926 |
\begin{figure} |
| 3927 |
\centering |
| 3928 |
\setcaptionalignment{c} |
| 3929 |
\includegraphics{example-image} |
| 3930 |
\caption{\blindtext} |
| 3931 |
\end{figure} |
| 3932 |
\end{lstcode} |
| 3933 |
Since you are satisfied with the result, you move the\textnote{in the |
| 3934 |
preamble} |
| 3935 |
\begin{lstcode} |
| 3936 |
\setcaptionalignment{c} |
| 3937 |
\end{lstcode} |
| 3938 |
command to the document preamble. Thereafter, however, you decide you do not |
| 3939 |
like this change for table captions at all. Therefore, you use\textnote{only |
| 3940 |
for figures} |
| 3941 |
\begin{lstcode} |
| 3942 |
\setcaptionalignment[figure]{c} |
| 3943 |
\end{lstcode} |
| 3944 |
to limit the centring to figures. |
| 3945 |
|
| 3946 |
A little later, you realize that the centring is not so suitable. Instead, |
| 3947 |
you now prefer to have ragged right alignment. So you change the alignment |
| 3948 |
again: |
| 3949 |
\begin{lstcode} |
| 3950 |
\setcaptionalignment[figure]{l} |
| 3951 |
\end{lstcode} |
| 3952 |
However, you do not like the fact that the lines are very different in |
| 3953 |
length. This is caused by the lack of hyphenation, causing long words to |
| 3954 |
wrap completely onto the next line, leaving large gaps. You want to allow |
| 3955 |
hyphenation as needed. This is easy to achieve with the help of the |
| 3956 |
\Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} |
| 3957 |
package. However, it is not enough to use |
| 3958 |
\begin{lstcode} |
| 3959 |
\usepackage{ragged2e} |
| 3960 |
\end{lstcode} |
| 3961 |
to load the package. Using the \Option{newcommands} option when loading the |
| 3962 |
package does not help. Instead, the \PName{alignment} must also be changed: |
| 3963 |
\begin{lstcode} |
| 3964 |
\usepackage{ragged2e} |
| 3965 |
\setcaptionalignment[figure]{L} |
| 3966 |
\end{lstcode} |
| 3967 |
Note\textnote{Attention!} the upper-case letter for the \PName{alignment}. |
| 3968 |
\end{Example} |
| 3969 |
\EndIndexGroup |
| 3970 |
|
| 3971 |
|
| 3972 |
\begin{Declaration} |
| 3973 |
\Option{origlongtable} |
| 3974 |
\end{Declaration}% |
| 3975 |
\BeginIndex{Package}{longtable}% |
| 3976 |
If you do not want the table captions produced by the \Package{longtable} |
| 3977 |
package (see \cite{package:longtable}) to be redefined by the {\KOMAScript} |
| 3978 |
classes, activate the \Option{origlongtable} option. This\textnote{Attention!} |
| 3979 |
option must be used in the optional argument of |
| 3980 |
\DescRef{\LabelBase.cmd.documentclass}. It cannot be used as a setting of |
| 3981 |
\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. |
| 3982 |
% |
| 3983 |
\EndIndexGroup |
| 3984 |
% |
| 3985 |
\EndIndexGroup |
| 3986 |
|
| 3987 |
|
| 3988 |
\begin{Declaration} |
| 3989 |
\OptionVName{listof}{setting} |
| 3990 |
\end{Declaration} |
| 3991 |
Normally\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 3992 |
\Class{scrartcl}} lists of floating environments\,---\,like |
| 3993 |
tables\Index{tables>list of} or figures\Index{figures>list of}\,---\,are |
| 3994 |
neither numbered nor included in the table of contents. You can find more |
| 3995 |
information about this behaviour in \autoref{sec:\LabelBase.toc}. As an |
| 3996 |
alternative to the settings \OptionValueRef{\LabelBase}{toc}{nolistof}% |
| 3997 |
\IndexOption{toc~=\textKValue{nolistof}}, |
| 3998 |
\OptionValueRef{\LabelBase}{toc}{listof}\IndexOption{toc~=\textKValue{listof}}, |
| 3999 |
and \OptionValueRef{\LabelBase}{toc}{listofnumbered}% |
| 4000 |
\IndexOption{toc~=\textKValue{listofnumbered}} mentioned there, you can also |
| 4001 |
look at this behaviour from perspective of the lists themselves. Therefore |
| 4002 |
you can achieve the same results with the settings |
| 4003 |
\OptionValue{listof}{notoc}, \OptionValue{listof}{totoc}, and |
| 4004 |
\OptionValue{listof}{numbered}. |
| 4005 |
|
| 4006 |
By default, the headings in the lists of floating environments use the topmost |
| 4007 |
level below \DescRef{\LabelBase.cmd.part}. This is the chapter level in |
| 4008 |
\Class{scrbook} and \Class{scrreprt} and the section level in |
| 4009 |
\Class{scrartcl}. By contrast,\ChangedAt{v3.06}{\Class{scrbook}\and |
| 4010 |
\Class{scrreprt}\and \Class{scrartcl}} |
| 4011 |
\OptionValue{listof}{leveldown}\important{\OptionValue{listof}{leveldown}} |
| 4012 |
uses the next lower level to be used instead. |
| 4013 |
\important{\OptionValue{listof}{standardlevel}}% |
| 4014 |
\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% |
| 4015 |
\OptionValue{listof}{standardlevel} switches back to the default sectioning |
| 4016 |
level, if necessary. |
| 4017 |
\begin{Example} |
| 4018 |
In a book, you want to put the list of figures and the list of tables as |
| 4019 |
sub-lists into a common list named ``Figures and Tables''. Simply use: |
| 4020 |
\begin{lstcode} |
| 4021 |
\KOMAoption{listof}{leveldown} |
| 4022 |
\end{lstcode} |
| 4023 |
to use the section instead of the chapter level for both lists, and put the |
| 4024 |
following at the appropriate place in your document: |
| 4025 |
\begin{lstcode} |
| 4026 |
\addchap*{Figures and Tables} |
| 4027 |
\listoffigures |
| 4028 |
\listoftables |
| 4029 |
\end{lstcode} |
| 4030 |
You can find more information about the \DescRef{\LabelBase.cmd.addchap*} |
| 4031 |
command in \autoref{sec:\LabelBase.structure} on |
| 4032 |
\DescPageRef{\LabelBase.cmd.addchap*}. |
| 4033 |
\end{Example} |
| 4034 |
|
| 4035 |
Normally\ChangedAt{v2.8q}{% |
| 4036 |
\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} the lists of |
| 4037 |
floating environments use a fixed-width space for the caption number of the |
| 4038 |
entries. At the same time, all entries are somewhat indented. This behaviour |
| 4039 |
corresponds to the |
| 4040 |
\OptionValue{listof}{graduated}\IndexOption{listof~=\textKValue{graduated}} |
| 4041 |
setting. |
| 4042 |
|
| 4043 |
If the numbers become very wide, for example because you have many tables or |
| 4044 |
figures, the space provided may at some point no longer be sufficient. |
| 4045 |
\KOMAScript{} offers the setting \OptionValue{listof}{flat}% |
| 4046 |
\important{\OptionValue{listof}{flat}}\IndexOption{listof~=\textKValue{flat}} |
| 4047 |
for lists of floating environments, comparable to |
| 4048 |
\OptionValueRef{\LabelBase}{toc}{flat}\IndexOption{toc~=\textKValue{flat}} for |
| 4049 |
the table of contents. The width required to print the number is |
| 4050 |
determined automatically and the space is adjusted accordingly. See the |
| 4051 |
\OptionValueRef{\LabelBase}{toc}{flat} option, \autoref{sec:\LabelBase.toc}, |
| 4052 |
\DescPageRef{\LabelBase.option.toc.flat} for more information about side |
| 4053 |
effects and how it works. Note\textnote{Attention!} again that you need more |
| 4054 |
than one \LaTeX{} run before the lists of floating environments reach |
| 4055 |
their final state. |
| 4056 |
|
| 4057 |
The \OptionValue{listof}{entryprefix}\ChangedAt{v3.06}{\Class{scrbook}\and |
| 4058 |
\Class{scrreprt}\and \Class{scrartcl}} setting automatically activates |
| 4059 |
\OptionValue{listof}{flat} too. |
| 4060 |
Normally\important{\OptionValue{listof}{entryprefix}}, it does not make sense |
| 4061 |
to add a prefix such as ``figure'' or ``table'' to each entry in the lists of |
| 4062 |
floating environments because, of course, only figures are included in the |
| 4063 |
list of figures and only tables are included in the list of tables. Such a |
| 4064 |
prefix provides no additional information and is thus omitted by default. |
| 4065 |
However, you can add such prefixes using the |
| 4066 |
\OptionValue{listof}{entryprefix} option. With this, all entries in the same |
| 4067 |
list will get the same prefix. The prefix depends on the file extension of the |
| 4068 |
auxiliary file that is used for the corresponding list. For the list of |
| 4069 |
figures, the file extension is ``\File{lof}'' and therefore |
| 4070 |
\Macro{listoflofentryname} is used. For the list of tables, the file extension |
| 4071 |
is ``\File{lot}'' and \Macro{listoflotentryname} is used. |
| 4072 |
|
| 4073 |
For the \Class{scrbook} and \Class{scrreprt}\OnlyAt{\Class{scrbook}\and |
| 4074 |
\Class{scrreprt}} classes, \KOMAScript{} adds a vertical space to the lists |
| 4075 |
of floating environments whenever a new chapter starts. This behaviour, which |
| 4076 |
also exists in the standard classes, groups the lists by chapters. In |
| 4077 |
\KOMAScript{}, it corresponds to setting \ChangedAt{v3.00}{\Class{scrbook}\and |
| 4078 |
\Class{scrreprt}\and \Class{scrartcl}}% |
| 4079 |
\OptionValue{listof}{chaptergapsmall}% |
| 4080 |
\LabelOptionValue{listof}{chaptergapsmall}% |
| 4081 |
\important{\OptionValue{listof}{chaptergapsmall}}% |
| 4082 |
\IndexOption{listof~=\textKValue{chaptergapsmall}}. In this case, is uses a |
| 4083 |
fixed vertical space of 10\Unit{pt}. |
| 4084 |
With\important{\OptionValue{listof}{chaptergapline}} the |
| 4085 |
\OptionValue{listof}{chaptergapline}% |
| 4086 |
\IndexOption{listof~=\textKValue{chaptergapline}} option, you instead get a |
| 4087 |
vertical space the height of one standard text line. With |
| 4088 |
\OptionValue{listof}{nochaptergap}% |
| 4089 |
\IndexOption{listof~=\textKValue{nochaptergap}}% |
| 4090 |
\important{\OptionValue{listof}{nochaptergap}}, you can completely remove the |
| 4091 |
vertical space. The\important{\OptionValue{listof}{chapterentry}} |
| 4092 |
\OptionValue{listof}{chapterentry}% |
| 4093 |
\IndexOption{listof~=\textKValue{chapterentry}} option is a special feature. |
| 4094 |
Instead of a vertical space, the table of contents entry for the chapter is |
| 4095 |
inserted into the lists of floating environments. Note\textnote{Attention!} |
| 4096 |
that this happens even if the chapter does not contain a floating environment. |
| 4097 |
You can find a method where only chapters containing floating environments |
| 4098 |
appear in the respective lists at \cite{https://komascript.de/comment/5070}. |
| 4099 |
You can achieve a more direct control over what appears in the lists of |
| 4100 |
floating environments with the \DescRef{\LabelBase.option.chapteratlists} |
| 4101 |
option, which is explained in \autoref{sec:\LabelBase.structure}, on |
| 4102 |
\DescPageRef{\LabelBase.option.chapteratlists}. |
| 4103 |
|
| 4104 |
You can find an overview of all settings for the \Option{listof} option in |
| 4105 |
\autoref{tab:\LabelBase.listof}. |
| 4106 |
|
| 4107 |
\begin{desclist} |
| 4108 |
\desccaption[{Available values for the \Option{listof} option}]{% |
| 4109 |
Available values for the \Option{listof} option for modifying the format |
| 4110 |
and contents of the lists of floating |
| 4111 |
environments\label{tab:\LabelBase.listof}% |
| 4112 |
}{% |
| 4113 |
Available values for the \Option{listof} option (\emph{continued})% |
| 4114 |
}% |
| 4115 |
\entry{\PValue{chapterentry}, \PValue{withchapterentry}}{% |
| 4116 |
Indicates the beginning of chapters in the lists of floating environments |
| 4117 |
with copies of their table-of-contents entries.% |
| 4118 |
\IndexOption{listof~=\textKValue{chapterentry}}}% |
| 4119 |
\entry{\PValue{chaptergapline}, \PValue{onelinechaptergap}}{% |
| 4120 |
Indicates the beginning of chapters in the lists of floating environments |
| 4121 |
with a vertical space the height of one standard text line.% |
| 4122 |
\IndexOption{listof~=\textKValue{chaptergapline}}}% |
| 4123 |
\entry{\PValue{chaptergapsmall}, \PValue{smallchaptergap}}{% |
| 4124 |
Indicates the beginning of chapters in the lists of floating environments |
| 4125 |
with a small vertical space.% |
| 4126 |
\IndexOption{listof~=\textKValue{chaptergapsmall}}}% |
| 4127 |
\entry{\PValue{entryprefix}}{% |
| 4128 |
\ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4129 |
\Class{scrartcl}}% |
| 4130 |
Adds a prefix before the number of each floating-environment list entry. |
| 4131 |
The prefix is usually language-dependent, e.\,g., in English ``Figure'' is |
| 4132 |
used for the list of figures and ``Table'' for the list of tables, each |
| 4133 |
followed by a white space.% |
| 4134 |
\IndexOption{listof~=\textKValue{entryprefix}}}% |
| 4135 |
\entry{\PValue{flat}, \PValue{left}}{% |
| 4136 |
Prints the lists of floating environments in tabular form. The caption |
| 4137 |
numbers are the first column, the caption texts the second column, and the |
| 4138 |
page numbers the third column. The space reserved for the caption numbers |
| 4139 |
depends on the previous \LaTeX{} run.% |
| 4140 |
\IndexOption{listof~=\textKValue{flat}}}% |
| 4141 |
\entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% |
| 4142 |
Prints the lists of floating environments in a hierarchical form. The |
| 4143 |
space reserved for the caption numbers is limited.% |
| 4144 |
\IndexOption{listof~=\textKValue{graduated}}}% |
| 4145 |
\entry{\PValue{leveldown}}{% |
| 4146 |
Uses headings that are one level lower in the sectioning hierarchy than |
| 4147 |
the default for lists of floating environments.% |
| 4148 |
\IndexOption{listof~=\textKValue{leveldown}}}% |
| 4149 |
\entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, |
| 4150 |
\PValue{numberline}}{% |
| 4151 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4152 |
\Class{scrartcl}}% |
| 4153 |
The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, |
| 4154 |
\DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating |
| 4155 |
environments such as figures and tables. As a result, unnumbered entries |
| 4156 |
are left-aligned with the text of numbered entries of the same level. |
| 4157 |
However, the \KOMAScript{} classes themselves do not put unnumbered |
| 4158 |
entries in these lists. This option therefore affects only entries that |
| 4159 |
are generated not by the \KOMAScript{} classes themselves but with the |
| 4160 |
help of \DescRef{tocbasic.cmd.addxcontentsline} (see |
| 4161 |
\autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.addxcontentsline}).% |
| 4162 |
\IndexOption{toc~=\textKValue{numberline}}}% |
| 4163 |
\entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, |
| 4164 |
\PValue{nonumberline}}{% |
| 4165 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4166 |
\Class{scrartcl}}% |
| 4167 |
The \PValue{nonumberline} property (see \autoref{sec:tocbasic.toc}, |
| 4168 |
\DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating |
| 4169 |
environments. This will place unnumbered entries left-aligned with the |
| 4170 |
number of numbered entries. However, the \KOMAScript{} classes themselves |
| 4171 |
do not put unnumbered entries in these lists. This option therefore |
| 4172 |
affects only entries that are generated not by the \KOMAScript{} classes |
| 4173 |
themselves but with the help of \DescRef{tocbasic.cmd.addxcontentsline} |
| 4174 |
(see \autoref{sec:tocbasic.toc}, |
| 4175 |
\DescPageRef{tocbasic.cmd.addxcontentsline}).% |
| 4176 |
\IndexOption{toc~=\textKValue{nonumberline}}}% |
| 4177 |
\entry{\PValue{nochaptergap}, \PValue{ignorechapter}}{% |
| 4178 |
The beginnings of chapters are not marked in the lists of floating |
| 4179 |
environments.% |
| 4180 |
\IndexOption{listof~=\textKValue{nochaptergap}}}% |
| 4181 |
\entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% |
| 4182 |
The lists of floating environments do not generate entries in the table of |
| 4183 |
contents.% |
| 4184 |
\IndexOption{listof~=\textKValue{nottotoc}}}% |
| 4185 |
\entry{\PValue{numbered}, \PValue{totocnumbered}, \PValue{tocnumbered}, |
| 4186 |
\PValue{numberedtoc}, \PValue{numberedtotoc}}{% |
| 4187 |
The lists of floating environments receive numbered entries in the table |
| 4188 |
of contents.% |
| 4189 |
\IndexOption{listof~=\textKValue{numbered}}}% |
| 4190 |
\entry{\PValue{standardlevel}}{% |
| 4191 |
The lists use the normal sectioning level.% |
| 4192 |
\IndexOption{listof~=\textKValue{standardlevel}}}% |
| 4193 |
\entry{\PValue{totoc}, \PValue{toc}, \PValue{notnumbered}}{% |
| 4194 |
The lists of floating environment generate entries in the table of |
| 4195 |
contents, but their headings are unnumbered.% |
| 4196 |
\IndexOption{listof~=\textKValue{totoc}}}% |
| 4197 |
\end{desclist} |
| 4198 |
% |
| 4199 |
\EndIndexGroup |
| 4200 |
|
| 4201 |
|
| 4202 |
\begin{Declaration} |
| 4203 |
\Macro{listoftables}% |
| 4204 |
\Macro{listoffigures} |
| 4205 |
\end{Declaration} |
| 4206 |
These commands generate a list of tables or figures. Changes affecting these |
| 4207 |
lists will require two \LaTeX{} runs to take effect. The layout of the lists |
| 4208 |
can be influenced by the \DescRef{\LabelBase.option.listof}% |
| 4209 |
\important{\DescRef{\LabelBase.option.listof}} option with the values |
| 4210 |
\PValue{graduated} or \PValue{flat} (see |
| 4211 |
\DescPageRef{\LabelBase.option.listof}). In addition, the \PValue{listof} and |
| 4212 |
\PValue{listofnumbered} values of the \DescRef{\LabelBase.option.toc}% |
| 4213 |
\important{\DescRef{\LabelBase.option.toc}} option (see |
| 4214 |
\autoref{sec:\LabelBase.toc}), as well as the \PValue{totoc} and |
| 4215 |
\PValue{numbered} values of the \DescRef{\LabelBase.option.listof} option |
| 4216 |
described above indirectly affect these lists. |
| 4217 |
|
| 4218 |
As\textnote{Hint!} a rule, you will find the lists of the floating |
| 4219 |
environments immediately after the table of contents. In some documents, they |
| 4220 |
go into the appendix. However, the author of this guide prefers them |
| 4221 |
immediately after the table of contents.% |
| 4222 |
% |
| 4223 |
\EndIndexGroup |
| 4224 |
|
| 4225 |
|
| 4226 |
\LoadCommonFile{marginpar}% \section{Marginal Notes} |
| 4227 |
|
| 4228 |
|
| 4229 |
\section{Appendix} |
| 4230 |
\seclabel{appendix} |
| 4231 |
\BeginIndexGroup |
| 4232 |
\BeginIndex{}{Appendix} |
| 4233 |
|
| 4234 |
The appendix of a document mostly consists of supplements to the document. |
| 4235 |
Typical parts of an appendix include a bibliography, an index, and a glossary. |
| 4236 |
However you should not start an appendix for these parts alone because their |
| 4237 |
format already distinguishes them from the main document. But if there are |
| 4238 |
additional elements in the appendix, such as quoted third-party documents, |
| 4239 |
endnotes, figures, or tabulars, the standard elements such as the bibliography |
| 4240 |
should also be part of the appendix. |
| 4241 |
|
| 4242 |
|
| 4243 |
\begin{Declaration} |
| 4244 |
\Macro{appendix} |
| 4245 |
\end{Declaration}% |
| 4246 |
The appendix is started in the standard as well as the {\KOMAScript} classes |
| 4247 |
with \Macro{appendix}. Among other things, this command changes the chapter |
| 4248 |
numbering to upper-case letters while ensuring that the rules according to |
| 4249 |
\cite{DUDEN} for numbering the sectioning levels are followed (for |
| 4250 |
German-speaking regions). These rules are explained in more detail in the |
| 4251 |
description of the \DescRef{\LabelBase.option.numbers} option in |
| 4252 |
\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.option.numbers}. |
| 4253 |
|
| 4254 |
The format of the chapter headings\OnlyAt{\Class{scrbook}\and |
| 4255 |
\Class{scrreprt}} in the appendix is influenced by the |
| 4256 |
\DescRef{\LabelBase.option.chapterprefix}% |
| 4257 |
\important{\DescRef{\LabelBase.option.chapterprefix}\\ |
| 4258 |
\DescRef{\LabelBase.option.appendixprefix}} and |
| 4259 |
\DescRef{\LabelBase.option.appendixprefix} options. See |
| 4260 |
\autoref{sec:\LabelBase.structure}, |
| 4261 |
\DescPageRef{\LabelBase.option.appendixprefix} for more information. |
| 4262 |
|
| 4263 |
Please\textnote{Attention!} note that \Macro{appendix} is a command, |
| 4264 |
\emph{not} an environment! This command does not expect an argument. Chapters |
| 4265 |
and sections in the appendix use \DescRef{\LabelBase.cmd.chapter} and |
| 4266 |
\DescRef{\LabelBase.cmd.section}, just as in the main text.% |
| 4267 |
% |
| 4268 |
\EndIndexGroup |
| 4269 |
% |
| 4270 |
\EndIndexGroup |
| 4271 |
|
| 4272 |
|
| 4273 |
\section{Bibliography} |
| 4274 |
\seclabel{bibliography} |
| 4275 |
\BeginIndexGroup |
| 4276 |
\BeginIndex{}{bibliography} |
| 4277 |
|
| 4278 |
The bibliography makes external sources accessible. As a rule, the |
| 4279 |
bibliography is created from an external file with a database-like structure |
| 4280 |
using the \BibTeX{} program. You can use the \BibTeX{} style to change both |
| 4281 |
the format of the entries and their sorting. If you use an additional |
| 4282 |
bibliography package like \Package{natbib}\IndexPackage{natbib}, |
| 4283 |
\Package{babelbib}\IndexPackage{babelbib}, or |
| 4284 |
\Package{biblatex}\IndexPackage{biblatex}, \KOMAScript{}'s influence over the |
| 4285 |
bibliography disappears. In such cases, you must follow the manual of the |
| 4286 |
relevant bibliography package. You can find general information about |
| 4287 |
bibliographies in \cite{lshort}. |
| 4288 |
|
| 4289 |
|
| 4290 |
\begin{Declaration} |
| 4291 |
\OptionVName{bibliography}{setting} |
| 4292 |
\end{Declaration} |
| 4293 |
For a start,\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4294 |
\Class{scrartcl}} you can select any predefined bibliography style in |
| 4295 |
\PName{setting}. There are two such bibliography styles predefined in |
| 4296 |
\KOMAScript{}. You should not confuse them with the styles used by |
| 4297 |
\BibTeX\Index{BibTeX=\BibTeX}, which you select with |
| 4298 |
\Macro{bibstyle}. While \BibTeX{} determines both the sorting and the |
| 4299 |
contents of the bibliography, \KOMAScript{} influences only some basic |
| 4300 |
features of the bibliography and few properties of the entry format. |
| 4301 |
|
| 4302 |
The\important{\OptionValue{bibliography}{oldstyle}} |
| 4303 |
\OptionValue{bibliography}{oldstyle}% |
| 4304 |
\IndexOption{bibliography~=\textKValue{oldstyle}} option selects a compact |
| 4305 |
format for bibliography entries. In this case, using the |
| 4306 |
\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} command results in |
| 4307 |
only a small glue between the entries. The name comes from the fact that this |
| 4308 |
is the most common classic form of a bibliography. |
| 4309 |
In\important{\OptionValue{bibliography}{openstyle}} contrast, the |
| 4310 |
\OptionValue{bibliography}{openstyle}% |
| 4311 |
\IndexOption{bibliography~=\textKValue{openstyle}} setting selects a more |
| 4312 |
modern and open kind of bibliography. The name comes from the fact that the |
| 4313 |
\DescRef{maincls-experts.cmd.newblock} command inserts a paragraph break. The |
| 4314 |
bibliography entries appear more structured. They are less compact and seem |
| 4315 |
more relaxed or open. Information about defining new bibliography styles can |
| 4316 |
be found in the description of the \DescRef{maincls-experts.cmd.newbibstyle} |
| 4317 |
command in \autoref{sec:maincls-experts.bibliography}, |
| 4318 |
\DescPageRef{maincls-experts.cmd.newbibstyle}. |
| 4319 |
|
| 4320 |
In addition to the formatting style, you can select one more feature using |
| 4321 |
\PName{setting}. The bibliography is a kind of list of contents. But instead |
| 4322 |
of listing the contents of the document itself, it references external works. |
| 4323 |
With this reasoning, you could argue that the bibliography is a separate |
| 4324 |
chapter or section and therefore deserves a chapter or section number. The |
| 4325 |
\OptionValue{bibliography}{numbered}% |
| 4326 |
\important{\OptionValue{bibliography}{numbered}}% |
| 4327 |
\IndexOption{bibliography~=\textKValue{numbered}} setting does exactly that, |
| 4328 |
including creating an entry in the table of contents. In my opinion, a |
| 4329 |
traditional, annotated source list should by this reasoning be a separate |
| 4330 |
chapter too. Moreover, the bibliography is ultimately nothing you've written |
| 4331 |
yourself and so merits at most an unnumbered entry in the table of contents, |
| 4332 |
which is achieved with the \OptionValue{bibliography}{totoc}% |
| 4333 |
\IndexOption{bibliography~=\textKValue{totoc}} option. The default setting, |
| 4334 |
where the bibliography is produced as an unnumbered chapter and does not |
| 4335 |
receive an entry in the table of contents corresponds to |
| 4336 |
\OptionValue{bibliography}{nottotoc}% |
| 4337 |
\IndexOption{bibliography~=\textKValue{nottotoc}}. For more information, see |
| 4338 |
the \DescRef{\LabelBase.option.toc} option in \autoref{sec:\LabelBase.toc}, |
| 4339 |
especially the \PValue{bibliographynumbered}, \PValue{bibliography}, |
| 4340 |
and\PValue{nobibliography} values for this option on |
| 4341 |
\DescPageRef{\LabelBase.option.toc.bibliography}. |
| 4342 |
|
| 4343 |
Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4344 |
\Class{scrartcl}} a document made using \Class{scrbook} or \Class{scrreprt} |
| 4345 |
will have a bibliography for every chapter rather than one bibliography for |
| 4346 |
the whole document. In that case, it makes sense for the bibliography |
| 4347 |
itself\important{\OptionValue{bibliography=leveldown}} to be not a chapter but |
| 4348 |
a section. You can achieve this using the |
| 4349 |
\OptionValue{bibliography}{leveldown}% |
| 4350 |
\IndexOption{bibliography~=\textKValue{leveldown}} option. You can also use |
| 4351 |
this if you want the bibliography to appear with other lists under a common |
| 4352 |
heading, therefore this option is also available with \Class{scrartcl}. |
| 4353 |
|
| 4354 |
You can find a summary of available values for the \Option{bibliography} |
| 4355 |
option in \autoref{tab:\LabelBase.bibliography}. Note, however, that you can |
| 4356 |
define new values with |
| 4357 |
\DescRef{maincls-experts.cmd.newbibstyle}\IndexCmd{newbibstyle}. |
| 4358 |
|
| 4359 |
\begin{table} |
| 4360 |
\caption[{Available values for the \Option{bibliography} option}]{% |
| 4361 |
Predefined values for the \Option{bibliography} option for setting the |
| 4362 |
bibliography format} |
| 4363 |
\label{tab:\LabelBase.bibliography} |
| 4364 |
\begin{desctabular} |
| 4365 |
\pventry{leveldown}{% |
| 4366 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4367 |
\Class{scrartcl}}% |
| 4368 |
The bibliography uses a sectioning command one level lower than |
| 4369 |
the default.% |
| 4370 |
\IndexOption{bibliography~=\textKValue{leveldown}}}% |
| 4371 |
\entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% |
| 4372 |
The bibliography receives neither an entry in the table of contents nor |
| 4373 |
a number.% |
| 4374 |
\IndexOption{bibliography~=\textKValue{nottotoc}}}% |
| 4375 |
\entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, |
| 4376 |
\PValue{numberedtoc}, \PValue{numberedtotoc}}{% |
| 4377 |
The bibliography receives an entry in the table of contents and a |
| 4378 |
number.% |
| 4379 |
\IndexOption{bibliography~=\textKValue{numbered}}}% |
| 4380 |
\pventry{oldstyle}{% |
| 4381 |
The bibliography uses the classic, compact formation, where |
| 4382 |
\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates only |
| 4383 |
a horizontal glue.% |
| 4384 |
\IndexOption{bibliography~=\textKValue{oldstyle}}}% |
| 4385 |
\pventry{openstyle}{% |
| 4386 |
The bibliography uses the structured, open format where |
| 4387 |
\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates a |
| 4388 |
paragraph break.% |
| 4389 |
\IndexOption{bibliography~=\textKValue{openstyle}}}% |
| 4390 |
\pventry{standardlevel}{% |
| 4391 |
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4392 |
\Class{scrartcl}}% |
| 4393 |
The bibliography uses the standard sectioning command level.% |
| 4394 |
\IndexOption{bibliography~=\textKValue{standardlevel}}}% |
| 4395 |
\entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% |
| 4396 |
The bibliography receives an entry in the table of contents but no |
| 4397 |
number.% |
| 4398 |
\IndexOption{bibliography~=\textKValue{totoc}}}% |
| 4399 |
\end{desctabular} |
| 4400 |
\end{table} |
| 4401 |
% |
| 4402 |
\EndIndexGroup |
| 4403 |
|
| 4404 |
|
| 4405 |
\begin{Declaration} |
| 4406 |
\Macro{setbibpreamble}\Parameter{preamble} |
| 4407 |
\end{Declaration}% |
| 4408 |
You can use the \Macro{setbibpreamble} command to set a preamble for the |
| 4409 |
bibliography\Index{bibliography}. This preamble must be placed before the |
| 4410 |
command for issuing the bibliography. However, it need not be directly |
| 4411 |
in front of it. For example, it could be placed at the beginning of |
| 4412 |
the document. Like\textnote{Attention!} the |
| 4413 |
\OptionValueRef{\LabelBase}{bibliography}{totoc} and |
| 4414 |
\OptionValueRef{\LabelBase}{bibliography}{totocnumbered} options, this command |
| 4415 |
only works if you have not loaded a package which prevents this from happening |
| 4416 |
by redefining the \Environment{thebibliography} environment. Although the |
| 4417 |
\Package{natbib} package\IndexPackage{natbib} uses undocumented, internal |
| 4418 |
{\KOMAScript} macros, \Macro{setbibpreamble} could still work with the current |
| 4419 |
version of \Package{natbib} (see \cite{package:natbib}). |
| 4420 |
\begin{Example} |
| 4421 |
You want to point out that the bibliographical references are sorted |
| 4422 |
alphabetically by the names of the authors. You therefore use the following |
| 4423 |
command: |
| 4424 |
\begin{lstcode} |
| 4425 |
\setbibpreamble{References are in alphabetical order. |
| 4426 |
References with more than one author are sorted |
| 4427 |
according to the first author.\par\bigskip} |
| 4428 |
\end{lstcode} |
| 4429 |
The \Macro{bigskip}\IndexCmd{bigskip} command ensures that the |
| 4430 |
preamble and the first reference are separated by a large vertical |
| 4431 |
space.% |
| 4432 |
\end{Example}% |
| 4433 |
% |
| 4434 |
\EndIndexGroup |
| 4435 |
|
| 4436 |
|
| 4437 |
\begin{Declaration} |
| 4438 |
\Macro{BreakBibliography}\Parameter{interruption code} |
| 4439 |
\end{Declaration} |
| 4440 |
This\textnote{Attention!}\ChangedAt{v3.00}{\Class{scrbook}\and |
| 4441 |
\Class{scrreprt}\and \Class{scrartcl}} command exists only if the |
| 4442 |
environment \Environment{thebibliography} has not been redefined by another |
| 4443 |
package. With this instruction, you can insert a break into the |
| 4444 |
bibliography. The \PName{interruption code} will be expanded inside a |
| 4445 |
group. Such a break may be, for example, a heading using |
| 4446 |
\DescRef{\LabelBase.cmd.minisec}. Unfortunately there is currently no way to |
| 4447 |
have this command automatically generated, for example by using a special |
| 4448 |
entry in the \BibTeX{} database. Therefore, it can currently only be used by |
| 4449 |
users who edit the bibliography directly. For this reason, its usefulness is |
| 4450 |
very limited.% |
| 4451 |
% |
| 4452 |
\EndIndexGroup |
| 4453 |
|
| 4454 |
|
| 4455 |
\begin{Declaration} |
| 4456 |
\Macro{AfterBibliographyPreamble}\Parameter{code}% |
| 4457 |
\Macro{AtEndBibliography}\Parameter{code} |
| 4458 |
\end{Declaration} |
| 4459 |
In\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} |
| 4460 |
some cases, it may be useful to add some \PName{code} after the bibliography |
| 4461 |
preamble or just before the end of the bibliography. This is possible with the |
| 4462 |
help of these two instructions. |
| 4463 |
\begin{Example} |
| 4464 |
You want to set the bibliography not justified but ragged right. You can |
| 4465 |
achieve this with: |
| 4466 |
\begin{lstcode} |
| 4467 |
\AfterBibliographyPreamble{\raggedright} |
| 4468 |
\end{lstcode} |
| 4469 |
You can put this instruction anywhere before the bibliography. However, it is |
| 4470 |
recommended to do so in the preamble of the document or a separate package. |
| 4471 |
\end{Example} |
| 4472 |
The\textnote{Attention!} functionality of this instruction depends on |
| 4473 |
cooperation with packages modifying the bibliography, if you use such a |
| 4474 |
package\iffree{}{(see \autoref{sec:maincls-experts.coexistence}, |
| 4475 |
\DescPageRef{maincls-experts.cmd.AfterBibliographyPreamble})}.% |
| 4476 |
% |
| 4477 |
\EndIndexGroup |
| 4478 |
% |
| 4479 |
\EndIndexGroup |
| 4480 |
|
| 4481 |
|
| 4482 |
\section{Index} |
| 4483 |
\seclabel{index} |
| 4484 |
\BeginIndexGroup |
| 4485 |
|
| 4486 |
For general information about making a keyword index, see \cite{lshort}, |
| 4487 |
\cite{makeindex}, and \cite{xindy}. Using a package that redefines |
| 4488 |
commands or environments for the index \KOMAScript{}'s ability to influence |
| 4489 |
the index may disappear. This applies, for example, when using the |
| 4490 |
\Package{index}\IndexPackage{index} package, but not when using the |
| 4491 |
\Package{splitidx}\IndexPackage{splitidx} package (see |
| 4492 |
\cite{package:splitindex}). |
| 4493 |
|
| 4494 |
\begin{Declaration} |
| 4495 |
\OptionVName{index}{setting}% |
| 4496 |
\end{Declaration} |
| 4497 |
\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% |
| 4498 |
By default or with \OptionValue{index}{default}% |
| 4499 |
\IndexOption{index~=\textKValue{default}}, the index is an unnumbered chapter |
| 4500 |
(\Class{scrbook} or \Class{scrreprt}) or section (\Class{scrartcl}) without an |
| 4501 |
entry in the table of contents. Since\important{\OptionValue{index}{totoc}} |
| 4502 |
the index usually comes last in a book or similar document, it does not |
| 4503 |
actually need an entry in the table of contents. Nevertheless, if you want to |
| 4504 |
do this, for example because you are working with a multi-index keyword |
| 4505 |
dictionary such as the one that appears in this \iffree{guide}{book}, you can |
| 4506 |
create this with the |
| 4507 |
\OptionValue{index}{totoc}\IndexOption{index~=\textKValue{totoc}} option. |
| 4508 |
You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4509 |
\Class{scrartcl}} can even number the index using the |
| 4510 |
\OptionValue{index}{numbered}\IndexOption{index~=\textKValue{numbered}} |
| 4511 |
setting. See also the \DescRef{\LabelBase.option.toc} option with the |
| 4512 |
\PValue{index} or \PValue{indexnumbered} values in |
| 4513 |
\autoref{sec:\LabelBase.toc} starting at |
| 4514 |
\DescPageRef{\LabelBase.option.toc.index}. |
| 4515 |
|
| 4516 |
For example, if you create multiple indexes with |
| 4517 |
\Package{splitidx}\IndexPackage{splitidx} (see \cite{package:splitindex}), |
| 4518 |
it may be useful to group them under a common heading. To make this possible, |
| 4519 |
\OptionValue{index}{leveldown}% |
| 4520 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4521 |
\Class{scrartcl}}\important{\OptionValue{index}{leveldown}} places the index |
| 4522 |
one sectioning level deeper than usual. In \Class{scrbook} and |
| 4523 |
\Class{scrreprt}, it is no longer a chapter but a section; with |
| 4524 |
\Class{scrartcl}, a subsection. The \OptionValue{index}{standardlevel}% |
| 4525 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4526 |
\Class{scrartcl}}\important{\OptionValue{index}{standardlevel}} option is |
| 4527 |
the counterpart to this and cancels any instance of |
| 4528 |
\OptionValue{index}{leveldown} used previously. |
| 4529 |
|
| 4530 |
You can find a summary of the available values for the \PName{setting} of |
| 4531 |
\Option{index} in \autoref{tab:maincls.index}. |
| 4532 |
|
| 4533 |
\begin{table} |
| 4534 |
\caption{Available values for the \Option{index} option} |
| 4535 |
\label{tab:maincls.index} |
| 4536 |
\begin{desctabular} |
| 4537 |
\pventry{leveldown}{% |
| 4538 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4539 |
\Class{scrartcl}}% |
| 4540 |
The index is moved down by one sectioning level.% |
| 4541 |
\IndexOption{index~=\textKValue{leveldown}}% |
| 4542 |
}% |
| 4543 |
\entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% |
| 4544 |
The index does not receive an entry in the table of contents.% |
| 4545 |
\IndexOption{index~=\textKValue{nottotoc}}}% |
| 4546 |
\entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, |
| 4547 |
\PValue{numberedtoc}, \PValue{numberedtotoc}}{% |
| 4548 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4549 |
\Class{scrartcl}}% |
| 4550 |
The index receives an entry in the table of contents and is numbered.% |
| 4551 |
\IndexOption{index~=\textKValue{numbered}}}% |
| 4552 |
\pventry{standardlevel}{% |
| 4553 |
\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and |
| 4554 |
\Class{scrartcl}}% |
| 4555 |
The index is at the usual sectioning level.% |
| 4556 |
\IndexOption{index~=\textKValue{standardlevel}}% |
| 4557 |
}% |
| 4558 |
\entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% |
| 4559 |
The index receives an entry in the table of contents without being |
| 4560 |
numbered.% |
| 4561 |
\IndexOption{index~=\textKValue{totoc}}}% |
| 4562 |
\end{desctabular} |
| 4563 |
\end{table} |
| 4564 |
% |
| 4565 |
\EndIndexGroup |
| 4566 |
|
| 4567 |
|
| 4568 |
\begin{Declaration} |
| 4569 |
\Macro{setindexpreamble}\Parameter{preamble} |
| 4570 |
\end{Declaration}% |
| 4571 |
As with the bibliography, you can also provide a preamble to the |
| 4572 |
index. This is often the case if you have more than one index or if |
| 4573 |
you mark different kinds of references by highlighting the page |
| 4574 |
numbers in different ways. |
| 4575 |
\begin{Example} |
| 4576 |
You have a document in which terms are both defined and used. The |
| 4577 |
page numbers of definitions are in bold. Of course you want to make |
| 4578 |
your reader aware of this fact. Thus you insert a preamble for the |
| 4579 |
index: |
| 4580 |
\begin{lstcode} |
| 4581 |
\setindexpreamble{All page numbers printed in \textbf{bold} |
| 4582 |
refer to definitions of terms. Page numbers printed |
| 4583 |
normally refer to pages where the term is used.\par\bigskip} |
| 4584 |
\end{lstcode} |
| 4585 |
\end{Example} |
| 4586 |
|
| 4587 |
Note\textnote{Attention!} that the page style is changed for the first page |
| 4588 |
of the index. The page style that is applied is defined in the macro |
| 4589 |
\DescRef{\LabelBase.cmd.indexpagestyle} (see |
| 4590 |
\autoref{sec:\LabelBase.pagestyle}, |
| 4591 |
\DescPageRef{\LabelBase.cmd.indexpagestyle}). |
| 4592 |
|
| 4593 |
The usual \LaTeX{} packages and additional programs are responsible for |
| 4594 |
creating, sorting, and outputting the index.% |
| 4595 |
\iftrue % Umbruchoptimierung |
| 4596 |
\iffree{}{ % |
| 4597 |
For example, the \Package{imakeidx}\IndexPackage{imakeidx} package |
| 4598 |
(see \cite{package:imakeidx}), which among other things automates the |
| 4599 |
invocation of the \File{makeindex} or \File{xindy} program, is highly |
| 4600 |
recommended. This eliminates a common source of error, particularly for |
| 4601 |
\LaTeX{} beginners.% |
| 4602 |
} |
| 4603 |
{\KOMAScript}, like the standard classes, provides only the basic macros |
| 4604 |
and environments for them.% |
| 4605 |
\fi |
| 4606 |
% |
| 4607 |
\EndIndexGroup |
| 4608 |
% |
| 4609 |
\EndIndexGroup |
| 4610 |
% |
| 4611 |
\EndIndexGroup |
| 4612 |
|
| 4613 |
\endinput |
| 4614 |
|
| 4615 |
%%% Local Variables: |
| 4616 |
%%% mode: latex |
| 4617 |
%%% TeX-master: "scrguide-en.tex" |
| 4618 |
%%% coding: utf-8 |
| 4619 |
%%% ispell-local-dictionary: "en_GB" |
| 4620 |
%%% eval: (flyspell-mode 1) |
| 4621 |
%%% End: |