diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex | 679 |
1 files changed, 211 insertions, 468 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex index fb3282f1d70..c9cdc98c8aa 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrlayer-scrpage-experts.tex @@ -1,6 +1,6 @@ % ====================================================================== % scrlayer-scrpage-experts.tex -% Copyright (c) Markus Kohm, 2013-2017 +% Copyright (c) Markus Kohm, 2013-2018 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,7 +18,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrlayer-scrpage-experts.tex -% Copyright (c) Markus Kohm, 2013-2017 +% Copyright (c) Markus Kohm, 2013-2018 % % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, % Version 1.3c, verteilt und/oder veraendert werden. @@ -44,48 +44,51 @@ % ============================================================================ \KOMAProvidesFile{scrlayer-scrpage-experts.tex}% - [$Date: 2017-01-02 13:30:07 +0100 (Mon, 02 Jan 2017) $ + [$Date: 2018-03-30 11:57:25 +0200 (Fri, 30 Mar 2018) $ KOMA-Script guide (chapter: scrlayer-scrpage-experts)] -\translator{Markus Kohm} +\translator{Markus Kohm\and Karl Hagen} -% Date version of the translated file: 2015-03-31 +% Date version of the translated file: 2018-01-31 \chapter[{Additional Features of \Package{scrlayer-scrpage}}] {Additional Features\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} with - package \Package{scrlayer-scrpage}} + the \Package{scrlayer-scrpage} package} \labelbase{scrlayer-scrpage-experts} % \BeginIndexGroup \BeginIndex{Package}{scrlayer-scrpage}% -Package \Package{scrlayer-scrpage} provides features that have not been -described in \autoref{cha:scrlayer-scrpage} of this \iffree{user - guide}{book}'s \autoref{part:forAuthors}. In general, the average user will -not need those extensions and some of them are only provided for -compatibility with \Package{scrpage2}. +The \Package{scrlayer-scrpage} package offers many features beyond what has +been described in \autoref{cha:scrlayer-scrpage} of \autoref{part:forAuthors} +of this \iffree{guide}{book}. However, the average user will not normally need +these extensions, and some of them are only provided for compatibility with +\Package{scrpage2}. The documentation here in \autoref{part:forExperts} serves +to deepen and broaded your knowledge, and its mastery goes beyond basic +skills. -\LoadCommonFile{pagestylemanipulation}% \section{Manipulation of Defined Page Styles} +\LoadCommonFile{pagestylemanipulation}% \section{Manipulating Defined Page Styles} -\section{Definition of new Pairs of Page Styles} +\section{Defining New Pairs of Page Styles} \seclabel{pagestyle.pairs} -In \autoref{sec:scrlayer-scrpage.predefined.pagestyles} the page styles -\PageStyle{scrheadings} and \PageStyle{plain.scrheadings} have been -described. These can be seen as a pair of page styles, with -\PageStyle{scrheadings} being the main page style with a running head and -\PageStyle{plain.scrheadings} being the corresponding \PageStyle{plain} page -style without running head but generally with pagination. Additionally to the -configuration of these page styles, \Package{scrlayer-scrpage} provides also -the feature of defining new such pairs of page styles. Thereby the name of the -main page style, e.\,g., \PageStyle{scrheadings}, can be seen as the name of the -pair of page styles. - -Most users will not need more than the predefined pair -\PageStyle{scrheadings}. So the commands of this section may be understood as -an addition for special cases. And as each such case is very special, -this section also lacks of handsome examples. Nevertheless, if the support -will show me a real nice example in the future, I perhaps could use it in -the future. However, I'm almost sure that all such cases could also be -solved using the predefined pair only. +The two page styles \PageStyle{scrheadings} and \PageStyle{plain.scrheadings} +were described in \autoref{sec:scrlayer-scrpage.predefined.pagestyles}. You +can view them as a kind of pair, with \PageStyle{scrheadings} intended as the +main page style for a running head and \PageStyle{plain.scrheadings} the +corresponding \PageStyle{plain} page style without a running head but +generally with pagination. In addition to configuring this predefined pair, +\Package{scrlayer-scrpage} also lets you define additional pairs of page +styles. The name of the main page style, for example \PageStyle{scrheadings}, +also serves as the name of the page-style pair. + +\iffree{ + The vast majority of users will not need more than the one predefined + page-style pair, \PageStyle{scrheadings}. So the commands documented in this + section are therefore extensions for special cases. Since I have not come + across any suitable applications while writing this manual, there are no + detailed examples. Should I ever run across a particularly nice application + while providing support, I will happily include it in future versions. At + the same time, however, I'm virtually certain that all such cases could also + be solved using the predefined pair only.}{} \begin{Declaration} \Macro{defpairofpagestyles}% @@ -97,54 +100,58 @@ solved using the predefined pair only. \Macro{providepairofpagestyles}% \OParameter{parent pair}\Parameter{name}\Parameter{definition} \end{Declaration} -With these commands you may define pairs of page styles similar to -\PageStyle{scrheadings} and \PageStyle{plain.scrheadings}. Thereby -\PName{name} is the name of the main page style that is similar to -\PageStyle{scrheadings}. The name of the corresponding \PageStyle{plain} page -style will be prefixed by \PValue{plain.} automatically. So \PName{name} is -not only the name of the pair of page styles, but also the name of the main -page style of that pair, while \PValue{plain.}\PName{name} is the name of the -\PageStyle{plain} page style of this pair. - -If the optional argument \PName{parent pair} is given, the settings of the -pair of page styles with that name are the initial settings of the new pair of -page styles. So the new pair inherits the configuration of the \PName{parent - pair}. - -Reading \autoref{sec:scrlayer-scrpage.predefined.pagestyles} might have -created the impression that the described commands are related to -\PageStyle{scrheadings} and \PageStyle{plain.scrheadings} only. However, if -there exist more pairs of page styles, these commands are related to the pair -that has been activated last. In fact, this is the case for \DescRef{scrlayer-scrpage.cmd.lehead}, -\DescRef{scrlayer-scrpage.cmd.cehead}, \DescRef{scrlayer-scrpage.cmd.rehead}, \DescRef{scrlayer-scrpage.cmd.lohead}, \DescRef{scrlayer-scrpage.cmd.cohead}, -\DescRef{scrlayer-scrpage.cmd.rohead}, \DescRef{scrlayer-scrpage.cmd.lefoot}, \DescRef{scrlayer-scrpage.cmd.cefoot}, \DescRef{scrlayer-scrpage.cmd.refoot}, -\DescRef{scrlayer-scrpage.cmd.lofoot}, \DescRef{scrlayer-scrpage.cmd.cofoot}, \DescRef{scrlayer-scrpage.cmd.rofoot}, \DescRef{scrlayer-scrpage.cmd.ihead}, \DescRef{scrlayer-scrpage.cmd.chead}, -\DescRef{scrlayer-scrpage.cmd.ohead}, \DescRef{scrlayer-scrpage.cmd.ifoot}, \DescRef{scrlayer-scrpage.cmd.cfoot}, and \DescRef{scrlayer-scrpage.cmd.ofoot} of -\autoref{sec:scrlayer-scrpage.predefined.pagestyles}. - -All those commands and the below described commands -\DescRef{\LabelBase.cmd.clearmainofpairofpagestyles}, \DescRef{\LabelBase.cmd.clearplainofpairofpagestyles}, and -\DescRef{\LabelBase.cmd.clearpairofpagestyles} are also designed to be used inside the argument -\PName{definition}. In that case, they are a kind of default configuration of -the pair of page styles that is executed each time the pair will be -activated. A pair of page styles is activated, if one of the page styles of -the pair will be activated, which is mostly done by using +You can use these commands to define pairs of page styles similar to +\PageStyle{scrheadings} and \PageStyle{plain.scrheadings}, where \PName{name} +is the name of the main page style corresponding to \PageStyle{scrheadings}. +The name of the equivalent \PageStyle{plain} page style will be prefixed by +\PValue{plain.} automatically. So \PName{name} is not only the name of the +pair of page styles, but also the name of the main page style of that pair, +while \PValue{plain.}\PName{name} is the name of the \PageStyle{plain} page +style of this pair. + +If you provide the optional \PName{parent pair} argument, this is the name of +a page-style pair whose settings are used to initialise the new page-style +pair. So the new pair inherits the configuration of the \PName{parent pair}. + +Although \autoref{sec:scrlayer-scrpage.predefined.pagestyles} might have +created the impression that the commands described there apply only to +\PageStyle{scrheadings} and \PageStyle{plain.scrheadings} only, this is true +only so long as those two page styles are the only defined page-style pair. As +soon as there are multiple page-style pairs, +\DescRef{scrlayer-scrpage.cmd.lehead}, \DescRef{scrlayer-scrpage.cmd.cehead}, +\DescRef{scrlayer-scrpage.cmd.rehead}, \DescRef{scrlayer-scrpage.cmd.lohead}, +\DescRef{scrlayer-scrpage.cmd.cohead}, \DescRef{scrlayer-scrpage.cmd.rohead}, +\DescRef{scrlayer-scrpage.cmd.lefoot}, \DescRef{scrlayer-scrpage.cmd.cefoot}, +\DescRef{scrlayer-scrpage.cmd.refoot}, \DescRef{scrlayer-scrpage.cmd.lofoot}, +\DescRef{scrlayer-scrpage.cmd.cofoot}, \DescRef{scrlayer-scrpage.cmd.rofoot}, +\DescRef{scrlayer-scrpage.cmd.ihead}, \DescRef{scrlayer-scrpage.cmd.chead}, +\DescRef{scrlayer-scrpage.cmd.ohead}, \DescRef{scrlayer-scrpage.cmd.ifoot}, +\DescRef{scrlayer-scrpage.cmd.cfoot}, and \DescRef{scrlayer-scrpage.cmd.ofoot} +all refer to page-style pair that was most recently activated. + +In addition to those eighteen commands mentioned above, the three commands +described below, \DescRef{\LabelBase.cmd.clearmainofpairofpagestyles}, +\DescRef{\LabelBase.cmd.clearplainofpairofpagestyles}, and +\DescRef{\LabelBase.cmd.clearpairofpagestyles}, are designed to be used inside +the \PName{definition} argument. In this case, they represent a kind of +default configuration of the page-style pair that is executed each time the +pair is activated. You activate a page-style pair by activating either one two +page styles in the pair. Typically, you do so with \DescRef{maincls.cmd.pagestyle}\IndexCmd{pagestyle}. -Please note that the commands of -\autoref{sec:scrlayer-scrpage.pagestyle.content} are for general -purpose. Therefore, they are related to every page style that has been defined -using \Package{scrlayer-scrpage}. - -Whereas \Macro{defpairofpagestyles} will define a pair no matter if the -corresponding page styles are already defined, \Macro{newpairofpagestyles} and -\Macro{providepairofpagestyles} will define the pair only, if the page styles -are currently undefined. If at least one of the page styles is already -defined, the new definition of \Macro{providepairofpagestyles} will be -ignored, but usage of \Macro{newpairofpagestyles} would result in an error -message. To redefine already existing pairs of page styles you may use -\Macro{renewpairofpagestyles}. With this an error would be thrown, if at least -one of the page styles of the pair does not already exist.% +Note that the commands of \autoref{sec:scrlayer-scrpage.pagestyle.content} on +\autopageref{sec:scrlayer-scrpage.pagestyle.content} are general in nature and +apply to all page styles defined with \Package{scrlayer-scrpage}. + +Although \Macro{defpairofpagestyles} defines a page-style pair regardless of +whether the corresponding page styles already exist, +\Macro{newpairofpagestyles} and \Macro{providepairofpagestyles} do so only if +the page styles are currently undefined. If at least one of the page styles is +already defined, the new definition of \Macro{providepairofpagestyles} will be +ignored, whereas using \Macro{newpairofpagestyles} results in an error +message. To redefine existing page-style pairs, you can use +\Macro{renewpairofpagestyles}. With this an is thrown if either one of the two +page styles of the pair does not already exist.% \EndIndexGroup @@ -153,333 +160,52 @@ one of the page styles of the pair does not already exist.% \Macro{clearplainofpairofpagestyles}% \Macro{clearpairofpagestyles} \end{Declaration} -Command \Macro{clearmainofpairofpagestyles} will configure the main page style -of the lastly activated pair of page styles to be empty. In contrast to this -\Macro{clearplainofpairofpagestyles} will configure the \PageStyle{plain} page -style of the lastly activated pair of page styles to be empty. Last but not -least \Macro{clearpairofpagestyle} will configure both page styles of the -lastly activated pair of page styles to be empty. - -But please note\textnote{Attention!} that none of these commands will remove -the definitions of argument \PName{definition} that has been used when -defining the pair of page styles (see above). So if you activate the pair of -page styles again, those definitions will be used again! - -These commands may be used inside of \PName{definition} themselves. But you -may use them outside the definition of a pair of page styles too. In this case -they are related to the lastly activated pair of page styles. - -\BeginIndex{Cmd}{clearscrheadings}% -\BeginIndex{Cmd}{clearscrplain}% -\BeginIndex{Cmd}{clearscrheadfoot}% -The commands \Macro{clearscrheadings}, \Macro{clearscrplain}, and -\Macro{clearscrheadfoot} are aliases for these commands provided only for -compatibility with \Package{scrpage2}. Nevertheless, they are deprecated and -should not be used.% -% +The \Macro{clearmainofpairofpagestyles} command sets the main page style of +the most recently activated page-style pair to be empty. In contrast, the +\Macro{clearplainofpairofpagestyles} command sets the \PageStyle{plain} page +style of the active page-style pair to be empty. Finally, +\Macro{clearpairofpagestyle} sets both page styles of the activate pair to be +empty. + +But note\textnote{Attention!} that none of these commands removes the +definitions of the \PName{definition} argument that was specified when +defining the page-style pair (see above). So if you activate the pair of page +styles again, those definitions will be used again! + +You can use these commands inside the \PName{definition} of the page-style +pair explained above. But you can also use them outside this definition. In +this case, they refer to the most recently activated page-style pair.% \EndIndexGroup -\section{Definition of Simple Page Styles with Three Parts in Head and Foot } -\seclabel{pagestyle.triple} - -Beside predefined page styles and the definition of new pairs of page styles, -package \Package{scrlayer-scrpage} also provides the definition of page styles -with three parts in head and foot. But this user interface exists for -compatibility with \Package{scrpage2} only. However, it has been extended -beyond the functionality of \Package{scrpage2} to provide a more consistent -set of commands. Nevertheless, for new documents it is recommended to instead -use the advanced features described in the previous section. - -\begin{Declaration} - \Macro{deftriplepagestyle}\Parameter{name of the page style}% - \OParameter{thickness of the outer line}% - \OParameter{thickness of the inner line}% - \Parameter{inner head element}% - \Parameter{centre head element}% - \Parameter{outer head element}% - \Parameter{inner foot element}% - \Parameter{centre foot element}% - \Parameter{outer foot element}% - \Macro{newtriplepagestyle}\Parameter{name of the page style}% - \OParameter{thickness of the outer linen}% - \OParameter{thickness of the inner linen}% - \Parameter{inner head element}% - \Parameter{centre head element}% - \Parameter{outer head element}% - \Parameter{inner foot element}% - \Parameter{centre foot element}% - \Parameter{outer foot element}% - \Macro{renewtriplepagestyle}\Parameter{name of the page style}% - \OParameter{thickness of the outer line}% - \OParameter{thickness of the inner line}% - \Parameter{inner head element}% - \Parameter{centre head element}% - \Parameter{outer head element}% - \Parameter{inner foot element}% - \Parameter{centre foot element}% - \Parameter{outer foot element}% - \Macro{providetriplepagestyle}\Parameter{name of the page style}% - \OParameter{thickness of the outer line}% - \OParameter{thickness of the inner line}% - \Parameter{inner head element}% - \Parameter{centre head element}% - \Parameter{outer head element}% - \Parameter{inner foot element}% - \Parameter{centre foot element}% - \Parameter{outer foot element} -\end{Declaration} -With these commands you can define a single page style, whose head and foot -are parted into three elements: an inner element, a centre element, and an -outer element. The contents of the elements are stated via three mandatory -arguments for the head and three mandatory arguments for the foot. - -Each of the two inner elements will be printed right aligned on left pages and -left aligned on right pages. The centre elements will be printed centred in -the head respectively foot of left and right pages. Each of the two outer -elements will be printed left aligned on left pages and right aligned on right -pages. - -Please note once again:\textnote{Attention!} There are only right pages in -single side layout! - -The two optional arguments can be used to activate horizontal lines in the -head and foot of the page style. To do so, you put the wanted thickness of the -line as an optional argument. The first optional argument is the -\PName{thickness of the outer line} in both, the page head and footer. In the -page head it will be printed above the head contents. In the page footer it -will be printed below the foot contents. The second optional argument is the -\PName{thickness of the inner line}. This will be printed below the page head -and additionally above the page footer. If you have only one optional -argument, this is the \PName{thickness of the inner line}. In this case no -outer line will be printed. And if you omit both optional arguments, both -lines will be omitted. - -Please note\textnote{Attention!}, an empty optional argument is not the same -like omitting the optional argument! Empty optional arguments are not allowed -in this case. But you may use simple dimension expressions as explained for -\KOMAScript{} option \DescRef{scrlayer-scrpage.option.headwidth} (see -\autoref{sec:scrlayer-scrpage.pagestyle.content}, -\DescPageRef{scrlayer-scrpage.option.headwidth}) for the optional -arguments. - -\hyperref[fig:scrlayer-scrpage.triplepagestyle]% -{Figure~\ref*{fig:scrlayer-scrpage.triplepagestyle}} shows a sketch for the -interpretation of the arguments on a schematic double page. Thereby -``\texttt{outer}'', ``\texttt{inner}'', and ``\texttt{centre}'' are example -contents. The corresponding arrows illustrate the expansion of those -contents. The \iffree{coloured }{}texts inside the pages are only the names of -the arguments of these commands. The related arrows \iffree{in the same colour -}{} point to the corresponding elements of the page. - -\begin{figure} - \centering - \begin{picture}(\textwidth,80mm) - \put(0,50mm){% - %\ - \begin{picture}(\textwidth,30mm)(0,-10mm) - \thinlines - \small - % linke Seite - \put(0,20mm){\line(1,0){.49\textwidth}}% - \put(0,0){\line(0,1){20mm}}% - \multiput(0,0)(0,-1mm){10}{\line(0,-1){.5mm}}% - \put(.49\textwidth,5mm){\line(0,1){15mm}}% - \put(.05\textwidth,15mm){\thicklines\line(1,0){.415\textwidth}}% - \put(.05\textwidth,10mm){\makebox(0em,5mm)[l]{\slshape outer\strut$\longrightarrow$}}% - \put(.465\textwidth,10mm){\makebox(0em,5mm)[r]{\slshape $\longleftarrow$inner\strut}}% - \put(.2575\textwidth,10mm){\makebox(0em,5mm)[c]{\slshape $\longleftarrow$centre\strut$\longrightarrow$}}% - \put(.05\textwidth,10mm){\thicklines\line(1,0){.415\textwidth}}% - % rechte Seite - \put(0.51\textwidth,20mm){\line(1,0){.49\textwidth}}% - \put(0.51\textwidth,5mm){\line(0,1){15mm}}% - \multiput(\textwidth,0)(0,-1mm){10}{\line(0,-1){.5mm}}% - \put(\textwidth,0mm){\line(0,1){20mm}}% - \put(.535\textwidth,15mm){\thicklines\line(1,0){.415\textwidth}}% - \put(.535\textwidth,10mm){\makebox(0em,5mm)[l]{\slshape inner\strut$\longrightarrow$}}% - \put(.95\textwidth,10mm){\makebox(0em,5mm)[r]{\slshape $\longleftarrow$outer\strut}}% - \put(.7425\textwidth,10mm){\makebox(0em,5mm)[c]{\slshape $\longleftarrow$centre\strut$\longrightarrow$}}% - \put(.535\textwidth,10mm){\thicklines\line(1,0){.415\textwidth}}% - % commands for both pages - \iffree{\color{red}}{}% - \put(.5\textwidth,0){\makebox(0,\baselineskip)[c]{\PName{inner head element}}}% - \put(.5\textwidth,-5mm){\makebox(0,\baselineskip)[c]{\PName{centre - head element}}}% - \put(.5\textwidth,-10mm){\makebox(0,\baselineskip)[c]{\PName{outer - head element}}}% - \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% - \put(-1.5em,.5\baselineskip){\vector(0,1){7mm}}% - \put(-3.5em,-1\baselineskip){\line(-1,0){\dimexpr .25\textwidth-6.5em\relax}}% - \put(-\dimexpr - .25\textwidth-3em\relax,-1\baselineskip){\vector(0,1){\dimexpr - 7mm+1.5\baselineskip\relax}} - \put(-3.25em,-2.25\baselineskip){\line(-1,0){\dimexpr .45\textwidth-8em\relax}}% - \put(-\dimexpr - .45\textwidth-4.75em\relax,-2.25\baselineskip){\vector(0,1){\dimexpr - 7mm+2.75\baselineskip\relax}} - }% - \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% - \put(1.5em,.5\baselineskip){\vector(0,1){7mm}}% - \put(3.5em,-1\baselineskip){\line(1,0){\dimexpr .25\textwidth-6.5em\relax}} - \put(\dimexpr - .25\textwidth-3em\relax,-1\baselineskip){\vector(0,1){\dimexpr - 7mm+1.5\baselineskip\relax}} - \put(3.25em,-2.25\baselineskip){\line(1,0){\dimexpr .45\textwidth-8em\relax}} - \put(\dimexpr - .45\textwidth-4.75em\relax,-2.25\baselineskip){\vector(0,1){\dimexpr - 7mm+2.75\baselineskip\relax}} - }% - \end{picture} - % - }% - \put(0,0){% - \begin{picture}(\textwidth,30mm) - \thinlines - \small - % linke Seite - \put(0,0){\line(1,0){.49\textwidth}}% - \put(0,0){\line(0,1){20mm}}% - \multiput(0,20mm)(0,1mm){10}{\line(0,1){.5mm}}% - \put(.49\textwidth,0){\line(0,1){15mm}}% - \put(.05\textwidth,15mm){\thicklines\line(1,0){.415\textwidth}}% - \put(.05\textwidth,10mm){\makebox(0em,5mm)[l]{\slshape outer\strut$\longrightarrow$}}% - \put(.465\textwidth,10mm){\makebox(0em,5mm)[r]{\slshape $\longleftarrow$inner\strut}}% - \put(.2575\textwidth,10mm){\makebox(0em,5mm)[c]{\slshape $\longleftarrow$centre\strut$\longrightarrow$}}% - \put(.05\textwidth,10mm){\thicklines\line(1,0){.415\textwidth}}% - % rechte Seite - \put(.51\textwidth,0){\line(1,0){.49\textwidth}}% - \put(.51\textwidth,0){\line(0,1){15mm}}% - \put(\textwidth,0){\line(0,1){20mm}}% - \multiput(\textwidth,20mm)(0,1mm){10}{\line(0,1){.5mm}}% - \put(.535\textwidth,15mm){\thicklines\line(1,0){.415\textwidth}}% - \put(.535\textwidth,10mm){\makebox(0em,5mm)[l]{\slshape inner\strut$\longrightarrow$}}% - \put(.95\textwidth,10mm){\makebox(0em,5mm)[r]{\slshape $\longleftarrow$outer\strut}}% - \put(.7425\textwidth,10mm){\makebox(0em,5mm)[c]{\slshape $\longleftarrow$centre\strut$\longrightarrow$}}% - \put(.535\textwidth,10mm){\thicklines\line(1,0){.415\textwidth}}% - % commands for both pages - \iffree{\color{red}}{}% - \put(.5\textwidth,20mm){\makebox(0,\baselineskip)[c]{\PName{inner foot - element}}}% - \put(.5\textwidth,25mm){\makebox(0,\baselineskip)[c]{\PName{centre - foot element}}}% - \put(.5\textwidth,30mm){\makebox(0,\baselineskip)[c]{\PName{outer foot - element}}}% - \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% - \put(-1.5em,\dimexpr 20mm-.5\baselineskip\relax){\vector(0,-1){6mm}}% - \put(-3.5em,25mm){\line(-1,0){\dimexpr .25\textwidth-6.5em\relax}}% - \put(-\dimexpr .25\textwidth-3em\relax,25mm){\vector(0,-1){\dimexpr - .5\baselineskip + 11mm\relax}}% - \put(-3em,30mm){\line(-1,0){\dimexpr .45\textwidth-7.5em\relax}}% - \put(-\dimexpr .45\textwidth-4.5em\relax,30mm){\vector(0,-1){\dimexpr - .5\baselineskip + 16mm\relax}}% - }% - \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% - \put(1.5em,\dimexpr 20mm-.5\baselineskip\relax){\vector(0,-1){6mm}}% - \put(3.5em,25mm){\line(1,0){\dimexpr .25\textwidth-6.5em\relax}}% - \put(\dimexpr .25\textwidth-3em\relax,25mm){\vector(0,-1){\dimexpr - .5\baselineskip + 11mm\relax}}% - \put(3em,30mm){\line(1,0){\dimexpr .45\textwidth-7.5em\relax}}% - \put(\dimexpr .45\textwidth-4.5em\relax,30mm){\vector(0,-1){\dimexpr - .5\baselineskip + 16mm\relax}}% - }% - \end{picture} - }% - \thinlines\small\iffree{\color{blue}}{}% - \put(0.055\textwidth,45mm){\vector(0,1){25mm}}% - \put(0.945\textwidth,45mm){\vector(0,1){25mm}}% - \put(0.055\textwidth,45mm){\vector(0,-1){30mm}}% - \put(0.945\textwidth,45mm){\vector(0,-1){30mm}}% - \put(0.055\textwidth,45mm){\line(1,0){\dimexpr - .445\textwidth-7.5em\relax}}% - \put(0.945\textwidth,45mm){\line(-1,0){\dimexpr - .445\textwidth-7.5em\relax}}% - \put(0.5\textwidth,45mm){\makebox(0,0)[c]{\PName{thickness of the inner lines}}}% - \iffree{\color{green}}{}% - \put(0.025\textwidth,40mm){\line(0,1){35mm}}% - \put(0.025\textwidth,75mm){\vector(1,0){3.75mm}}% - \put(0.975\textwidth,40mm){\line(0,1){35mm}}% - \put(0.975\textwidth,40mm){\line(0,1){35mm}}% - \put(0.975\textwidth,75mm){\vector(-1,0){3.75mm}}% - \put(0.025\textwidth,40mm){\line(0,-1){30mm}}% - \put(0.025\textwidth,10mm){\vector(1,0){3.75mm}}% - \put(0.975\textwidth,40mm){\line(0,-1){30mm}}% - \put(0.975\textwidth,40mm){\line(0,-1){30mm}}% - \put(0.975\textwidth,10mm){\vector(-1,0){3.75mm}}% - \put(0.025\textwidth,40mm){\line(1,0){\dimexpr - .475\textwidth-7.5em\relax}}% - \put(0.975\textwidth,40mm){\line(-1,0){\dimexpr - .475\textwidth-7.5em\relax}}% - \put(0.5\textwidth,40mm){\makebox(0,0)[c]{\PName{thickness of the outer lines}}}% - \end{picture} - \caption[{Elements of a three parts page style}]{Schematic double page with - the elements of a tripartite page style of commands - \Macro{deftriplepagestyle}, \Macro{newtriplepagestyle}, - \Macro{providetriplepagestyle}, and \Macro{renewtriplepagestyle}} - \label{fig:scrlayer-scrpage.triplepagestyle} -\end{figure} - -Using the described commands it is not possible to draw only a single line, -e.\,g., only below the page head but not above the page footer. If you need -to do so, please consult the previous or following section. - -The length of a single element\textnote{Attention!} is not limited by the -existence of a neighbour element. So in unfortunate circumstances it can -happen that one elements overwrites a neighbour element or even both of -them. The user himself is responsible to avoid such inappropriate usage. With -automatic running heads this could, e.\,g., be done using the optional -argument of the section commands. See the manual of the document class for -more information about those commands. - -Command \Macro{deftriplepagestyle} defines a page style independent from -whether or not a page style with the same \PName{name of the page style} -already exists. In difference to this \Macro{newtriplepagestyle} and -\Macro{providetriplepagestyle} define the page style only, if the \PName{name - of the page style} is not the name of an already defined page -style. Otherwise \Macro{providepagestyle} simply does nothing, but -\Macro{newtriplepagestyle} throws an error. Command -\Macro{renewtriplepagestyle} is something like the opposite of -\Macro{newtriplepagestyle}. It throws an error, if there has not been -a page style with the \PName{name of the page style} before, and defines the -page style only, if there has been already a page style with the given name. - -\BeginIndex{Cmd}{deftripstyle}% -The command \Macro{deftriplestyle} of \Package{scrpage2} corresponds to -\Macro{deftriplepagestyle}. Because of unification reasons it has been renamed -and should not be used with it's old name any longer. Using the old name would -result in a warning message. Nevertheless, the result would be the expected -one.% -\EndIndexGroup - - -\section{Definition of Complex Page Styles} +\section{Defining Complex Page Styles} \seclabel{pagestyle.experts} -Beside predefined page styles, the definition of new pairs of page styles and -the deprecated definition of page styles with tripartite head and foot, the -package \Package{scrlayer-scrpage} additionally provides basic features to -define new page styles. All already described page style definitions of -\Package{scrlayer-scrpage} use internally these basic features. Because of the -complexity of this user interface it is recommended for advanced users only. -As all most all imaginable use cases of page styles can handled using the -features described previous section, less advanced users may skip this -section. +In addition to the predefined page styles, \Package{scrlayer-scrpage} also +provides a more basic interface for defining new page styles. The page-style +definitions discussed so far use this interface internally, as do the obsolete +commands in \autoref{sec:\LabelBase.pagestyle.triple}. +\Package{scrlayer-scrpage}. Because of its complexity, however, only advanced +users should try to use it directly. Less experienced users can already +achieve almost everything possible with this low-level interface by using the +possibilities described previously. \begin{Declaration} \Macro{defpagestyle}% - \Parameter{name}\Parameter{head specification}\Parameter{foot specification}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% \Macro{newpagestyle}% - \Parameter{name}\Parameter{head specification}\Parameter{foot specification}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% \Macro{providepagestyle}% - \Parameter{name}\Parameter{head specification}\Parameter{foot specification}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% \Macro{renewpagestyle}% - \Parameter{name}\Parameter{head specification}\Parameter{foot specification}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% \end{Declaration} -These commands can be used to define a single page style with maximum -flexibility. Thereby \PName{name} is the name of the page style that should -be defined. +You can use these commands to define a single page style with maximum +flexibility, where \PName{name} is the name of the page style that you want to +define. -The arguments \PName{head specification} and \PName{foot specification} have -identical structure: +The parameters \PName{header specification} and \PName{footer specification} +have identical structure: \begin{quote}\raggedright \texttt{% (\PName{length of the line above},\PName{thickness of the line above})\%\\ @@ -489,89 +215,89 @@ identical structure: (\PName{length of the line below},\PName{thickness of the line below})% } \end{quote} -The arguments in the round brackets are options. This means, you may omit them +The arguments in the round brackets are optional. That is, you can omit them together with the brackets. In that case, the length and thickness of the -corresponding horizontal line would be given by the \KOMAScript{} options +corresponding horizontal rules are based on the \KOMAScript{} options \DescRef{scrlayer-scrpage.option.headtopline}, \DescRef{scrlayer-scrpage.option.headsepline}, -\DescRef{scrlayer-scrpage.option.footsepline} or +\DescRef{scrlayer-scrpage.option.footsepline}, and \DescRef{scrlayer-scrpage.option.footbotline} (see \autoref{sec:scrlayer-scrpage.pagestyle.content}, \DescPageRef{scrlayer-scrpage.option.headtopline}). -All three arguments in the curly brackets are mandatory. They hold arbitrary -content specifications depending on the page and the layout settings. But for -page styles with running heads usage of +All three arguments in curly brackets are mandatory and are used depending on +the page and the layout settings. Their content can be anything you want. For +page styles with running heads, however, you should use \DescRef{scrlayer-scrpage.cmd.headmark}, \DescRef{scrlayer-scrpage.cmd.leftmark}, or -\DescRef{scrlayer-scrpage.cmd.rightmark} is recommended inside the -specification. Section numbers or section headings must not be used in the -specifications. Due to the asynchronous page building of \LaTeX, using them -could result in wrong numbers or texts in the page header or footer. - -Command \Macro{defpagestyle} defines the page style no matter if a page style -with the same \PName{name} already exists. Command \Macro{newpagestyle} would -throw an error, if such a page style already exists. In contrast to this, -\Macro{providepagestyle} simple does nothing in such a case. In contrast to -\Macro{newpagestyle} command \Macro{renewpagestyle} throws an error, if a page -style with the \PName{name} does not already exist, and therefore may be used -to redefine an existing page style. - -All these commands are based on the command -\DescRef{scrlayer.cmd.DeclarePageStyleByLayers}\IndexCmd{DeclarePageStyleByLayers} of package -\Package{scrlayer}. \hyperref[tab:scrlayer-scrpage-experts.layersperstyle]{Table~\ref*{tab:scrlayer-scrpage-experts.layersperstyle}} -shows the layers that are defined for a page style \PName{name}. More -information about layers and layer page styles can be found starting on -\autopageref{cha:scrlayer} in \autoref{cha:scrlayer} of -\autoref{part:forExperts}.% +\DescRef{scrlayer-scrpage.cmd.rightmark} inside the specification. Under no +circumstances should you directly put the number or text of a sectioning +command here. Because of the \LaTeX{}'s asynchronous page construction, the +wrong numbers or text can appear in the header or footer if you do so. + +The \Macro{defpagestyle} command defines the page style regardless of whether +it already exists or not. In contrast, \Macro{newpagestyle} throws an error if +a page style of the same \PName{name} already exists. On the other hand, +\Macro{providepagestyle} simply ignores the definition if the \PName{name} has +already been used for a page style. Conversely, \Macro{renewpagestyle} can +only redefine an existing page style. For a new \PName{name}, it throws an +error. + +All four commands are based on the +\DescRef{scrlayer.cmd.DeclarePageStyleByLayers}% +\IndexCmd{DeclarePageStyleByLayers} command of the +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer} package. +You can find the layers that are defined for a page style \PName{name} in +\autoref{tab:scrlayer-scrpage-experts.layersperstyle}, and more information +about layers and layer-page in \autoref{cha:scrlayer}, starting on +\autopageref{cha:scrlayer}.% \begin{table} % \KOMAoptions{captions=topbeside} % \setcapindent{0pt} % \begin{captionbeside} \caption - [{The layers \Package{scrlayer-scrpage} defines to a page style}] - {The layers \Package{scrlayer-scrpage} defines to a page style - \PName{name}% - \label{tab:scrlayer-scrpage-experts.layersperstyle}} + [{The layers \Package{scrlayer-scrpage} defines for a page style}] + {The layers \Package{scrlayer-scrpage} defines for a \PName{name} page + style\label{tab:scrlayer-scrpage-experts.layersperstyle}} % [l] \begin{tabular}{ll} \toprule Name of the layer & Meaning of the layer \\ \midrule - \PName{Name}\PValue{.head.above.line} - & horizontal line above the page head\\ - \PName{Name}\PValue{.head.odd} - & page head of odd pages in two-side layout\\ - \PName{Name}\PValue{.head.even} - & page head of even pages in two-side layout\\ - \PName{Name}\PValue{.head.oneside} - & page head in single-side layout\\ - \PName{Name}\PValue{.head.below.line} - & horizontal line below the page head\\ - \PName{Name}\PValue{.foot.above.line} - & horizontal line above the page foot\\ - \PName{Name}\PValue{.foot.odd} - & page foot of odd pages in two-side layout\\ - \PName{Name}\PValue{.foot.even} - & page foot of even pages in two-side layout\\ - \PName{Name}\PValue{.foot.oneside} - & page foot in single-side layout\\ - \PName{Name}\PValue{.foot.below.line} - & horizontal line below the page foot\\ + \PName{name}\PValue{.head.above.line} + & horizontal line above the header\\ + \PName{name}\PValue{.head.odd} + & header of odd pages in two-sided printing\\ + \PName{name}\PValue{.head.even} + & header of even pages in two-sided printing\\ + \PName{name}\PValue{.head.oneside} + & header in one-sided printing\\ + \PName{name}\PValue{.head.below.line} + & horizontal line below the header\\ + \PName{name}\PValue{.foot.above.line} + & horizontal line above the footer\\ + \PName{name}\PValue{.foot.odd} + & footer of odd pages in two-sided printing\\ + \PName{name}\PValue{.foot.even} + & footer of even pages in two-sided printing\\ + \PName{name}\PValue{.foot.oneside} + & footer in one-sided printing\\ + \PName{name}\PValue{.foot.below.line} + & horizontal line below the footer\\ \bottomrule \end{tabular} % \end{captionbeside} \end{table} \begin{Example} - Assume you want to colour the whole background of page style - \PageStyle{scrheadings}' head. Because you read the introduction to - this chapter, you know, that \PageStyle{scrheadings} last but not least is a - layer page style with, e.\,g., layers \PValue{scrheadings.head.even}, - \PValue{scrheadings.head.odd}, and \PValue{scrheadings.head.oneside}. So you - define three more layers for the backgrounds and add them at the very - beginning of the page style: + Suppose you want to set a background colour for the header of the + \PageStyle{scrheadings} page style. From the introduction to this chapter + and \autoref{tab:scrlayer-scrpage-experts.layersperstyle}, you know that + \PageStyle{scrheadings} is a layer page style that includes the layers + \PValue{scrheadings.head.even}, \PValue{scrheadings.head.odd}, and + \PValue{scrheadings.head.oneside}. You now define three more layers for + their backgrounds and add them at the beginning of the page style: \begin{lstcode} \documentclass{scrartcl} \usepackage[automark]{scrlayer-scrpage} @@ -602,13 +328,13 @@ information about layers and layer page styles can be found starting on \blinddocument \end{document} \end{lstcode} - As you can see, the example uses three layers, so the position and size of - that background layers may simply be copied from the corresponding head - layer using option \Option{clone}. This is much easier than using only one - background layer and dynamically calculate the position time by time. + As you can see, the example uses three layers so that the position and size + of the background layers could simply be copied from the corresponding + header layer using the \Option{clone} option. This is easier than using only + one background layer and dynamically calculating its position each time. - In this example the coloured background is printed using a \Macro{rule} - command. The size arguments of this \Macro{rule} are given by + The coloured background itself was created using a \Macro{rule} command. The + size arguments of this \Macro{rule} are given by \DescRef{scrlayer.cmd.layerwidth} and \DescRef{scrlayer.cmd.layerheight} which contain the current width and height of the layer itself. The optional argument of \Macro{rule} is used to move the rule down by the height of a @@ -617,27 +343,44 @@ information about layers and layer page styles can be found starting on % Instead of using new layers to colour the background in the example above, \Macro{colorbox} and \DescRef{scrlayer-scrpage.cmd.chead} could have been -used. It is recommended to build such a solution as an exercise. Another -approach could be to add the background layers one by one and just before the -contents layers. You may do this as an exercise too.% +used. You can work out a solution using this method as an exercise. Likewise, +you could have added the background layers individually just before the +corresponding content layer. You can implement this as an exercise too.% \EndIndexGroup +\section{Defining Simple Page Styles with a Tripartite Header and Footer} +\seclabel{pagestyle.triple} + +\LoadNonFree{scrlayer-scrpage-experts}{1} + +\section{Legacy Features of \Package{scrpage2}} +\seclabel{obsolete} + +\begin{Explain} + The \Package{scrlayer-scrpage} package contains some legacy features that + derive from \Package{scrpage2} and exist only to be as compatible as possible + with that package. Users only need to understand these features if they want + to edit an old document based on \Package{scrpage2}. You\textnote{Attention!} + should not use the items documented here in new documents! +\end{Explain} \begin{Declaration} \KOption{hmode}\PValue{simple switch} \end{Declaration} -Package \Package{scrpage2} outputs page heads and page foots in horizontal -mode always. In opposite to this \Package{scrlayer-scrpage} does not switch -into horizontal mode itself, but the output of horizontal material will do -so. Nevertheless, you can activate option \Option{hmode} gain compatibility to -\Package{scrpage2} in this -aspect. But this would have side effects, i.\,e., white -spaces at the start of the output or the vertical alignment of the output. - -The options allows for the standard values for simple switches that are given -at \autoref{tab:truefalseswitch} on \autopageref{tab:truefalseswitch}. The -option is deactivated by default.% +The \Package{scrpage2} package always outputs headers and footers in +horizontal mode. In contrast, \Package{scrlayer-scrpage} in the default +setting only switches into horizontal mode when horizontal material is output. +However, if you activate the \Option{hmode} option, \Package{scrlayer-scrpage} +will behave like \Package{scrpage2} and switch to horizontal mode before any +output. This can affect both the processing of white space at the beginning of +the output and vertical alignment. + +The options recognizes the standard values for simple switches listed in +\autoref{tab:truefalseswitch} on \autopageref{tab:truefalseswitch}. The option +is deactivated by default.% \EndIndexGroup + +\LoadNonFree{scrlayer-scrpage-experts}{0} % \EndIndexGroup |