You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
tex-compiler/texmf-dist/source/latex/koma-script/doc/english/common-textmarkup.tex

816 lines
39 KiB

% ======================================================================
% common-textmarkup.tex
% Copyright (c) Markus Kohm, 2001-2019
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% common-textmarkup.tex
% Copyright (c) Markus Kohm, 2001-2019
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
% http://www.latex-project.org/lppl.txt
% und Version 1.3c ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
%
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Paragraphs that are common for several chapters of the KOMA-Script guide
% Maintained by Markus Kohm
%
% ----------------------------------------------------------------------
%
% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind
% Verwaltet von Markus Kohm
%
% ======================================================================
\KOMAProvidesFile{common-textmarkup.tex}
[$Date: 2019-12-02 09:50:10 +0100 (Mon, 02 Dec 2019) $
KOMA-Script guide (common paragraphs)]
\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and
Karl Hagen}
% Date of the translated German file: 2019-12-02
\section{Text Markup}
\seclabel{textmarkup}%
\BeginIndexGroup%
\BeginIndex{}{text>markup}%
\BeginIndex{}{font}%
\IfThisCommonFirstRun{}{%
The information in in \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}
largely applies to this chapter. So if you have already read and understood
\autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, you can
\IfThisCommonLabelBaseOneOf{scrextend,scrjura,scrlayer-notecolumn}{}{%
limit yourself to examining
\autoref{tab:\ThisCommonLabelBase.fontelements},
\autopageref{tab:\ThisCommonLabelBase.fontelements} and then }%
skip ahead to \autoref{sec:\ThisCommonLabelBase.textmarkup.next},
\autopageref{sec:\ThisCommonLabelBase.textmarkup.next}.%
\IfThisCommonLabelBase{scrextend}{\ In this case, however,
note\textnote{limitation} that \Package{scrextend} supports only the
elements for the document title, the dictum, the footnotes, and the
\DescRef{maincls.env.labeling} environment. from
\autoref{tab:maincls.fontelements},
\autopageref{tab:maincls.fontelements}. Although the
\DescRef{maincls.fontelement.disposition} element exists,
\Package{scrextend} uses it only for the document title.%
}{}%
}
% Umbruchkorrektur
\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrextend}{}{%
{\LaTeX} offers different possibilities for logical and direct
markup\Index{logical markup}\Index{markup} of text. %
\IfThisCommonLabelBaseOneOf{scrlttr2}{}{%
In addition to the choice of the font, this includes commands for choosing
the font size and orientation. %
} For more information about the standard font facilities, see
\cite{lshort}, \cite{latex:usrguide}, and \cite{latex:fntguide}.%
}
% Both commands are in LaTeX for a long time, so I do not describe them any
% longer despite \textsubscript is still defined by KOMA-Script if needed.
%\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura,scrlayer-notecolumn}{%
\iffalse
%}{%
% \csname iftrue\endcsname}%
\begin{Declaration}
\Macro{textsuperscript}\Parameter{text}%
\Macro{textsubscript}\Parameter{text}
\end{Declaration}
The \LaTeX{} kernel defines the command
\Macro{textsuperscript}\IndexCmd{textsuperscript} to put text in
superscript\Index{text>superscript}\Index{superscript}. Unfortunately,
\LaTeX{}\textnote{\Latex~2015/01/01} itself did not offer a command to
produce text in subscript\Index{text>subscript}\Index{subscript} until
release 2015/01/01. \KOMAScript{} defines \Macro{textsubscript} for this
purpose. %
\ifthiscommonfirst
\begin{Example}
\phantomsection
\xmpllabel{cmd.textsubscript}%
You are writing a text on human metabolism. From time to time you
have to give some simple chemical formulas in which the numbers are
in subscript. To allow for logical markup, you first define in the
document preamble or in a separate package:
\begin{lstcode}
\newcommand*{\molec}[2]{#1\textsubscript{#2}}
\end{lstcode}
\newcommand*{\molec}[2]{#1\textsubscript{#2}}
Using this you then write:
\begin{lstcode}
The cell produces its energy partly from the reaction of \molec C6\molec
H{12}\molec O6 and \molec O2 to produce \molec H2\Molec O{} and
\molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a
detrimental effect on the metabolism.
\end{lstcode}
The output looks as follows:
\begin{ShowOutput}
The cell produces its energy partly from the reaction of \molec C6\molec
H{12}\molec O6 and \molec O2 to produce \molec H2\molec O{} and
\molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a
detrimental effect on the metabolism.
\end{ShowOutput}
Some time later you decide that the chemical formulas should be
typeset in sans serif. Now you can see the advantages of using
logical markup. You only have the redefine the \Macro{molec}
command:
\begin{lstcode}
\newcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}}
\end{lstcode}
\renewcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}}
Now the output in the whole document changes to:
\begin{ShowOutput}
The cell produces its energy partly from the reaction of \molec
C6\molec H{12}\molec O6 and \molec O2 to produce \molec H2\molec
O{} and \molec C{}\molec O2. However, arsenic (\molec{As}{}) has
quite a detrimental effect on the metabolism.
\end{ShowOutput}
\end{Example}
\iftrue
\begin{Explain}
The example above uses the notation ``\verb|\molec C6|''.
This makes use of the fact that arguments consisting of only one
character do not have to be enclosed in parentheses. That is why
``\verb|\molec C6|'' is similar to ``\verb|\molec{C}{6}|''. You
may already be familiar with this notation from indices or powers in
mathematical environments, such as ``\verb|$x^2$|'' instead of
``\verb|$x^{2}$|''
for ``$x^2$''.
\end{Explain}
\else % maybe some time I've made an English book
Advanced users can find information about the reason the example above
does work unless you put all arguments of \Macro{molec} into braces in
\autoref{sec:experts.knowhow},
\DescPageRef{experts.macroargs}.%
\fi%
\else%
You can find an example that uses it in
\autoref{sec:\ThisCommonFirstLabelBase.textmarkup},
\PageRefxmpl{\ThisCommonFirstLabelBase.cmd.textsubscript}.
\fi%
\EndIndexGroup%
\fi
\begin{Declaration}
\Macro{setkomafont}\Parameter{element}\Parameter{commands}%
\Macro{addtokomafont}\Parameter{element}\Parameter{commands}%
\Macro{usekomafont}\Parameter{element}
\end{Declaration}%
With%
\IfThisCommonLabelBase{maincls}{%
\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}}%
}{} the help of the \Macro{setkomafont} and \Macro{addtokomafont}
commands, you can attach particular font styling \PName{commands} that change
the appearance of a given \PName{element}. Theoretically, all statements,
including literal text, can be used as \PName{commands}. You
should\textnote{Attention!}, however, limit yourself to those statements that
really change font attributes only. These are usually commands like
\Macro{rmfamily}, \Macro{sffamily}, \Macro{ttfamily}, \Macro{upshape},
\Macro{itshape}, \Macro{slshape}, \Macro{scshape}, \Macro{mdseries},
\Macro{bfseries}, \Macro{normalfont}, as well as the font size commands
\Macro{Huge}, \Macro{huge}, \Macro{LARGE}, \Macro{Large}, \Macro{large},
\Macro{normalsize}, \Macro{small}, \Macro{footnotesize}, \Macro{scriptsize},
and \Macro{tiny}. You can find these commands explained in \cite{lshort},
\cite{latex:usrguide}, or \cite{latex:fntguide}. Colour switching commands
like \Macro{normalcolor} (see \cite{package:graphics} and
\cite{package:xcolor}) are also acceptable.%
\iffalse % Umbruchkorrekturtext
\ The behaviour when using other commands, especially those that lead to
redefinitions or generate output, is undefined. Strange behaviour is possible
and does not represent a bug.
\else
\ The use of other commands, in particular those that redefine things or
or lead to output, is not supported. Strange behaviour is possible in these
cases and does not represent a bug.
\fi
The command \Macro{setkomafont} provides an element with a completely new
definition of its font styling. In contrast, the \Macro{addtokomafont} command
merely extends an existing definition. You should not use either command
inside the document body but only in the preamble. For examples of their use,
refer to the sections for the respective element.%
\IfThisCommonLabelBase{scrlayer-notecolumn}{}{%
\ The name and meaning of each element
\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura}{, as well as their
defaults,}{} are listed in \IfThisCommonLabelBase{scrextend}{%
\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}
}{%
\autoref{tab:\ThisCommonLabelBase.fontelements} %
}.%
\IfThisCommonLabelBase{scrextend}{ %
However, in \Package{scrextend} only\textnote{limitation} the listed
elements for the document title, dictum, footnotes, and the
\DescRef{maincls.env.labeling} environment are supported. Although the
\DescRef{maincls.fontelement.disposition} element exists,
\Package{scrextend} uses it only for the document title.%
}{%
\IfThisCommonLabelBase{scrlayer-scrpage}{ %
The specified defaults apply only if the corresponding element has not
already been defined before loading \Package{scrlayer-scrpage}. For
example, the \KOMAScript classes define
\DescRef{maincls.fontelement.pageheadfoot}, and then
\Package{scrlayer-scrpage} uses the setting it finds.%
}{%
\IfThisCommonLabelBase{scrjura}{}{ %
The default values can be found in the corresponding sections.%
}%
}%
}%
}%
\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{% Umbruchvarianten
The \Macro{usekomafont} command can be used to switch the current font style
to the specified \PName{Element}.%
}{%
With the \Macro{usekomafont} command, the current font style can be changed
to the one defined for the specified \PName{element}.%
}
\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname}
\begin{Example}
\phantomsection\xmpllabel{cmd.setkomafont}%
Suppose you want to use the same font specification for the element
\DescRef{\ThisCommonLabelBase.fontelement.captionlabel}
that is used with
\DescRef{\ThisCommonLabelBase.fontelement.descriptionlabel}. This can be
easily done with:
\begin{lstcode}
\setkomafont{captionlabel}{%
\usekomafont{descriptionlabel}%
}
\end{lstcode}
You can find other examples in the explanation of each element.
\end{Example}
\begin{desclist}
\desccaption{%
Elements whose font style can be changed in \Class{scrbook},
\Class{scrreprt} or \Class{scrartcl} with \Macro{setkomafont} and
\Macro{addtokomafont}%
\label{tab:maincls.fontelements}%
\label{tab:scrextend.fontelements}%
}{%
Elements whose font style can be changed (\emph{continued})%
}%
\feentry{author}{%
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}%
author of the document in the title, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.author} when
\DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.author})}%
\feentry{caption}{text of a figure or table caption (see
\autoref{sec:maincls.floats}, \DescPageRef{maincls.cmd.caption})}%
\feentry{captionlabel}{label of a figure or table caption; applied in
addition to the \DescRef{\ThisCommonLabelBase.fontelement.caption}
element (see \autoref{sec:maincls.floats},
\DescPageRef{maincls.cmd.caption})}%
\feentry{chapter}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.chapter} (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.chapter})}%
\feentry{chapterentry}{%
table of contents entry for the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.chapter} (see
\autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{chapterentrydots}{%
\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}%
optional points connecting table-of-content entries for the
\DescRef{\ThisCommonLabelBase.cmd.chapter} level, differing from the
\DescRef{\ThisCommonLabelBase.fontelement.chapterentry} element,
\Macro{normalfont} and \Macro{normalsize} (see
\autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{chapterentrypagenumber}{%
page number of the table of contents entry for the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.chapter}, differing from the element
\DescRef{\ThisCommonLabelBase.fontelement.chapterentry} (see
\autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{chapterprefix}{%
label, e.\,g., ``Chapter'', appearing before the chapter number in both
\OptionValueRef{maincls}{chapterprefix}{true} and
\OptionValueRef{maincls}{appendixprefix}{true} (see
\autoref{sec:maincls.structure},
\DescPageRef{maincls.option.chapterprefix})}%
\feentry{date}{%
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}%
date of the document in the main title, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.date} when
\DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.date})}%
\feentry{dedication}{%
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}%
dedication page after the main title, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.dedication} when
\DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.dedication})}%
\feentry{descriptionlabel}{labels, i.\,e., the optional argument of
\DescRef{\ThisCommonLabelBase.cmd.item.description} in the
\DescRef{\ThisCommonLabelBase.env.description} environment (see
\autoref{sec:maincls.lists}, \DescPageRef{maincls.env.description})}%
\feentry{dictum}{dictum or epigraph (see \autoref{sec:maincls.dictum},
\DescPageRef{maincls.cmd.dictum})}%
\feentry{dictumauthor}{author of a dictum or epigraph; applied in addition
to the element \DescRef{\ThisCommonLabelBase.fontelement.dictum} (see
\autoref{sec:maincls.dictum}, \DescPageRef{maincls.cmd.dictum})}%
\feentry{dictumtext}{alternative name for
\DescRef{\ThisCommonLabelBase.fontelement.dictum}}%
\feentry{disposition}{all sectioning command titles, i.\,e., the arguments
of \DescRef{\ThisCommonLabelBase.cmd.part} down to
\DescRef{\ThisCommonLabelBase.cmd.subparagraph} and
\DescRef{\ThisCommonLabelBase.cmd.minisec}, including the title of the
abstract; applied before the element of the respective unit (see
\autoref{sec:maincls.structure}, \autopageref{sec:maincls.structure})}%
\feentry{footnote}{footnote text and marker (see
\autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}%
\feentry{footnotelabel}{marker for a footnote; applied in addition to the
element \DescRef{\ThisCommonLabelBase.fontelement.footnote} (see
\autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}%
\feentry{footnotereference}{footnote reference in the text (see
\autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}%
\feentry{footnoterule}{%
horizontal rule\ChangedAt{v3.07}{\Class{scrbook}\and
\Class{scrreprt}\and \Class{scrartcl}} above the footnotes at the end
of the text area (see \autoref{sec:maincls.footnotes},
\DescPageRef{maincls.cmd.setfootnoterule})}%
\feentry{labelinglabel}{labels, i.\,e., the optional argument of
\DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the
\DescRef{\ThisCommonLabelBase.env.labeling} environment (see
\autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}%
\feentry{labelingseparator}{separator, i.\,e., the optional argument of
the \DescRef{\ThisCommonLabelBase.env.labeling} environment; applied in
addition to the element
\DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} (see
\autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}%
\feentry{minisec}{title of \DescRef{\ThisCommonLabelBase.cmd.minisec} (see
\autoref{sec:maincls.structure} ab \DescPageRef{maincls.cmd.minisec})}%
\feentry{pagefoot}{only used if package \Package{scrlayer-scrpage} has
been loaded (see \autoref{cha:scrlayer-scrpage},
\DescPageRef{scrlayer-scrpage.fontelement.pagefoot})}%
\feentry{pagehead}{alternative name for
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}}%
\feentry{pageheadfoot}{the header and footer of a page (see
\autoref{sec:maincls.pagestyle} from
\autopageref{sec:maincls.pagestyle})}%
\feentry{pagenumber}{page number in the header or footer (see
\autoref{sec:maincls.pagestyle})}%
\feentry{pagination}{alternative name for
\DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}%
\feentry{paragraph}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.paragraph} (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.paragraph})}%
\feentry{part}{title of the \DescRef{\ThisCommonLabelBase.cmd.part}
sectioning command, without the line containing the part number (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}%
\feentry{partentry}{%
table of contents entry for the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.part} (see \autoref{sec:maincls.toc},
\DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{partentrypagenumber}{%
page number of the table of contents entry for the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.part}; applied in addition to the
element \DescRef{\ThisCommonLabelBase.fontelement.partentry} (see
\autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{partnumber}{line containing the part number in a title of the
sectioning command \DescRef{\ThisCommonLabelBase.cmd.part} (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}%
\feentry{publishers}{%
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}%
publishers of the document in the main title, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.publishers} when
\DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.publishers})}%
\feentry{section}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.section} (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.section})}%
\feentry{sectionentry}{%
table of contents entry for sectioning command
\DescRef{\ThisCommonLabelBase.cmd.section} (only available in
\Class{scrartcl}, see \autoref{sec:maincls.toc},
\DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{sectionentrydots}{%
\ChangedAt{v3.15}{\Class{scrartcl}}%
optional points connecting table-of-content entries for the
\DescRef{\ThisCommonLabelBase.cmd.section} level, differing from the
\DescRef{\ThisCommonLabelBase.fontelement.sectionentry} element,
\Macro{normalfont} and \Macro{normalsize} (only available in
\Class{scrartcl}, see
\autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{sectionentrypagenumber}{%
page number of the table of contents entry for the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.section}; applied in addition to
element \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} (only
available in \Class{scrartcl}, see \autoref{sec:maincls.toc},
\DescPageRef{maincls.cmd.tableofcontents})}%
\feentry{sectioning}{alternative name for
\DescRef{\ThisCommonLabelBase.fontelement.disposition}}%
\feentry{subject}{%
topic of the document, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.subject} on the main title page (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.subject})}%
\feentry{subparagraph}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.subparagraph} (see
\autoref{sec:maincls.structure},
\DescPageRef{maincls.cmd.subparagraph})}%
\feentry{subsection}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.subsection} (see
\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.subsection})}%
\feentry{subsubsection}{title of the sectioning command
\DescRef{\ThisCommonLabelBase.cmd.subsubsection} (see
\autoref{sec:maincls.structure},
\DescPageRef{maincls.cmd.subsubsection})}%
\feentry{subtitle}{%
subtitle of the document, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.subtitle} on the main title page (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.title})}%
\feentry{title}{main title of the document, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.title} (for details about the title
size see the additional note in the text of
\autoref{sec:maincls.titlepage} from \DescPageRef{maincls.cmd.title})}%
\feentry{titlehead}{%
\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}%
heading above the main title of the document, i.\,e., the argument of
\DescRef{\ThisCommonLabelBase.cmd.titlehead} when
\DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see
\autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.titlehead})}%
\end{desclist}
\else
\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}
\begin{Example}
Suppose you want to print the document title in a red serif font.
You can do this using:
\begin{lstcode}
\setkomafont{title}{\color{red}}
\end{lstcode}
You will need the \Package{color} or the \Package{xcolor} package for
the \Macro{color}\PParameter{red} command. Using \Macro{normalfont} is
unnecessary in this case because it is already part of the definition of
the title itself. This\textnote{Attention!} example also needs the
\OptionValueRef{scrextend}{extendedfeature}{title} option (see
\autoref{sec:scrextend.optionalFeatures},
\DescPageRef{scrextend.option.extendedfeature}).
\end{Example}
\else
\IfThisCommonLabelBase{scrlttr2}{%
You can find a general example that uses both \Macro{setkomafont} and
\Macro{usekomafont} in \autoref{sec:maincls.textmarkup} on
\PageRefxmpl{maincls.cmd.setkomafont}.
\begin{desclist}
\desccaption{%
Elements whose font style can be changed in the \Class{scrlttr2}
class or the \Package{scrletter} package with the
\Macro{setkomafont} and \Macro{addtokomafont}
commands\label{tab:scrlttr2.fontelements}%
}{%
Elements whose font style can be changed (\emph{continued})%
}%
\feentry{addressee}{recipient's name and address in the address field
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.option.addrfield})}%
\feentry{backaddress}{%
return address for a window envelope
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.option.backaddress})}%
\feentry{descriptionlabel}{%
label, i.\,e. the optional argument of
\DescRef{\ThisCommonLabelBase.cmd.item.description}, in a
\DescRef{\ThisCommonLabelBase.env.description} environment
(\autoref{sec:scrlttr2.lists},
\DescPageRef{scrlttr2.env.description})}%
\feentry{foldmark}{%
fold mark on the letterhead page; allows change of line colour
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.option.foldmarks})}%
\feentry{footnote}{%
footnote text and marker (\autoref{sec:scrlttr2.footnotes},
\DescPageRef{scrlttr2.cmd.footnote})}%
\feentry{footnotelabel}{%
footnote marker; applied in addition to the
\DescRef{\ThisCommonLabelBase.fontelement.footnote} element
(\autoref{sec:scrlttr2.footnotes},
\DescPageRef{scrlttr2.cmd.footnote})}%
\feentry{footnotereference}{%
footnote reference in the text (\autoref{sec:scrlttr2.footnotes},
\DescPageRef{scrlttr2.cmd.footnote})}%
\feentry{footnoterule}{%
horizontal rule\ChangedAt{v3.07}{\Class{scrlttr2}} above the
footnotes at the end of the text area
(\autoref{sec:maincls.footnotes},
\DescPageRef{maincls.cmd.setfootnoterule})}%
\feentry{fromaddress}{%
sender's address in the letterhead
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.fromaddress})}%
\feentry{fromname}{%
sender's name in the letterhead, not including
\PValue{fromaddress} (\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.fromname})}%
\feentry{fromrule}{%
horizontal rule in the letterhead; intended for
colour changes (\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.option.fromrule})}%
\feentry{labelinglabel}{%
labels, i.\,e. the optional argument of
\DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the
\DescRef{\ThisCommonLabelBase.env.labeling} environment %
(see \autoref{sec:scrlttr2.lists},
\DescPageRef{scrlttr2.env.labeling})}%
\feentry{labelingseparator}{%
separator, i.\,e. the optional argument of the
\DescRef{\ThisCommonLabelBase.env.labeling} environment; applied
in addition to the
\DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} element
(see \autoref{sec:scrlttr2.lists},
\DescPageRef{scrlttr2.env.labeling})}%
\feentry{pagefoot}{%
depending on the page style used after the
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for
the footer (\autoref{sec:\LabelBase.pagestyle},
\DescPageRef{\LabelBase.fontelement.pagefoot})}%
\feentry{pagehead}{%
depending on the page style used after the
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for
the header (\autoref{sec:\LabelBase.pagestyle},
\DescPageRef{\LabelBase.fontelement.pagefoot})}%
\feentry{pageheadfoot}{%
the header and footer of a page for all page styles
that have been defined using \KOMAScript{}
(\autoref{sec:\LabelBase.pagestyle},
\DescPageRef{\ThisCommonLabelBase.fontelement.pageheadfoot})}%
\feentry{pagenumber}{%
page number in the header or footer %
(\autoref{sec:\LabelBase.pagestyle},
\DescPageRef{\ThisCommonLabelBase.fontelement.pagenumber})}%
\feentry{pagination}{%
alternative name for
\DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}%
\feentry{placeanddate}{%
\ChangedAt{v3.12}{\Class{scrlttr2}}%
place and date, if a date line will be used instead of a normal
reference line (\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.placeseparator})}%
\feentry{refname}{%
description or title of the fields in the reference line %
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.yourref})}%
\feentry{refvalue}{%
content of the fields in the reference line %
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.yourref})}%
\feentry{specialmail}{%
delivery type in the address field %
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.specialmail})}%
\feentry{lettersubject}{%
\ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}%
subject in the opening of the letter %
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.subject})}%
\feentry{lettertitle}{%
\ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}%
title in the opening of the letter %
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.title})}%
\feentry{toaddress}{%
variation of the
\DescRef{\ThisCommonLabelBase.fontelement.addressee} element to
format the recipient's address, not including the name, in the
address field (\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.toaddress})}%
\feentry{toname}{%
variation of the
\DescRef{\ThisCommonLabelBase.fontelement.addressee} element to
format the recipient's name in the address field
(\autoref{sec:scrlttr2.firstpage},
\DescPageRef{scrlttr2.variable.toname})}%
\end{desclist}
}{%
\IfThisCommonLabelBase{scrlayer-scrpage}{%
\begin{desclist}
\desccaption[{Elements of \Package{scrlayer-scrpage} whose font
styles can be changed with the \Macro{setkomafont} and
\Macro{addtokomafont} commands}]%
{Elements of \Package{scrlayer-scrpage} whose font styles can be
changed with the \Macro{setkomafont} and \Macro{addtokomafont}
commands, and their defaults, if they have not been defined
before loading \Package{scrlayer-scrpage}%
\label{tab:scrlayer-scrpage.fontelements}%
}%
{Elements whose font style can be changed (\emph{continued})}%
\feentry{footbotline}{%
horizontal line below the footer of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot} and
\DescRef{\ThisCommonLabelBase.fontelement.pagefoot}%
\IndexFontElement{pagefoot}. It is recommended to use this element
for colour changes only.\par
\mbox{Default: \emph{empty}}%
}%
\feentry{footsepline}{%
horizontal line above the footer of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot} and
\DescRef{\ThisCommonLabelBase.fontelement.pagefoot}%
\IndexFontElement{pagefoot}. It is recommended to use this element
for colour changes only.\par
\mbox{Default: \emph{empty}}%
}%
\feentry{headsepline}{%
horizontal line below the header of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot} and
\DescRef{scrlayer-scrpage.fontelement.pagehead}%
\IndexFontElement{pagehead}. It is recommended to use this element
for colour changes only.\par
Default: \emph{empty}%
}%
\feentry{headtopline}{%
horizontal line above the header of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot} and
\DescRef{scrlayer-scrpage.fontelement.pagehead}%
\IndexFontElement{pagehead}. It is recommended to use this element
for colour changes only.\par
\mbox{Default: \emph{empty}}%
}%
\feentry{pagefoot}{%
contents of the page footer of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the font of element
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot}.\par
\mbox{Default: \emph{empty}}%
}%
\feentry{pagehead}{%
contents of the page header of a page style defined using
\Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont} and the font of element
\DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}%
\IndexFontElement{pageheadfoot}.\par
\mbox{Default: \emph{empty}}%
}%
\feentry{pageheadfoot}{%
contents of the page header or footer of a page style defined
using \Package{scrlayer-scrpage}. The font will be applied after
\Macro{normalfont}\IndexCmd{normalfont}.\par
\mbox{Default: \Macro{normalcolor}\Macro{slshape}}%
}%
\feentry{pagenumber}{%
pagination set with
\DescRef{\ThisCommonLabelBase.cmd.pagemark}. If you redefine
\DescRef{\ThisCommonLabelBase.cmd.pagemark}, you have to be sure
that your redefinition also uses
\Macro{usekomafont}\PParameter{pagenumber}!\par
\mbox{Default: \Macro{normalfont}}%
}%
\end{desclist}
}{%
\IfThisCommonLabelBase{scrjura}{%
\begin{table}
\caption{Elements whose \Package{scrjura} font styles can be
changed with \Macro{setkomafont} and \Macro{addtokomafont},
including their default settings}%
\label{tab:scrjura.fontelements}%
\begin{desctabular}
\feentry{Clause}{%
alias for \FontElement{\PName{environment name}.Clause}
within a contract environment, for example
\FontElement{contract.Clause} within
\DescRef{\ThisCommonLabelBase.env.contract}; if no
corresponding element is defined,
\FontElement{contract.Clause} is used%
}%
\feentry{contract.Clause}{%
heading of a paragraph within
\DescRef{\ThisCommonLabelBase.env.contract} (see
\autoref{sec:\ThisCommonLabelBase.contract},
\DescPageRef{\ThisCommonLabelBase.fontelement.contract.Clause});
\par
\mbox{Default: \Macro{sffamily}\Macro{bfseries}\Macro{large}}%
}%
\entry{\DescRef{\ThisCommonLabelBase.fontelement./Name/.Clause}}{%
\IndexFontElement[indexmain]{\PName{name}.Clause}%
heading of a paragraph within a \PName{name} environment
defined with
\DescRef{\ThisCommonLabelBase.cmd.DeclareNewJuraEnvironment}
as long as the setting was made with \Option{ClauseFont} or
the item was subsequently defined (see
\autoref{sec:\ThisCommonLabelBase.newenv},
\DescPageRef{\ThisCommonLabelBase.fontelement./Name/.Clause});
\par
\mbox{Default: \emph{none}}%
}%
\feentry{parnumber}{%
paragraph numbers within a contract environment (see
\autoref{sec:\ThisCommonLabelBase.par},
\DescPageRef{\ThisCommonLabelBase.fontelement.parnumber});\par
\mbox{Default: \emph{empty}}%
}%
\feentry{sentencenumber}{%
\ChangedAt{v3.26}{\Package{scrjura}}%
sentence number of \DescRef{\ThisCommonLabelBase.cmd.Sentence}
(see \autoref{sec:\ThisCommonLabelBase.sentence},
\DescPageRef{%
\ThisCommonLabelBase.fontelement.sentencenumber});\par
\mbox{Default: \emph{empty}}%
}%
\end{desctabular}
\end{table}
}{%
\IfThisCommonLabelBase{scrlayer-notecolumn}{}{%
\InternalCommonFileUsageError%
}%
}%
}%
}%
\fi%
\fi
\EndIndexGroup
\begin{Declaration}
\Macro{usefontofkomafont}\Parameter{element}%
\Macro{useencodingofkomafont}\Parameter{element}%
\Macro{usesizeofkomafont}\Parameter{element}%
\Macro{usefamilyofkomafont}\Parameter{element}%
\Macro{useseriesofkomafont}\Parameter{element}%
\Macro{useshapeofkomafont}\Parameter{element}
\end{Declaration}
Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and
\Class{scrartcl}\and \Package{scrextend}}, although this is not recommended,
the font setting of an element is used for settings that are not actually
related to the font. If you want to apply only the font setting of an element
but not those other settings, you can use \Macro{usefontofkomafont} instead of
\DescRef{\ThisCommonLabelBase.cmd.usekomafont}. This will activate the font
size and baseline skip, the font encoding, the font family, the font series,
and the font shape of an element, but no further settings as long as those
further settings are local.
You can also switch to a single one of those attributes using one of the other
commands. Note that \Macro{usesizeofkomafont} uses both the font
size and the baseline skip.%
%
\IfThisCommonLabelBase{scrextend}{% Umbruchvariante!
}{%
\IfThisCommonLabelBase{scrjura}{%
\par%
However, the misuse of the font settings is strongly discouraged (see
\autoref{sec:maincls-experts.fonts},
\DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist})!%
}{%
\par%
However, you should not take these commands as legitimizing the insertion
of arbitrary commands in an element's font setting. To do so can lead
quickly to errors (see \autoref{sec:maincls-experts.fonts},
\DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist}).%
}%
}%
\EndIndexGroup
%
\EndIndexGroup
%%% Local Variables:
%%% mode: latex
%%% mode: flyspell
%%% coding: us-ascii
%%% ispell-local-dictionary: "en_GB"
%%% TeX-master: "../guide"
%%% End: