diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-21 21:11:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-21 21:11:31 +0000 |
commit | 3367ff3b4f3e35fd696252ede7227352504083df (patch) | |
tree | 212aaf43e4472c0a6de50792075110eae3d6828f /Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex | |
parent | 01d0ab68fa1f6e72c8b568cfea2dbc1ddab12759 (diff) |
koma-script (21nov21)
git-svn-id: svn://tug.org/texlive/trunk@61108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex | 168 |
1 files changed, 92 insertions, 76 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex index 56f4899802b..f457b2af659 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbase.tex @@ -1,6 +1,6 @@ % ====================================================================== % scrbase.tex -% Copyright (c) Markus Kohm, 2002-2020 +% Copyright (c) Markus Kohm, 2002-2021 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,7 +18,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrbase.tex -% Copyright (c) Markus Kohm, 2002-2020 +% Copyright (c) Markus Kohm, 2002-2021 % % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, % Version 1.3c, verteilt und/oder veraendert werden. @@ -46,11 +46,11 @@ % ====================================================================== \KOMAProvidesFile{scrbase.tex} - [$Date: 2020-08-24 15:34:10 +0200 (Mon, 24 Aug 2020) $ + [$Date: 2021-10-16 12:22:12 +0200 (Sat, 16 Oct 2021) $ KOMA-Script package scrbase] \translator{Markus Kohm\and Melvin Hendrix\and Karl Hagen} -% Date of the translated German file: 2020-08-24 +% Date of the translated German file: 2021-10-16 \chapter{Basic Functions in the \Package{scrbase} Package} \labelbase{scrbase} @@ -983,9 +983,9 @@ replace the functionality. Others have been renamed. \end{Declaration} This\ChangedAt{v3.28}{\Package{scrbase}} command works like \Macro{@ifundefined} from the \LaTeX{} kernel (see \cite{latex:source2e}). So -the \PName{then code} will be executed if \PName{name} is the name of a +the \PName{then code} is executed if \PName{name} is the name of a command that is currently either not defined or \Macro{relax}. Otherwise, the -\PName{else code} will be executed. Unlike \Macro{@ifundefined}, no hash +\PName{else code} is executed. Unlike \Macro{@ifundefined}, no hash memory is allocated nor is \Macro{\PName{Name}} set to \Macro{relax} if \Macro{\PName{name}} was previously undefined.% \EndIndexGroup @@ -995,12 +995,50 @@ memory is allocated nor is \Macro{\PName{Name}} set to \Macro{relax} if \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.28}{\Package{scrbase}} the command with the given name has -already been defined, the \PName{then code} will be executed. Otherwise, the -\PName{else code} will be executed. Since \eTeX{} already has a primitive +already been defined, the \PName{then code} is executed. Otherwise, the +\PName{else code} is executed. Since \eTeX{} already has a primitive \Macro{ifdefined}, this somewhat unwieldy name, unfortunately, had to be chosen. There is no corresponding internal command.% \EndIndexGroup + +\begin{Declaration} + \Macro{Ifstr}\Parameter{string 1}\Parameter{string 2}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +Both\ChangedAt{v3.28}{\Package{scrbase}} \PName{string} arguments are expanded +and then compared. If the expansions are the same, the \PName{then code} is +executed. Otherwise the \PName{else code} is executed. There is no +corresponding internal command. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifstrstart}\Parameter{string 1}\Parameter{string 2}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +Both\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{string} arguments are expanded and then compared. If \PName{string 1}, +apart from white space, begins with \PName{string 2}, the \PName{then code} is +executed. Otherwise, the \PName{else code} is executed. There is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfArgIsEmpty}\Parameter{argument} + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.19}{\Package{scrbase}} the \PName{argument} is empty, the +\PName{then code} is executed, otherwise the \PName{else code} is +executed. Even one whitespace character is considered non-empty. Since the +\PName{argument} is not expanded, macros that expand to an empty result are +also considered to be a non-empty \PName{argument}. The same applies to +\Macro{relax} or undefined macros.% +\EndIndexGroup + + \iffalse % internal \begin{Declaration} \Macro{scr@ifluatex} @@ -1018,6 +1056,7 @@ There\textnote{Attention!} is no user equivalent for this instruction. Use the \EndIndexGroup \fi + \iffalse% It makes no sense to document this instruction yet \begin{Declaration} \Macro{scr@ifpdforluatex} @@ -1050,19 +1089,20 @@ test directly for the command you want instead.% \Macro{scr@ifVTeX}% \Parameter{then code}\Parameter{else code}% \end{Declaration} -If you use V\TeX{}, the \PName{then code} will be executed. Otherwise, the -\PName{else code} will be executed. This test is seldom useful. As a rule, +If you use V\TeX{}, the \PName{then code} is executed. Otherwise, the +\PName{else code} is executed. This test is seldom useful. As a rule, you should test directly for the command you want instead.% % \EndIndexGroup \fi + \begin{Declaration} \Macro{Ifpdfoutput}% \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.28}{\Package{scrbase}} a PDF file is generated, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be +\PName{then code} is executed. Otherwise, the \PName{else code} is executed. It does not matter whether PDF file is created using lua\TeX{}, pdf\TeX{}, or V\TeX{}, or \XeTeX{}.% \EndIndexGroup @@ -1073,7 +1113,7 @@ pdf\TeX{}, or V\TeX{}, or \XeTeX{}.% \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.28}{\Package{scrbase}} a PostScript file is generated, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be +\PName{then code} is executed. Otherwise, the \PName{else code} is executed. V\TeX{} can generate PostScript directly, which is recognized here. However, if V\TeX{} is not used but the switch \Macro{if@dvips} has been defined, the decision depends on that switch. \KOMAScript{} provides @@ -1089,59 +1129,20 @@ defined, the decision depends on that switch. \KOMAScript{} provides \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.28}{\Package{scrbase}} a DVI-file is generated, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be +\PName{then code} is executed. Otherwise, the \PName{else code} is executed. A DVI file is always assumed to be generated if no direct output of a PDF file or a PostScript file can be detected.% \EndIndexGroup \begin{Declaration} - \Macro{if@atdocument}\ \PName{then code}\ % - \textMacro{else}\ \PName{else code}\ \textMacro{fi} -\end{Declaration} -This conditional command intentionally exists only as an internal command. In -the document preamble, \Macro{if@atdocument} corresponds to \Macro{iffalse}. -After \Macro{begin}\PParameter{document}, it corresponds to \Macro{iftrue}. -Authors of classes and packages may find this command useful if a command -should behave differently depending on whether it is used in the preamble or -inside document body. Note\textnote{Attention!} that this command is a -condition using \TeX{} syntax and not \LaTeX{} syntax! -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifstr}\Parameter{string 1}\Parameter{string 2}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -Both\ChangedAt{v3.28}{\Package{scrbase}} \PName{string} arguments are expanded -and then compared. If the expansions are the same, the \PName{then code} will -be executed. Otherwise the \PName{else code} will be executed. There is no -corresponding internal command. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifstrstart}\Parameter{string 1}\Parameter{string 2}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -Both\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{string} arguments are expanded and then compared. If \PName{string 1}, -apart from white space, begins with \PName{string 2}, the \PName{then code} -will be executed. Otherwise, the \PName{else code} will be executed. There is -no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} \Macro{Ifisdimen}\Parameter{expression}% \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to a \Macro{dimen}, i.\,e. a \TeX{} length -register, the \PName{then code} will be executed. Otherwise the \PName{else - code} will be executed. The command is not completely expandable, and there +register, the \PName{then code} is executed. Otherwise the \PName{else + code} is executed. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1152,8 +1153,8 @@ is no corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to something syntactically equivalent to a length, -the \PName{then code} will be executed. Otherwise the \PName{else code} will -be executed. Note\textnote{Attention!} that unknown units will cause an error +the \PName{then code} is executed. Otherwise the \PName{else code} is +executed. Note\textnote{Attention!} that unknown units cause an error message. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1163,9 +1164,9 @@ corresponding internal command.% \Macro{Ifdimen}\Parameter{string}% \Parameter{then code}\Parameter{else code} \end{Declaration} -The \PName{then code}\ChangedAt{v3.28}{\Package{scrbase}} will be executed if +The \PName{then code}\ChangedAt{v3.28}{\Package{scrbase}} is executed if the first-order expansion of \PName{string} consists of digits and a valid -length unit. Otherwise, the \PName{else code} will be used. There is no +length unit. Otherwise, the \PName{else code} is used. There is no corresponding internal command.% \EndIndexGroup @@ -1176,9 +1177,9 @@ corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to an \eTeX{} \Macro{dimexpr}\IndexCmd{dimexpr}, -the \PName{then code} will be executed. Otherwise, the \PName{else code} will -be executed. Note\textnote{Attention!} that illegal expressions will result -in error messages. The command is not completely expandable, and there is no +the \PName{then code} is executed. Otherwise, the \PName{else code} is +executed. Note\textnote{Attention!} that illegal expressions result in +error messages. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1189,7 +1190,7 @@ corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to a \Macro{skip}, i.\,e. a \TeX{} distance, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be +\PName{then code} is executed. Otherwise, the \PName{else code} is executed. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1201,8 +1202,8 @@ corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to something syntactically equivalent of the value -of a skip, the \PName{then code} will be executed. Otherwise, the \PName{else - code} will be executed. Note\textnote{Attention!} that invalid units will +of a skip, the \PName{then code} is executed. Otherwise, the \PName{else + code} is executed. Note\textnote{Attention!} that invalid units result in an error message. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1214,9 +1215,9 @@ there is no corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to a \Macro{glueexpr}, i.\,e. an \eTeX{} distance -expression, the \PName{then code} will be executed. Otherwise, the \PName{else - code} will be executed. Note,\textnote{Attention!} that illegal expressions -will result in error messages. The command is not completely expandable, and +expression, the \PName{then code} is executed. Otherwise, the \PName{else + code} is executed. Note,\textnote{Attention!} that illegal expressions +result in error messages. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1226,8 +1227,8 @@ there is no corresponding internal command.% \Parameter{then code}\Parameter{else code} \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{counter} is defined as a \LaTeX{} counter, the \PName{then code} will -be executed. Otherwise, the \PName{else code} will be executed. The command is +\PName{counter} is defined as a \LaTeX{} counter, the \PName{then code} is +executed. Otherwise, the \PName{else code} is executed. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1238,7 +1239,7 @@ not completely expandable, and there is no corresponding internal command.% \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{count} expands to a \Macro{count}, i.\,e. a \TeX{} counter, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be +\PName{then code} is executed. Otherwise, the \PName{else code} is executed. The command is not completely expandable, and there is no corresponding internal command. For tests of \LaTeX{} counters, see \DescRef{\LabelBase.cmd.Ifiscounter}.% @@ -1252,7 +1253,7 @@ corresponding internal command. For tests of \LaTeX{} counters, see If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to something syntactically equivalent to of the value of a counter, i.\,e. a negative or positive integer, the \PName{then - code} will be executed. Otherwise, the \PName{else code} will be + code} is executed. Otherwise, the \PName{else code} is executed. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1262,9 +1263,9 @@ corresponding internal command.% \Macro{Ifnumber}\Parameter{string}% \Parameter{then code}\Parameter{else code} \end{Declaration} -The\ChangedAt{v3.28}{\Package{scrbase}} \PName{then code} will be executed if +The\ChangedAt{v3.28}{\Package{scrbase}} \PName{then code} is executed if the first-order expansion of \PName{string} consists only of -digits. Otherwise, the \PName{else code} will be used. There is no +digits. Otherwise, the \PName{else code} is used. There is no corresponding internal command. % \EndIndexGroup @@ -1276,9 +1277,9 @@ corresponding internal command. \end{Declaration} If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} \PName{expression} expands to a \Macro{numexpr}, i.\,e. an \eTeX{} number -expression, the \PName{then code} will be executed. Otherwise, the \PName{else - code} will be executed. Note\textnote{Attention!} that illegal expressions -will result in error messages. The command is not completely expandable, and +expression, the \PName{then code} is executed. Otherwise, the \PName{else + code} is executed. Note\textnote{Attention!} that illegal expressions +result in error messages. The command is not completely expandable, and there is no corresponding internal command.% \EndIndexGroup @@ -1344,6 +1345,21 @@ would be to use \DescRef{scrlayer.cmd.@mkright} from package \EndIndexGroup +\begin{Declaration} + \Macro{if@atdocument}\ \PName{then code}\ % + \textMacro{else}\ \PName{else code}\ \textMacro{fi} +\end{Declaration} +This conditional command intentionally exists only as an internal command. In +the document preamble, \Macro{if@atdocument} corresponds to \Macro{iffalse}. +After \Macro{begin}\PParameter{document}, it corresponds to \Macro{iftrue}. +Authors of classes and packages may find this command useful if a command +should behave differently depending on whether it is used in the preamble or +inside document body. Note\textnote{Attention!} that this command is a +condition using \TeX{} syntax and not \LaTeX{} syntax! +% +\EndIndexGroup + + \section{Defining Language-Dependent Terms} \seclabel{languageSupport} \BeginIndexGroup |