summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/common-5.tex
blob: dfbf6fd9afffcc54384486e3fea60f058e34e1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
% ======================================================================
% common-5.tex
% Copyright (c) Markus Kohm, 2001-2012
%
% 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-5.tex
% Copyright (c) Markus Kohm, 2001-2012
%
% 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
%
% ======================================================================

\ProvidesFile{common-5.tex}[2012/05/15 KOMA-Script guide (common paragraphs)]
\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi}

% Date of the translated German file: 2012/01/01

\makeatletter
\@ifundefined{ifCommonmaincls}{\newif\ifCommonmaincls}{}%
\@ifundefined{ifCommonscrextend}{\newif\ifCommonscrextend}{}%
\@ifundefined{ifCommonscrlttr}{\newif\ifCommonscrlttr}{}%
\@ifundefined{ifIgnoreThis}{\newif\ifIgnoreThis}{}%
\makeatother


\section{Text Markup}
\label{sec:\csname label@base\endcsname.textmarkup}%
\ifshortversion\IgnoreThisfalse\IfCommon{scrlttr2}{\IgnoreThistrue}\fi%
\ifIgnoreThis %++++++++++++++++++++++++++++++++++++++++++++++ nur scrlttr2 +
What is described in
\autoref{sec:maincls.textmarkup} applies, mutatis mutandis.
\else %---------------------------------------------------- nicht scrlttr2 -
\BeginIndex{}{text>markup}%
\BeginIndex{}{font}%

{\LaTeX} offers different possibilities for logical and direct
markup\Index{logical markup}\Index{markup} of text.
Selection of the
font family commands, as well as choosing the font size and width is
supported. More information about the standard font facilities may be found at
\cite{lshort}, \cite{latex:usrguide}, and \cite{latex:fntguide}.


\begin{Declaration}
  \Macro{textsuperscript}\Parameter{Text}\\
  \Macro{textsubscript}\Parameter{Text}
\end{Declaration}
\BeginIndex{Cmd}{textsubscript}%
\BeginIndex{Cmd}{textsuperscript}%
The \LaTeX-Kern already defines the command
\Macro{textsuperscript}\IndexCmd{textsuperscript} to
superscript\Index{text>superscript}\Index{superscript} text. Unfortunately,
{\LaTeX} itself does not offer a command to produce text in
subscript\Index{text>subscript}\Index{subscript} instead of
superscript\Index{text>superscript}\Index{superscript}. {\KOMAScript}
defines \Macro{textsubscript} for this purpose.

\IfCommon{scrlttr2}{You may find an example of usage at
  \autoref{sec:maincls.textmarkup},
  \autopageref{desc:maincls.textsubscript.example}.}
\IfCommon{scrextend}{You may find an example of usage at
  \autoref{sec:maincls.textmarkup},
  \autopageref{desc:maincls.textsubscript.example}.}
%
\ifCommonmaincls
\begin{Example}
  \phantomsection\label{desc:maincls.textsubscript.example}%
  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. For enabling 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 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 a quite
  detrimental effect on the metabolism.
\end{lstcode}
  The output looks as follows:
  \begin{ShowOutput}
    The cell produces its energy from 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 a quite
    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 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
    a quite detrimental effect on the metabolism.
  \end{ShowOutput}
\end{Example}
\iftrue
\begin{Explain}
  In the example above, the notation ``\verb|\molec C6|'' is used. 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
  might already know this from indices or powers in mathematical
  environments, such as ``\verb|$x^2$|'' instead of ``\verb|$x^{2}$|''
  for ``$x^2$''.
\end{Explain}
\else % vielleicht in einer spaeteren Auflage
F\"ur Experten ist in \autoref{sec:experts.knowhow},
\autopageref{desc:experts.macroargs} dokumentiert, warum das Beispiel
funktioniert, obwohl teilweise die Argumente von \Macro{Molek} nicht in
geschweifte Klammern gesetzt wurden.%
\fi
\fi% \ifCommonmaincls
%
\EndIndex{Cmd}{textsuperscript}%
\EndIndex{Cmd}{textsubscript}%


\begin{Declaration}
  \Macro{setkomafont}\Parameter{element}\Parameter{commands}\\
  \Macro{addtokomafont}\Parameter{element}\Parameter{commands}\\
  \Macro{usekomafont}\Parameter{element}
\end{Declaration}%
\BeginIndex{Cmd}{setkomafont}%
\BeginIndex{Cmd}{addtokomafont}%
\BeginIndex{Cmd}{usekomafont}%
With\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and
  \Class{scrartcl}} the help of the two commands \Macro{setkomafont} and
\Macro{addtokomafont}, it is possible to define the \PName{commands} that
change the characteristics of a given \PName{element}. Theoretically, all
possible statements including literal text could be used as \PName{commands}.
You should\textnote{Attention!}, however, absolutely limit yourself to those
statements that really switch only one font attribute. This will usually be
the commands \Macro{normalfont}, \Macro{rmfamily}, \Macro{sffamily},
\Macro{ttfamily}, \Macro{mdseries}, \Macro{bfseries}, \Macro{upshape},
\Macro{itshape}, \Macro{slshape}, and \Macro{scshape}, 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}. The description of these commands can be
found in \cite{lshort}, \cite{latex:usrguide}, or \cite{latex:fntguide}. Color
switching commands like \Macro{normalcolor} (see \cite{package:graphics} and
\cite{package:xcolor}) are also acceptable.  The behavior when using other
commands, especially those that make redefinitions or generate output, is not
defined. Strange behavior is possible and does not represent a bug.

The command \Macro{setkomafont } provides a font switching command with a
completely new definition. In contrast to this, the \Macro{addtokomafont}
command merely extends an existing definition. It is recommended to not use
both commands inside the document body, but only in the document preamble.
Usage examples can be found in the paragraphs on the corresponding element.
\fi %************************************************* Ende nicht scrlttr2 *
Names and meanings of the individual items are listed in %
\IfNotCommon{scrextend}{\autoref{tab:\csname
    label@base\endcsname.elementsWithoutText}}%
\IfCommon{scrextend}{\autoref{tab:maincls.elementsWithoutText},
  \autopageref{tab:maincls.elementsWithoutText}}%
.  %
\IfCommon{scrextend}{However only the listed elements for the document title,
  dicta, footnotes, and the \Environment{labeling} environment are
  supported. Though element \FontElement{disposition} exists, it will also be
  used for the document title only. This has been done for compatibility with
  the \KOMAScript{} classes. }%
The default values are shown in the corresponding paragraphs.

%%% Local Variables:
%%% mode: latex
%%% coding: us-ascii
%%% TeX-master: "../guide"
%%% End: