diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlayer.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/scrlayer.dtx | 162 |
1 files changed, 149 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx index c08a1c3a156..5dc549a871e 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer.dtx @@ -1,8 +1,8 @@ -% \CheckSum{3321} +% \CheckSum{3474} % \iffalse^^A meta-comment % ====================================================================== % scrlayer.dtx -% Copyright (c) Markus Kohm, 2012-2014 +% Copyright (c) Markus Kohm, 2012-2015 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -20,7 +20,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrlayer.dtx -% Copyright (c) Markus Kohm, 2012-2014 +% Copyright (c) Markus Kohm, 2012-2015 % % Diese Datei ist Teil der LaTeX2e KOMA-Script-Sammlung. % @@ -57,18 +57,18 @@ % Right brace \} Tilde \~} % % \iffalse^^A meta-comment -%<identify>%%% From File: $Id: scrlayer.dtx 1895 2014-12-28 14:13:29Z kohm $ (identify) -%<init>%%% From File: $Id: scrlayer.dtx 1895 2014-12-28 14:13:29Z kohm $ (init) -%<options>%%% From File: $Id: scrlayer.dtx 1895 2014-12-28 14:13:29Z kohm $ (options) -%<body>%%% From File: $Id: scrlayer.dtx 1895 2014-12-28 14:13:29Z kohm $ (body) -%<final>%%% From File: $Id: scrlayer.dtx 1895 2014-12-28 14:13:29Z kohm $ (final) +%<identify>%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (identify) +%<init>%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (init) +%<options>%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (options) +%<body>%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (body) +%<final>%%% From File: $Id: scrlayer.dtx 1912 2015-01-26 20:11:06Z kohm $ (final) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2014-12-28 15:13:29 +0100 (Sun, 28 Dec 2014) $ + \filedate$Date: 2015-01-26 21:11:06 +0100 (Mon, 26 Jan 2015) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 1895 $ + \filerevision$Revision: 1912 $ \endgroup \ProvidesFile{scrlayer.dtx}[\filedate\space\filerevision\space %</dtx> @@ -414,6 +414,43 @@ % \end{macro}^^A \MakeMarkcase % \end{option}^^A markcase % +% \begin{macro}{\rightfirstmark} +% \changes{v3.16}{2015/01/14}{new} +% \begin{macro}{\rightbotmark} +% \changes{v3.16}{2015/01/14}{new} +% \begin{macro}{\righttopmark} +% \changes{v3.16}{2015/01/14}{new} +% \Macro{rightfirstmark} is simply the same like the \Macro{rightmark} of the +% \LaTeX{} kernel. \Macro{rightbotmark} uses \Macro{botmark} instead of +% \Macro{firstmark} and \Macro{righttopmark} uses \Macro{topmark}. +% \begin{macrocode} +%<*package&body> +\newcommand*{\rightfirstmark}{\expandafter\@rightmark\firstmark\@empty\@empty} +\newcommand*{\rightbotmark}{\expandafter\@rightmark\botmark\@empty\@empty} +\newcommand*{\righttopmark}{\expandafter\@rightmark\topmark\@empty\@empty} +% \end{macrocode} +% \end{macro}^^A \righttopmark +% \end{macro}^^A \rightbotmark +% \end{macro}^^A \rightfirstmark +% +% \begin{macro}{\leftfirstmark} +% \changes{v3.16}{2015/01/14}{new} +% \begin{macro}{\leftbotmark} +% \changes{v3.16}{2015/01/14}{new} +% \begin{macro}{\lefttopmark} +% \changes{v3.16}{2015/01/14}{new} +% \Macro{leftbotmark} is simply the same like the \Macro{leftmark} of the +% \LaTeX{} kernel. \Macro{leftfirstmark} uses \Macro{firstmark} instead of +% \Macro{botmark} and \Macro{lefttopmark} uses \Macro{topmark}. +% \begin{macrocode} +\newcommand*{\leftfirstmark}{\expandafter\@leftmark\firstmark\@empty\@empty} +\newcommand*{\leftbotmark}{\expandafter\@leftmark\botmark\@empty\@empty} +\newcommand*{\lefttopmark}{\expandafter\@leftmark\topmark\@empty\@empty} +%</package&body> +% \end{macrocode} +% \end{macro}^^A \lefttopmark +% \end{macro}^^A \leftbotmark +% \end{macro}^^A \leftfirstmark % % \begin{macro}{\headmark} % Inside a page style, this macro is either \Macro{rightmark} or @@ -1018,8 +1055,8 @@ % \end{macrocode} % \end{macro}^^A \def@scr@l@pos % -% There are basic attributes and compounding attributes. The basic attributes -% are: +% There are basic, primitive attributes and compounding attributes. The basic +% attributes are: % \begin{description} % \item[\texttt{hoffset=\meta{dimension expression}}:] offset from the left % edge of the paper. @@ -1173,6 +1210,81 @@ % \end{macrocode} % \end{description} % +% Attribute modifications are attributes, that modify existing basic +% attributes: +% There are basic, primitive attributes and compounding attributes. The basic +% attributes are: +% \begin{description} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addhoffset}}^^A +% \item[\texttt{addhoffset=\meta{dimension expression}}:] add to offset from +% the left edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addhoffset}{% + \expandafter\edef\csname scr@l@\scr@current@layer @x\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @x\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addvoffset}}^^A +% \item[\texttt{addvoffset=\meta{dimension expression}}:] add to offset from +% the top edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addvoffset}{% + \expandafter\edef\csname scr@l@\scr@current@layer @y\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @y\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addwidth}}^^A +% \item[\texttt{addwidth=\meta{dimension expression}}:] add to width of the +% layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addwidth}{% + \expandafter\edef\csname scr@l@\scr@current@layer @w\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @w\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addheight}}^^A +% \item[\texttt{addheight=\meta{dimension expression}}:] add to height of the +% layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addheight}{% + \expandafter\edef\csname scr@l@\scr@current@layer @h\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @h\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addcontents}}^^A +% \item[\texttt{addcontents=\meta{output}}:] append to whatever should be +% printed by the layer. +% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}}^^A +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addcontents}{% + \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @contents\endcsname #1}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{pretocontents}}^^A +% \item[\texttt{pretocontents=\meta{output}}:] prefix whatever should be +% printed by the layer. +% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}}^^A +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{pretocontents}{% + \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{% + \unexpanded{#1}\unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @contents\endcsname}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \end{description} +% % Compounding attributes are attributes, that set up several basic attributes % with a single compounding attribute: % \begin{description} @@ -1597,6 +1709,25 @@ % \end{macro}^^A \DeclareNewLayer % % +% \begin{macro}{\GetLayerContents} +% \changes{v3.16}{2015/01/26}{new} +% \begin{description} +% \item[\Parameter{string}:] the name of the layer +% \end{description} +% Get the contents of the given layer. +% \begin{macrocode} +%<*package&body> +\newcommand*{\GetLayerContents}[1]{% + \IfLayerExists{#1}{\@nameuse{scr@l@#1@contents}}{% + \PackageError{scrlayer}{unknown layer `#1'}{% + You can ask only for the contents of an existing layer.}% + }% +} +%</package&body> +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\DestroyLayer} % \begin{description} % \item[\Parameter{string}:] the name of the layer, that should be @@ -3267,7 +3398,10 @@ %<*package&body> \newcommand*{\currentpagestyle}{} \PackageInfo{scrlayer}{patching LaTeX kernel macro \string\pagestyle} -\def\reserved@a{\scrlayer@exec@before@pagestyle@hook{##1}} +\def\reserved@a{% + \iftoplevelpagestyle\edef\toplevelpagestyle{##1}\toplevelpagestylefalse\fi + \scrlayer@exec@before@pagestyle@hook{##1}% +} \expandafter\expandafter\expandafter\renewcommand \expandafter\expandafter\expandafter*% \expandafter\expandafter\expandafter\pagestyle @@ -3279,7 +3413,9 @@ \pagestyle{#1}% \edef\currentpagestyle{\GetRealPageStyle{#1}}% \scrlayer@exec@after@pagestyle@hook{#1}% + \toplevelpagestyletrue } +\newif\iftoplevelpagestyle\toplevelpagestyletrue \AtBeginDocument{% \begingroup \let\scrlayer@exec@before@pagestyle@hook\@gobble |