diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex | 219 |
1 files changed, 214 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex index 724addb592e..f19c3ebc4fa 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex @@ -48,13 +48,13 @@ % ============================================================================ \KOMAProvidesFile{scrbookreportarticle-experts.tex} - [$Date: 2015-06-17 13:12:54 +0200 (Wed, 17 Jun 2015) $ + [$Date: 2015-09-11 14:31:18 +0200 (Fri, 11 Sep 2015) $ KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl for experts)] \translator{Gernot Hassenpflug\and Markus Kohm} -% Date of the translated German file: 2015-06-17 +% Date of the translated German file: 2015-09-10 \chapter{Additional Information about the Main Classes \Class{scrbook}, @@ -295,9 +295,11 @@ itself defines a lot of \PName{alias name}s for several \PName{element}s. \EndIndex{Cmd}{newkomafont}% \begin{Declaration} - \Macro{addtokomafontrelaxlist}\Parameter{macro} + \Macro{addtokomafontrelaxlist}\Parameter{macro}\\ + \Macro{addtokomafontgobblelist}\Parameter{macro} \end{Declaration} \BeginIndex{Cmd}{addtokomafontrelaxlist}% +\BeginIndex{Cmd}{addtokomafontgobblelist}% As already mentioned in \autoref{part:forAuthors} of this manual, font settings of elements should consist only in commands to select the size, family, coding, series, shape, or colour. At least changing the colour is not always @@ -329,7 +331,7 @@ what \Macro{MakeUppercase} needs. Therefore\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} \KOMAScript{} holds a list of macros, which should become \Macro{relax} inside \Macro{usefontofkomafont} and it's siblings. Amongst -others, \Macro{color}, \Macro{normalcolor}, \Macro{MakeUppercase}, and +others, \Macro{normalcolor}, \Macro{MakeUppercase}, and \Macro{MakeLowercase} are part of that list. More macros can be added one by one using \Macro{addtokomafontrelaxlist}. @@ -339,7 +341,15 @@ locally. Therefore you must not add commands like \Macro{setlength} to the list. The user himself is responsible for all errors resulting in the usage of \Macro{addtokomafontrelaxlist}. Additionally this command should not be misunderstood as a legitimation for adding all kind of commands to the font -setting of an element!% +setting of an element! + +If\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} a \PName{macro} and it's first argument should be ignored +locally inside \Macro{usefontofkomafont} and it's siblings, you can use +\Macro{addtokomafontgobblelist} instead of \Macro{addtokomafontrelaxlist}. An +example for this is the command \Macro{color}, that has to be ignored with the +colour name and therefore is a default member of the gobble-list.% +\EndIndex{Cmd}{addtokomafontgobblelist}% \EndIndex{Cmd}{addtokomafontrelaxlist}% @@ -499,6 +509,14 @@ dependent attributes, too. Currently the following styles are provided: be prefixed by \Macro{the\PName{counter name}} followed by a dot.\\ + \ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartl}}% + \PValue{counterwithout} & \PName{counter name} & + Cancels a prior + \PValue{counterwithin} + setting. Therefore it makes sense + only if you re-define an existing + section-like command.\\ \PValue{expandtopt} & \PName{switch}& If the switch is on, all following values for lengths will be completely expanded, evaluated and @@ -1127,6 +1145,197 @@ print extra rules above and below the chapter heading may be found at \begin{Declaration} + \Macro{chapterlineswithprefixformat}% + \Parameter{level}\Parameter{number}\Parameter{text}\\ + \Macro{chapterlinesformat}% + \Parameter{level}\Parameter{number}\Parameter{text} +\end{Declaration} +\BeginIndex{Cmd}{chapterlineswithprefixformat}% +\BeginIndex{Cmd}{chapterlinesformat}% +These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}} commands are used +by headings with style \PValue{chapter} to output the heading number and +heading text depending on option +\Option{chapterprefix}\IndexOption{chapterprefix}% +\textnote{\Option{chapterprefix}} (see \autoref{sec:maincls.structure}, +\autopageref{desc:maincls.option.chapterprefix}). If the option is +\PValue{true} \Macro{chapterlineswithprefixformat} is used, otherwise +\Macro{chapterlinesformat}. + +The arguments \PName{number} and \PName{text} are already formatted, i.\,e., +they contain font selections. At least the order and layout of both has to be +done with these commands. If a heading has no number argument \PName{number} +will be completely empty also without any format or font commands. + +The default definitions are very simple: +\begin{lstcode}[belowskip=\dp\strutbox plus 1pt] + \newcommand{\chapterlinesformat}[3]{% + \@hangfrom{#2}{#3}% + } + \newcommand{\chapterlineswithprefixformat}[3]{% + #2#3% + } +\end{lstcode} + +\begin{Example} + You want to have chapter headings with yellow background. For the headings + without prefix line you use the follow definition in the document preamble: +\begin{lstcode} + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \@hangfrom{#2}#3% + }% + }% + } + \makeatother +\end{lstcode} + For chapter headings without prefix line you use: +\begin{lstcode} + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + #2#3% + }% + }% + } +\end{lstcode} + Unfortunately you will find, that these re-definitions result in justified + text for the headings. The reason is the \Macro{parbox} command. To change + this, you can use \Macro{raggedchapter} (see \autoref{sec:maincls.structure}, + \autopageref{desc:maincls.cmd.raggedchapter}) inside the argument of + \Macro{parbox}. Otherwise \Macro{raggedchapter} would be used only before + \Macro{chapterlineswithprefixformat} and \Macro{chapterlinesformat}: +\begin{lstcode} + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \raggedchapter + \@hangfrom{#2}#3% + }% + }% + } + \makeatother + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \raggedchapter + #2#3% + }% + }% + } +\end{lstcode} + Remember to use \Macro{makeatletter} and \Macro{makeatother} only at the + document preamble. Do not use it inside your own wrapper-class or + package. It is only needed because of \Macro{@hangfrom} in the definition of + \Macro{chapterlinesformat}. +\end{Example} + +As the example shows, users, who change the definition of one of the commands, +should take care of several side effects. The alignment of the text is only +one thing. They also have to prevent page breaks in the headings, e.\,g., if +they add extra space into the output. The example above does not have page +break problems. Not only the boxes prevent page breaks. \KOMAScript{} itself +also changes \Macro{interlinepenalty} as part of \PName{text} to prevent page +breaks. It also finishes \PName{text} with an internal paragraph break using +\Macro{@par}. + +Command \Macro{raggedchapter} is not part of \PName{text} but executed before +\Macro{chapterlineswithprefixformat} or \Macro{chapterlinesformat}. This makes +it much easier to use, e.\,g., \Macro{MakeUppercase} at a +re-definition. Please note, typographers use individual letter spacing at +majuscule text, but \LaTeX{} command \Macro{MakeUppercase} does not. + +The first argument, \PName{level}, is not used by the default definition and +also not needed in the example above. It is of interest only, if a user would +define several commands with \PValue{chapter} style and need to distinguish +the different levels. The predefined commands \Macro{chapter}, +\Macro{chapter*}, \Macro{addchap}, and \Macro{addchap*} all share the same +\PName{level} \PName{chapter}.% +\EndIndex{Cmd}{chapterlinesformat}% +\EndIndex{Cmd}{chapterlineswithprefixformat}% + + +\begin{Declaration} + \Macro{sectionlinesformat}% + \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}\\ + \Macro{sectioncatchphraseformat}% + \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}\\ +\end{Declaration} +\BeginIndex{Cmd}{sectionlinesformat}% +\BeginIndex{Cmd}{sectioncatchphraseformat}% +These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} commands are used by headings with style \PValue{section} +to output the heading number and heading text. If the heading is printed as +catch phrase at the very beginning of the following paragraph text +\Macro{sectioncatchphraseformat} is used, otherwise +\Macro{sectionlinesformat}. + +In both cases \PName{indent} is the value of the horizontal indention of the +heading relative to the text area. If the value is negative the heading should +even move into the left margin. + +The arguments \PName{number} and \PName{text} are already formatted, i.\,e., +they contain font selections. At least the order and layout of both has to be +done with these commands. If a heading has no number argument \PName{number} +will be completely empty also without any format or font commands. + +The default definitions are: +\begin{lstcode}[belowskip=\dp\strutbox plus 1pt] +\newcommand{\sectionlinesformat}[4]{% + \@hangfrom{\hskip #2#3}{#4}% +} +\newcommand{\sectioncatchphraseformat}[4]{% + \hskip #2#3#4% +} +\end{lstcode} + +If the user re-defines one of these commands, he has to take care to prevent +page breaks inside the printing of the heading. \KOMAScript{} itself only +changes \Macro{interlinepenalty} to impede page breaks. + +\begin{Example} + Like chapter headings in the previous example, headings of \PName{level} + \PValue{section} should be printed with a background colour. The lower + levels should be affected: +\begin{lstcode} + \makeatletter + \renewcommand{\sectionlinesformat}[4]{% + \@tempswafalse + \ifstr{#1}{section}{% + \hspace*{#2}% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep-#2}{% + \raggedsection + \@hangfrom{#3}{#4}% + }% + }% + }{% + \@hangfrom{\hskip #2#3}{#4}% + }% + } + \makeatother +\end{lstcode} + With this code the indention part of indented headings would not be + coloured, but with negative indention the background of the margin part of + the headings will also become yellow. You can move the \Macro{hspace*} + command into the \Macro{colorbox} to change this. + + Again remember to use \Macro{makeatletter} and \Macro{makeatother} only at the + document preamble. Do not use it inside your own wrapper-class or + package. It is only needed because of \Macro{@hangfrom} in the definition of + \Macro{sectionlinesformat}. +\end{Example} + +The first argument, \PName{level}, is not used by the default definition. The +example shows how to use it to distinguish different heading levels of the +same style \PValue{section}.% +\EndIndex{Cmd}{sectioncatchphraseformat}% +\EndIndex{Cmd}{sectionlinesformat}% + + +\begin{Declaration} \Macro{SecDef}\Parameter{star command}\Parameter{command}\\ \Macro{scr@startsection}\Parameter{name}\Parameter{level}% \Parameter{indent}\Parameter{beforeskip}\Parameter{afterskip}\\ |