Example: For some inexplicable reasons you want a dash with spaces before and after instead
of a colon followed by a space as label delimiter. You define:
125
Chapter 3.
\renewcommand*{\captionformat}{~--~}
This definition should be put in the preamble of your document.
\figureformat
\tableformat
It was already mentioned that \captionformat does not contain formatting for the label
itself. This situation should under no circumstances be changed using redefinitions of the
commands for the output of counters, \thefigure or \thetable. Such a redefinition would
have unwanted side effects on the output of \ref or the table of contents, list of figures and
list of tables. To deal with the situation, KOMA-Script offers two \...format commands
instead. These are predefined as follows:
\newcommand*{\figureformat}{\figurename~\thefigure\autodot}
\newcommand*{\tableformat}{\tablename~\thetable\autodot}
They also can be adapted to your personal preferences with \renewcommand.
Example: From time to time captions without any label and of course without delimiter are
desired. In KOMA-Script it takes only the following definitions to achieve this:
\renewcommand*{\figureformat}{}
\renewcommand*{\tableformat}{}
\renewcommand*{\captionformat}{}
It should be noted, however, that although no numbering is output, the internal
counters are nevertheless incremented. This becomes important especially if this
redefinition is applied only to selected figure or table environments.
\setcapindent{indent }
\setcapindent*{xindent }
\setcaphanging
As mentioned previously, in the standard classes the captions are set in a non-hanging style,
that is, in multi-line captions the second and subsequent lines start directly beneath the label.
The standard classes provide no direct mechanism to change this behaviour. In KOMA-Script,
on the contrary, beginning at the second line all lines are indented by the width of the label
so that the caption text is aligned.
This behaviour, which corresponds to the usage of \setcaphanging, can easily be changed
by using the command \setcapindent or \setcapindent*. Here the parameter indent
determines the indentation of the second and subsequent lines. If you want a line break after
the label and before the caption text, then you can define the indentation xindent of the
caption text with the starred version of the command instead: \setcapindent*. Using a
negative value of indent instead, a line break is also inserted before the caption text and only
the first line of the caption text but not subsequent lines are indented by the absolute value
of indent .
126
Chapter 3.
KOMA-Script
Figure 3.7.:
Equivalent to the standard
setting, similar to the usage of
\setcaphanging
KOMA-Script
Figure 3.8.:
With slightly hanging inden-
tation starting at the second line using
\setcapindent{1em}
KOMA-Script
Figure 3.9.:
With hanging indentation starting at the
second line and line break before the de-
scription using \setcapindent*{1em}
KOMA-Script
Figure 3.10.:
With indentation in the second line only
and line break before the description using
\setcapindent{-1em}
Whether one-line captions are set as captions with more than one line or are treated sep-
arately is specified with the option captions. For details please refer to the explanations of
these option at
page 115
.
Example: For the examples please refer to figures
3.7
to
3.10
. As you can see the usage of a
fully hanging indentation is not advantageous when combined with narrow column
width. To illustrate, the source code for the second figure is given here with a
modified caption text:
\begin{figure}
\setcapindent{1em}
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}}
\caption{Example with slightly indented caption
starting at the second line}
\end{figure}
As can be seen the formatting can also be changed locally within the figure envi-
ronment. The change then affects only the current figure. Following figures once
again use the default settings or global settings set, for example, in the preamble
of the document. This also of course applies to tables.
\setcapwidth[justification ]{width }
\setcapdynwidth[justification ]{width }
\setcapmargin[margin left ]{margin }
\setcapmargin*[margin inside ]{margin }
Using
v2.8q
these three commands you can specify the width and justification of the caption text.
In general the whole text width or column width is available for the caption.
With the command \setcapwidth you can decrease this width . The obligatory argument
determines the maximum width of the caption. As an optional argument you can supply
exactly one letter which specifies the horizontal justification. The possible justifications are
given in the following list.
127
Chapter 3.
l
– left-aligned
c
– centered
r
– right-aligned
i
– alignment at the inner margin in double-sided output
o
– alignment at the outer margin in double-sided output
The justification inside and outside corresponds to left-aligned and right-aligned, respectively,
in single-sided output. Within longtable tables the justification inside or outside does not work
correctly. In particular, the captions on subsequent pages of such tables are aligned according
to the format of the caption on the first page of the table. This is a conceptual problem in
the implementation of longtable.
Please
v3.20
note, \setcapwidth sets the width immediately to the value of parameter width like
\setlength
would do. If you instead want the value of width when the caption is set, you
can use \setcapdynwidth. There can be differences in the result, if you, e. g., use lengths like
\linewidth
or other commands as argument width .
With the command \setcapmargin you can specify a margin which is to be left free
next to the description in addition to the normal text margin. If you want margins with
different widths at the left and right side you can specify these using the optional argu-
ment margin left . The starred version \setcapmargin* defines instead of a margin left
a margin inside in a double-sided layout. In case of longtable tables you have to deal
with the same problem with justification inside or outside as mentioned with the macro
\setcapwidth
. Furthermore, the usage of \setcapmargin or \setcapmargin* switches on
the option captions=nooneline (see
page 115
) for the captions which are typeset with this
margin setting.
You can also submit negative values for margin and margin left or margin inside . This
has the effect of the caption expanding into the margin.
Experts and advanced users may find a tricky usage of \setcapwidth in [
Koh14a
].
origlongtable
If the table captions produced by the longtable package (see [
Car04
]) should not be redefined
by the KOMA-Script classes, activate the origlongtable option. This option has to be used
at the optional argument of \documentclass. It may not be used as a setting of \KOMAoptions
or \KOMAoptions.
listof=setting
Normally
v3.00
lists of floating environments — like list of tables or list of figures will neither get
an entry at the table of contents nor have a number at the heading. More information
128
Chapter 3.
about that may be found in
section 3.9
. Alternative to the view from the table of con-
tents to the lists of floating environments, you may reconsider a view from the lists of floating
environments into the table of contents. Because of this, there are not only the options
toc=nolistof
, toc=listof, and toc=listofnumbered described in
section 3.9
,
page 65
, but
also listof=notoc, listof=totoc, and listof=numbered with the same meaning.
By default the headings of the lists of floating environments use the topmost level below
\part
. This is the chapter level at scrbook and scrreprt and the section level at scrartcl. With
v3.06
listof=leveldown
a one step lower level will be used instead.
Example: At a book you want to move the list of figures and the list of tables as sub-lists
into a common list named “Figures and Tables”. With
\KOMAoption{listof}{leveldown}
you first declare to use the section instead of the chapter level for both lists and
then you use:
\addchap*{Figures and Tables}
\listoffigures
\listoftables
for the new list, that contains the list of figures and the list of tables. More infor-
mation about the command \addchap* may be found in
section 3.16
at
page 94
.
Normally
v2.8q
the lists of floating environments use a constant with to place the caption number
of the entries. Additionally all entries will be indented a little bit. This corresponds to setting
listof=graduated
.
If the numbers of the figures or tables, become very wide — i. e., if you have a lot of tables or
figures — their may be not enough width predefined. There’s a setting listof=flat for the
lists of floating environment similar to toc=flat for the table of contents. Thereby the needed
with for printing the number will be determined at each L
A
TEX run. See option toc=flat,
section 3.9
,
page 65
for information about how it works. Please note again, that you need
more than one L
A
TEX runs until the lists of floating environments will become their final result.
Setting listof=entryprefix
v3.06
will automatically activate listof=flat too. Normally it
would not make sense to add the prefix “figure” to each entry of the list of figures and the
prefix “table” to each entry of the list of tables, because nothing else than figures would
be and should be expected at the list of figures and nothing else than tables would be and
should be expected at the list of tables. So this prefixes would not give any additional in-
formation and for this would not be useful. Nevertheless, such prefixes may be added using
option listof=entryprefix. With this all entries of the same list will get the same pre-
fix. The prefix will depend on the file extension of the helper file, that will be used for
the corresponding list. For the list of figures the file extension would be “lof” and therefor
\listoflofentryname
would be used. For the list of tables, the file extension would be “lot”
and \listoflotentryname would be used.
129
Chapter 3.
Within classes scrbook and scrreprt KOMA-Script adds a vertical gap to the lists of floating
scrbook
,
scrreprt
environments whenever a new chapter starts. This behaviour, that is same at the stan-
dard classes, structures the lists by chapters. At KOMA-Script it corresponds to setting
v3.00
listof=chaptergapsmall
. In this case a gap of width 10 pt will be used. With option
listof=chaptergapline
a gap of the height of one standard text line will be used. The gap
may be switched of with listof=nochaptergap. Option listof=chapterentry is somehow
special. Instead of a gap it adds the table of contents entry for the chapter additionally to the
lists of floating environments. Please note, that this would also happen, if the chapter does
not have any floating environment. Additional influence of chapters to the lists of floating
environments is available with option chapteratlists. See
section 3.16
,
page 88
for more
information about that.
An overview about all settings to option listof may be found at
table 3.20
.
Table 3.20.: Available values for option listof to modify contents and formation of the lists of floating
environments
chapterentry
, withchapterentry
Marks chapter starts at the lists of floating environments by a copy of their entries
to the table of contents.
chaptergapline
, onelinechaptergap
Marks chapter starts at the lists of floating environments by a vertical gap of the
height of one standard text line.
chaptergapsmall
, smallchaptergap
Marks chapter starts at the lists of floating environments by a small vertical gap.
entryprefix
v3.06
Adds a prefix depending on the file extension of the list to each entry of the lists
of floating environments. The prefix additionally depends on the language, e. g., in
English “Figure” would be used for the entries to the list of figures and “Table” for
the entries to the list of tables. Both prefixes will be followed by a white space.
flat
, left
The lists of floating environments will be printed like a kind of table. The caption
numbers will be the first column, the caption texts the second column, and the page
numbers the last column. The width of the first column depends on the previous
L
A
TEX run.
. . .
130
Chapter 3.
Table 3.20.: Available values for option listof (continuation)
graduated
, indent, indented
The lists of floating environments will be printed in hierarchical form. The width
for the caption numbers will be limited.
leveldown
The lists of floating environments will use a heading of one step lower sectioning
level than default.
nochaptergap
, ignorechapter
Chapter starts are not marked at the lists of floating environments.
notoc
, plainheading
The lists of floating environments, e. g., list of figures and list of tables do not generate
an entry at the table of contents.
numbered
, totocnumbered, tocnumbered, numberedtotoc
The lists of floating environments, e. g., list of figures and list of tables, would get a
numbered heading and therefor generate an entry at the table of contents.
totoc
, toc, notnumbered
The lists of floating environments, e. g., list of figures and list of tables, would gen-
erate an entry at the table of contents, but their headings are not numbered.
\listoftables
\listoffigures
These commands generate a list of tables or figures. Changes in the document that modify
these lists will require two L
A
TEX runs in order to take effect. The layout of the lists can be
influenced by the option listof with values graduated or flat (see
page 127
). Moreover, the
values listof and listofnumbered of option toc (see
section 3.9
) as well as the values totoc
and numbered of the previous described option listof have influence to the lists of floating
environments.
Mostly the lists of floating environment may be found after the table of contents. But some
publishers like to have these lists at the appendix. Nevertheless the author of this guide prefers
to find them immediately after the table of contents.
3.21. Margin Notes
Aside from the text area, that normally fills the typing area, usually a marginalia column may
be found. Margin notes will be printed at this area. At lot of them may be found in this
manual.
131
Chapter 3.
\marginpar[margin note left ]{margin note }
\marginline{margin note }
Usually margin notes in L
A
TEX are inserted with the command \marginpar. They are placed
in the outer margin. In documents with one-sided layout the right border is used. Though
\marginpar
can take an optional different margin note argument in case the output is in
the left margin, margin notes are always set in justified layout. However, experience has
shown that many users prefer left- or right-aligned margin notes instead. To facilitate this,
KOMA-Script offers the command \marginline.
Example: In this chapter, sometimes, the class name scrartcl can be found in the margin.
This can be produced with:
\marginline{\texttt{scrartcl}}
Instead of \marginline you could have used \marginpar. In fact the first com-
mand is implemented internally as:
\marginpar[\raggedleft\texttt{scrartcl}]
{\raggedright\texttt{scrartcl}}
Thus \marginline is really only an abbreviated writing of the code above.
Experts and advanced users may find information about problems using \marginpar at
section 21.1
,
page 386
. These are valid for \marginline also.
3.22. Appendix
The appendix of a document contains mainly the enclosures to the document. These are
typically bibliography, index, glossary. But only for this parts nobody would and should start
an appendix, because the formation of these already distinguishes them from the main docu-
ment. But if there are additional elements at the appendix, i. e., cited third party documents,
endnotes, figures or tabulars, the standard elements like the bibliography should also be part
of the appendix.
\appendix
The appendix in the standard as well as the KOMA-Script classes is introduced with
\appendix
. This command switches, among other things, the chapter numbering to upper case
letters, also ensuring that the rules according to [
DUD96
] are followed (for German-speaking
regions). These rules are explained in more detail in the description of the option numbers in
section 3.16
,
page 88
.
Die output of the chapter headings in the appendix are influenced by the options
scrbook
,
scrreprt
chapterprefix
and appendixprefix. See
section 3.16
,
page 85
for more information.
Please note that \appendix is a command, not an environment! This command does not
expect any argument. Chapters and sections in the appendix uses \chapter and \section
just as does the main text.
132
Chapter 3.
3.23. Bibliography
The bibliography opens up external resources. Mainly bibliographies will be made by program
B
IB
TEX or biber using an external file in database like structure. Thereby B
IB
TEX style
influences not only the formation of the bibliography entries but also their sorting. Using an
additional bibliography style like natbib, babelbib, or biblatex limits the influence of KOMA-
Script to the bibliography hardly. In such cases it is important so see the manual of the
bibliography package! General information about bibliography may be found in [
OPHS11
].
bibliography=selection
For a start, selection
v3.00
may be any already defined bibliography formation style. There are
two predefined formation styles at KOMA-Script. You should not misconceive them with the
styles used by B
IB
TEX which you may select using \bibstyle. While B
IB
TEX influences not
only the sorting but also the contents of the bibliography, KOMA-Script influences only some
basic features of the bibliography or a tiny amount of formation features of the entries to the
bibliography.
Option bibliography=oldstyle selects a compact formation of the bibliography entries.
In this case command \newblock inside of the entries will only result in a small horizontal
distance. The name is a result of the fact, that this is the mostly used classic kind of bibli-
ography. In opposite to thisbibliography=openstyle. selects a more modern and open kind
of bibliography. The name is a result of the fact, that command \newblock inserts a para-
graph break. The entries will be more structured by this. They are less compact and seem
more relaxed or open. Information about definition of new formation styles may be found in
description of command \newbibstyle in
section 21.3
at
page 406
.
Beside the formation style one more feature may be selected using selection . The bib-
liography is a kind of contents list. But instead of listing contents of the document itself, it
references to external contents. Because of this, someone may say, that the bibliography is a
chapter or section on its own and should have a chapter or section number. You may select
this with option bibliography=totocnumbered which will therefor also generate an entry to
the table of contents.In my opinion the bibliography is nothing you’ve written on your own
and so does not merits a numbered entry to the table of contents. A entry without number
may be set with option bibliography=totoc. Nevertheless, the default would be neither a
number nor an entry to the table of contents and corresponds to bibliography=nottotoc.
For more information see option toc in
section 3.9
, especially values bibliographynumbered,
bibliography
, and nobibliography to this option at
page 65
.
Sometimes
v3.12
it is not usefull to have one bibliography for the whole document but a bibliog-
raphy at every chapter of a document made using scrbook or scrreprt. In that case you’d need
the bibliography itself not to be a chapter but one level below, a section. You may achieve
this using Option bibliography=leveldown. You may use this also if you’d combine several
133
Chapter 3.
Table 3.21.: Predefined values of option bibliography to select the formation of the bibliography
leveldown
v3.12
The bibliography will use a heading of one step lower section level than default.
nottotoc
The bibliography will neither have an entry at the table of contents nor a number,
oldstyle
The bibliography will use the classic, compact formation, where \newblock generates
an expandable horizontal distance only.
openstyle
The bibliography will use the structured, open formation, where \newblock generates
a paragraph break.
totoc
The bibliography will have an entry at the table of contents but no number.
totocnumbered
The bibliography will have an entry at the table of contents and a number at the
heading.
lists and the bibliography together below one heading. So this option is also available with
scrartcl.
A summary of all available values for option bibliography may be found in
table 3.21
.
Nevertheless you should note, that additional values may be generated using \newbibstyle.
\setbibpreamble{ preamble }
The command \setbibpreamble can be used to set a preamble for the bibliography.
This can be achieved by placing the preamble before the command for issuing the bib-
liography. However, it need not be directly in front of it. For example, it could be
placed at the beginning of the document. Similar to the options bibliography=totoc and
bibliography=totocnumbered
, this command can only be successful if you have not loaded
a package which prevents this by redefining the thebibliography environment. Even though
the natbib package makes unauthorized use of internal macros of KOMA-Script it could be
achieved that \setbibpreamble works with the current version of natbib (see [
Dal10
]).
Dostları ilə paylaş: |