diff options
author | Karl Berry <karl@freefriends.org> | 2017-05-06 21:41:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-05-06 21:41:21 +0000 |
commit | 734c91dfac1697d69bdd509c8bc7a97750c78f96 (patch) | |
tree | 95919a908b9926e3a313d7b307b125a89fe9d18f /Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx | |
parent | c2e79031dc84ba98da9a7e985b4cd94eff21d8cf (diff) |
koma-script (6may17)
git-svn-id: svn://tug.org/texlive/trunk@44226 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx | 70 |
1 files changed, 61 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx index 2f6d155274b..1bd204e57a3 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx @@ -1,4 +1,4 @@ -% \CheckSum{1607} +% \CheckSum{1661} % \iffalse^^A meta-comment % ====================================================================== % scrlayer-notecolumn.dtx @@ -57,17 +57,17 @@ % Right brace \} Tilde \~} % % \iffalse^^A meta-comment -%<identify>%%% From File: $Id: scrlayer-notecolumn.dtx 2483 2016-06-28 07:36:58Z kohm $ (identify) -%<init>%%% From File: $Id: scrlayer-notecolumn.dtx 2483 2016-06-28 07:36:58Z kohm $ (init) -%<options>%%% From File: $Id: scrlayer-notecolumn.dtx 2483 2016-06-28 07:36:58Z kohm $ (options) -%<body>%%% From File: $Id: scrlayer-notecolumn.dtx 2483 2016-06-28 07:36:58Z kohm $ (body) +%<identify>%%% From File: $Id: scrlayer-notecolumn.dtx 2583 2017-02-08 19:39:06Z kohm $ (identify) +%<init>%%% From File: $Id: scrlayer-notecolumn.dtx 2583 2017-02-08 19:39:06Z kohm $ (init) +%<options>%%% From File: $Id: scrlayer-notecolumn.dtx 2583 2017-02-08 19:39:06Z kohm $ (options) +%<body>%%% From File: $Id: scrlayer-notecolumn.dtx 2583 2017-02-08 19:39:06Z kohm $ (body) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2016-06-28 09:36:58 +0200 (Tue, 28 Jun 2016) $ + \filedate$Date: 2017-02-08 20:39:06 +0100 (Wed, 08 Feb 2017) $ \def\filerevision$#1: #2 ${\gdef\filerevision{v0.1.#2}} - \filerevision$Revision: 2483 $ + \filerevision$Revision: 2583 $ \endgroup \ProvidesFile{scrlayer-notecolumn.dtx}[\filedate\space\filerevision\space %</dtx> @@ -767,17 +767,32 @@ % to use \Macro{protect} if a macro shouldn't be expanded while writing or % may break while writing. % \end{description} +% There is a star variant with the same parameters, that writes the +% \meta{code} un-expanded. To do so, we need some internal commands. +% \begin{macro}{\slnc@unexpanded} +% \changes{0.1.2583}{2017/02/08}{new (internal)}^^A +% \begin{macro}{\slnc@makenote} +% \changes{0.1.2583}{2017/02/08}{new (internal)}^^A % \begin{macrocode} %<*body> +\scrlayerAddToInterface\slnc@unexpanded{% + \let\slnc@unexpanded\detokenize +} \scrlayerAddToInterface\makenote{% - \newcommand{\makenote}[2][marginpar]{% + \newcommand*{\makenote}{% + \kernel@ifstar{\let\slnc@unexpanded\detokenize\slnc@makenote}% + {\let\slnc@unexpanded\@firstofone\slnc@makenote}% + }% +} +\scrlayerAddToInterface\slnc@makenote{% + \newcommand{\slnc@makenote}[2][marginpar]{% \@bsphack \scr@savepos \addtocontents{slnc}{% \string\slnc@note{#1}% {\noexpand\number\value{slncpage}}% {\noexpand\number\scr@lastypos}% - {#2}% + {\slnc@unexpanded{#2}}% }% \@esphack }% @@ -798,6 +813,8 @@ %</body> % \end{macrocode} %^^A \end{counter}^^A slncpage +% \end{macro}^^A \slnc@unexpanded +% \end{macro}^^A \slnc@makenote % \end{macro}^^A \makenote % % \begin{macro}{\slnc@processnotes} @@ -924,6 +941,11 @@ \expandafter\unvbox\csname slnc@#1@box\endcsname \ifdim\@tempdima>\z@ \kern\@tempdima\fi \fi +% \end{macrocode} +% \changes{v0.1.2582}{2017/02/08}{restore several commands}^^A +% Some commands have to be restored when processing the note. +% \begin{macrocode} + \slnc@restoreinnote \strut\ignorespaces ##4\par }% }% @@ -997,6 +1019,36 @@ } } % \end{macrocode} +% \begin{macro}{\restoreinnote} +% \changes{0.1.2582}{2017/02/08}{new command}^^A +% \begin{macro}{\slnc@restoreinnote} +% \changes{0.1.2582}{2017/02/08}{new (internal)}^^A +% Some commands have to be restored while processing the notes. By default +% these are \cs{label}, \cs{index}, \cs{glossary}. More can be added using +% \cs{restoreinnote}. The storage is \cs{slnc@restoreinnote}. +% \begin{macrocode} +\scrlayerAddToInterface\slnc@restoreinnote{% + \let\slnc@restoreinnote\@empty +} +\scrlayerAddToInterface\restoreinnote{% + \newcommand*\restoreinnote[1]{% + \AtBeginDocument{% + \expandafter\scrlayerAddCsToInterface[scrlayer-notecolumn.sty]{slnc\string#1}{% + \expandafter\let\csname slnc\string#1\endcsname#1% + \g@addto@macro\slnc@restoreinnote{% + \expandafter\let\expandafter#1\csname slnc\string#1\endcsname + }% + }% + }% + }% + \@onlypreamble\restoreinnote + \restoreinnote\label + \restoreinnote\index + \restoreinnote\glossary +} +% \end{macrocode} +% \end{macro}^^A \slnc@restoreinnote +% \end{macro}^^A \restoreinnote % \begin{macro}{\slnc@readnotes} % Read as long notes from the notes file until the number at \#2 of % \Macro{slnc@note} or \Macro{slnc@sync} in the file is greater than |