From ce1c001f7db86ff8f09c1203b965ed9f44531d7a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 8 May 2022 03:00:48 +0000 Subject: CTAN sync 202205080300 --- .../koma-script/source/scrlayer-notecolumn.dtx | 512 +++++++++------------ 1 file changed, 209 insertions(+), 303 deletions(-) (limited to 'macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx') diff --git a/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx b/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx index e169ac4772..ec55e285ee 100644 --- a/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx +++ b/macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx @@ -1,7 +1,7 @@ % \iffalse^^A meta-comment % ====================================================================== % scrlayer-notecolumn.dtx -% Copyright (c) Markus Kohm, 2013-2021 +% Copyright (c) Markus Kohm, 2013-2022 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,27 +18,8 @@ % % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- -% scrlayer-notecolumn.dtx -% Copyright (c) Markus Kohm, 2013-2021 -% -% Diese Datei ist Teil der LaTeX2e KOMA-Script-Sammlung. -% -% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, -% Version 1.3c. -% Die neuste Version dieser Lizenz ist -% http://www.latex-project.org/lppl.txt -% und Version 1.3c ist Teil aller Verteilungen von LaTeX -% Version 2005/12/01 und dieses Werks. -% -% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained" -% (allein durch den Autor verwaltet). -% -% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm. -% -% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien. % ====================================================================== -% -%%% From File: $Id: scrlayer-notecolumn.dtx 3601 2021-05-30 19:11:44Z kohm $ +%%% From File: $Id: scrlayer-notecolumn.dtx 3694 2022-02-10 13:53:33Z kohm $ %%%% (run: identify) %%%% (run: init) %%%% (run: options) @@ -48,9 +29,9 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2021-05-30 21:11:44 +0200 (Sun, 30 May 2021) $ + \filedate$Date: 2022-02-10 14:53:33 +0100 (Do, 10. Feb 2022) $ \def\filerevision$#1: #2 ${\gdef\filerevision{v0.3.#2}} - \filerevision$Revision: 3601 $ + \filerevision$Revision: 3694 $ \edef\reserved@a{% \noexpand\endgroup \noexpand\ProvidesFile{scrlayer-notecolumn.dtx}% @@ -86,11 +67,11 @@ \generate{\usepreamble\defaultpreamble \file{scrlayer-notecolumn.sty}{% \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,identify}% - \from{scrlayer.dtx}{interface,trace,notecolumn,init}% + \from{scrlayer.dtx}{interface,notecolumn,init}% \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,init}% - \from{scrlayer.dtx}{interface,trace,notecolumn,options}% + \from{scrlayer.dtx}{interface,notecolumn,options}% \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,options}% - \from{scrlayer.dtx}{interface,trace,notecolumn,body}% + \from{scrlayer.dtx}{interface,notecolumn,body}% \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,body}% \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,final}% \from{scrlogo.dtx}{logo}% @@ -103,117 +84,65 @@ \let\endbatchfile\relax \fi \endbatchfile - \documentclass{scrdoc} - \addtolength{\textwidth}{-1em} - \addtolength{\marginparwidth}{2em} - \addtolength{\oddsidemargin}{2em} - \usepackage[ngerman,english]{babel} - \usepackage{url,babelbib}\bibliographystyle{babalpha-fl} - \usepackage{listings} - \usepackage{scrhack} - \usepackage{etoolbox} - \pretocmd\DescribeMacro{\ifhmode\else\bigskip\noindent\fi}{}{} - \pretocmd\DescribeEnv{\ifhmode\else\bigskip\noindent\fi}{}{} - \pretocmd\DescribeOption{\ifhmode\else\bigskip\noindent\fi}{}{} - - \CodelineIndex - \RecordChanges - \GetFileInfo{scrlayer-notecolumn.dtx} - \title{The \texttt{scrlayer} interface \texttt{scrlayer-notecolumn}% - \footnote{This is version \fileversion\ of file \texttt{\filename}.}} - \date{\filedate} - \author{Markus Kohm} - - \newenvironment{Explain}{\par}{\par} - \newcommand*{\length}{} - \let\length\Length - \let\endlength\endLength - \let\Macro\cs - \let\Length\Macro - \let\Package\textsf - \let\Class\Package - \let\File\texttt - \let\Option\texttt - \newcommand*{\KOption}[1]{\Option{#1}\texttt{=}} - \newcommand*{\OptionValue}[2]{\Option{#1}\texttt{=}\PValue{#2}} - \let\Counter\texttt - \let\Environment\texttt - \let\ShowOutput\quote - \let\endShowOutput\endquote - \let\Pagestyle\texttt - \newcommand*{\Parameter}[1]{\texttt{\marg{#1}}\linebreak[1]} - \newcommand*{\OParameter}[1]{\texttt{\oarg{#1}}\linebreak[1]} - \newcommand*{\MParameter}[2]{\texttt{(\meta{#1},\meta{#2})}\linebreak[1]} - \providecommand\PParameter[1]{\mbox{\texttt{\{#1\}}}\linebreak[1]} - \let\PName\meta - \let\PValue\texttt - \providecommand*{\autoref}[1]{\expandafter\AUTOREF#1:} - \providecommand*{\AUTOREF}{} - \makeatletter - \def\AUTOREF#1:#2:{% - \edef\@tempa{#1}% - \edef\@tempb{tab}\ifx\@tempa\@tempb table~\fi - \edef\@tempb{sec}\ifx\@tempa\@tempb section~\fi - \ref{#1:#2}% - } - \providecommand*{\IndexCmd}[2][]{} - \providecommand*{\textnote}[2][]{} - \providecommand*\eTeX{\leavevmode\hbox{$\varepsilon$}-\TeX} - \providecommand*\NTS{% - \leavevmode\hbox{$\cal N\kern-0.35em\lower0.5ex\hbox{$\cal T$}% - \kern-0.2emS$}} - - \lstnewenvironment{lstcode}{\lstset{language=[LaTeX]TeX}}{} - \makeatother - \sloppy% YOU SHOULD NOT DO THIS!!! - - \begin{document} - \maketitle - \begin{abstract} - This is only the implementation documentation of package - \Package{scrlayer-notecolumn}. See the English or German \KOMAScript{} - manual for more information about usage of the package! - \end{abstract} - \tableofcontents - \DocInput{\filename} - \PrintChanges - \PrintIndex - \end{document} +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\usepackage{hvlogos} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrlayer-notecolumn.dtx} +\end{document} % % \fi^^A meta-comment % -% \selectlanguage{english} -% % \changes{v0.0}{2013/04/26}{start of interface} % \changes{v0.3.3532}{2020/09/11}{do not use deprecated interface commands} +% \changes{v3.36}{2022/02/10}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/10}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} % -% \StopEventually{} +% \GetFileInfo{scrlayer-notecolumn.dtx} +% \title{Providing Note Columns Similar to \cs{marginpar} with +% \href{https://komascript.de}{\KOMAScript} Package +% \pkg*{scrlayer-notecolumn} as Proof of Concept about Layers with +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrlayer}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package is only a proof of concept. The main sense of the package is, +% to show the power of layers with \pkg{scrlayer}. It was never intended to +% be used as a productivity package. So there is no support for using +% it. Several features are only rudimentary. Several can be improved. Please +% feel free to fork this package. +% \end{abstract} +% \tableofcontents % +% \section{User Manual} % -% \iffalse -%<*interface> -%<*identify> -% \fi +% You can find the user manuals of \pkg*{scrlayer-notecolumn} in the \KOMAScript{} +% manual, either the German \file{scrguide} or the English \file{scrguien}. % -%\iffalse -% -%\fi +% \MaybeStop{\PrintIndex} % +% \section{Implementation of \pkg*{scrlayer-notecolumn}} % -% \section{Initialising some Values before the Options} +% \begin{macrocode} +%<*interface> +% \end{macrocode} % -% \iffalse^^A meta-comment -%<*init> -% \fi^^A meta-comment % -% Initialisation before all options (even the options from -% \File{scrlayer.dtx}). +% \subsection{Initialising some values before the options} +% +% Initialization before all options (even the options from +% \file{scrlayer.dtx}). % % Here we test the used pdf\TeX{} primitives. % \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfsavepos} and % \cs{pdflastypos} in luaTeX} % \changes{v0.1.2483}{2016/06/28}{grouping fixed} % \begin{macrocode} +%<*init> \@tempswatrue \scr@ifundefinedorrelax{pdfsavepos}{% \scr@ifundefinedorrelax{savepos}{% @@ -245,24 +174,22 @@ }% \batchmode\csname @@end\endcsname\end \fi +% % \end{macrocode} % -% \iffalse^^A meta-comment -% -% \fi^^A meta-comment % -% \section{Making a Note Column} +% \subsection{Making a note column} % % The package supports a various number of note columns. Each is referenced by % a unique name. % -% \begin{macro}{\DeclareNoteColumn} -% \begin{description} -% \item[\OParameter{option list}:] a comma-separated list of -% \texttt{\meta{key}=\meta{value}} pairs. -% \item[\Parameter{string}:] the name of the note column (must be fully -% expandable and expand to a string only). -% \end{description} +% \begin{command}{\DeclareNoteColumn} +% \begin{description} +% \item[\oarg{option list}:] a comma-separated list of +% \texttt{\meta{key}=\meta{value}} pairs. +% \item[\marg{string}:] the name of the note column (must be fully expandable +% and expand to a string only). +% \end{description} % That's the primary command for note columns. It defines everything, the note % column needs. % \begin{macrocode} @@ -271,7 +198,7 @@ % \end{macrocode} % First of all we need a box register. The contents of the note column will be % build inside of this register. Since \eTeX{} registers shouldn't be a -% problem. User should use package \Package{etex}, if he or she runs out of +% problem. User should use package \pkg{etex}, if he or she runs out of % registers. Note, that the registers will stay allocated, if the interface % will be removed! Nevertheless, the name will be destroyed! % \begin{macrocode} @@ -291,9 +218,8 @@ % macro instead of a length. The width isn't more variable than, e.g., the % text width. So we can use a macro too. Both will be initialised to the % normal marginal note column later. -% \changes{3.27}{2019/02/14}{initialization of one colour stack per note -% column} -% For colour support we also need one colour stack per note column. A colour +% \changes{3.27}{2019/02/14}{initialization of one color stack per note column} +% For color support we also need one color stack per note column. A color % stack is a feature only available for pdf\TeX{} and lua\TeX{}. % \begin{macrocode} \@ifundefined{slnc@#2@colorstack}{% @@ -349,7 +275,7 @@ ]{notecolumn.#2} % \end{macrocode} % We need to add the layer to every page style. The easiest way to do this is -% to add it to the pseudo layer page style \Pagestyle{@everystyle@}. +% to add it to the pseudo layer page style \pstyle{@everystyle@}. % \changes{v0.1.1681}{2014/02/05}{add the layer only once} % \begin{macrocode} \IfLayerAtPageStyle{@everystyle@}{notecolumn.#2}{}{% @@ -363,11 +289,11 @@ } % \end{macrocode} % \begin{macro}{\slnc@initial@black} -% \changes{v0.2.3085}{2019/02/14}{new internal} -% The initial black is the colour used to initialize the colour stacks. As long -% as only pdf\TeX{} and lua\TeX{} provide colour stacks, we can initialize it +% \changes{v0.2.3085}{2019/02/14}{added} +% The initial black is the color used to initialize the color stacks. As long +% as only pdf\TeX{} and lua\TeX{} provide color stacks, we can initialize it % with \texttt{0 g 0 G}. However it may be better to use the initial -% \cs{current@color} of the used colour package. Using \cs{default@color} would +% \cs{current@color} of the used color package. Using \cs{default@color} would % be even better, but this is not available until \cs{begin\{document\}}. % \begin{macrocode} \newcommand*{\slnc@initial@black}{0 g 0 G}% @@ -380,14 +306,14 @@ \AtBeginDocument{\let\slnc@initial@black\default@color}% }% % \end{macrocode} -% \end{macro}%^^A \slnc@initial@black +% \end{macro}^^A \slnc@initial@black % \begin{macro}{\slnc@processnotecolumns} % This is a list of all declared note columns in \LaTeX{} syntax (using -% \Macro{@cons} and \Macro{@elt} etc.). +% \cs{@cons} and \cs{@elt} etc.). % \begin{macrocode} \newcommand*{\slnc@processnotecolumns}{}% % \end{macrocode} -% \end{macro}%^^A \slnc@processnotecolumns +% \end{macro}^^A \slnc@processnotecolumns % \begin{macrocode} % % \end{macrocode} @@ -415,14 +341,9 @@ }% \AfterSelectAnyPageStyle{\slnc@testforpagestylewarning} % \end{macrocode} -% \end{macro}%^^A \slnc@testforpagestylewarning -% \begin{option}{position} -% \begin{option}{width} -% \begin{option}{font} -% \begin{option}{marginpar} -% \begin{option}{normalmarginpar} -% \begin{option}{reversemarginpar} -% Last but not least we have to define the options for the \PName{option +% \end{macro}^^A \slnc@testforpagestylewarning +% \begin{option}{position,width,font,marginpar,normalmarginpar,reversemarginpar} +% Last but not least we have to define the options for the \meta{option % list}. % \begin{macrocode} \DefineFamilyMember[.definenotecolumn]{KOMAarg} @@ -446,7 +367,7 @@ } % \end{macrocode} % \begin{macro}{\slnc@defpos} -% Little helper for option \Option{marginpar}. The argument is the expanded +% Little helper for option \opt{marginpar}. The argument is the expanded % name of the note column. % \begin{macrocode} \newcommand*\slnc@defpos[1]{% @@ -496,7 +417,7 @@ }% }% % \end{macrocode} -% \end{macro}%^^A \slnc@defpos +% \end{macro}^^A \slnc@defpos % \begin{macrocode} \DefineFamilyKey[.definenotecolumn]{KOMAarg}{normalmarginpar}[\relax]{% \FamilyKeyStateProcessed @@ -506,7 +427,7 @@ } % \end{macrocode} % \begin{macro}{\slnc@defnormalpos} -% Little helper for option \Option{normalmarginpar}. The argument is the +% Little helper for option \opt{normalmarginpar}. The argument is the % expanded name of the note column. % \begin{macrocode} \newcommand*\slnc@defnormalpos[1]{% @@ -535,7 +456,7 @@ }% }% % \end{macrocode} -% \end{macro}%^^A \slnc@defnormalpos +% \end{macro}^^A \slnc@defnormalpos % \begin{macrocode} \DefineFamilyKey[.definenotecolumn]{KOMAarg}{reversemarginpar}[\relax]{% \FamilyKeyStateProcessed @@ -545,7 +466,7 @@ } % \end{macrocode} % \begin{macro}{\slnc@defreversepos} -% Little helper for option \Option{reversemarginpar}. The argument is the +% Little helper for option \opt{reversemarginpar}. The argument is the % expanded name of the note column. % \begin{macrocode} \newcommand*\slnc@defreversepos[1]{% @@ -574,22 +495,15 @@ }% }% % \end{macrocode} -% \end{macro}%^^A \slnc@defreversepos +% \end{macro}^^A \slnc@defreversepos % \begin{macrocode} % % \end{macrocode} -% \end{option}%^^A reversemarginpar -% \end{option}%^^A normalmarginpar -% \end{option}%^^A marginpar -% \end{option}%^^A font -% \end{option}%^^A width -% \end{option}%^^A position -% \end{macro}%^^A \DeclareNoteColumn +% \end{option}^^A position … reversemarginpar +% \end{command}^^A \DeclareNoteColumn % -% \begin{macro}{\DeclareNewNoteColumn} -% \begin{macro}{\ProvideNoteColumn} -% \begin{macro}{\RedeclareNoteColumn} -% Like \Macro{DeclareNoteColumn} but with restrictions, if the note column has +% \begin{command}{\DeclareNewNoteColumn,\ProvideNoteColumn,\RedeclareNoteColumn} +% Like \cs{DeclareNoteColumn} but with restrictions, if the note column has % (not) been declared already. % \begin{macrocode} %<*body> @@ -631,24 +545,22 @@ }% % % \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} +% \end{command} +% % -% \section{Setting a Note Column} +% \subsection{Setting a note column} % % We already have commands to declare note columns. But we also need a command % to put contents into the note columns and to output the note columns. % % \begin{macro}{\tf@slnc} -% \changes{v0.1.2395}{2016/03/25}{write to \texttt{aux}-file with +% \changes{v0.1.2395}{2016/03/25}{write to \file{aux}-file with % \cs{if@filesw}} -% \begin{macro}{\slnc@initwrite} -% \begin{macro}{\slnc@openwrite} +% \begin{macro}{\slnc@initwrite,\slnc@openwrite} % \changes{v0.1.2928}{2018/02/02}{use \cs{closein} instead of \cs{closeout} % to close \cs{slnc@file}} % First of all we need a file to write the notes to. We use the -% \File{aux}-file to write into the file, because we need to read the file +% \file{aux}-file to write into the file, because we need to read the file % while the document will be typeset and the same time we need to write into % the file. Note, that the file will be still reserved on auto-removing the % interface! @@ -674,11 +586,10 @@ \immediate\openout\tf@slnc\jobname.slnc } % \end{macrocode} -% After reading the main \File{aux}-file at |\end{document}|, we again -% calculate the md5 checksum of the \File{slnc}-file. If it has been changed +% After reading the main \file{aux}-file at |\end{document}|, we again +% calculate the md5 checksum of the \file{slnc}-file. If it has been changed % we set |\if@tempswa| to |\iftrue| to provocate a rerun message. -% \changes{v0.1.2872}{2018/01/17}{usage of Lua function -% \texttt{slncmdfivesum}} +% \changes{v0.1.2872}{2018/01/17}{usage of Lua function \texttt{slncmdfivesum}} % \changes{v0.1.2972}{2018/04/01}{usage of not yet documented Xe\TeX{} % primitive \cs{mdfivesum}} % \begin{macrocode} @@ -732,8 +643,8 @@ } % % \end{macrocode} -% \changes{v0.3.3600}{2021/05/30}{use of \textsf{scrwfile}'s never list}% -% The easiest way to make it compatible with \Package{scrwfile} is to put it +% \changes{v0.3.3600}{2021/05/30}{use of \pkg*{scrwfile}'s never list}% +% The easiest way to make it compatible with \pkg*{scrwfile} is to put it % on the \emph{never} list. % \begin{macrocode} %<*body> @@ -743,27 +654,23 @@ } % % \end{macrocode} +% \end{macro}^^A \slnc@initwrite,\slnc@openwrite +% \end{macro}^^A \tf@slnc % -% \end{macro}%^^A \slnc@openwrite -% \end{macro}%^^A \slnc@initwrite -% \end{macro}%^^A \tf@slnc -% -% \begin{macro}{\makenote} -% \begin{description} -% \item[\OParameter{string}:] the name of the note column the note should be -% added to (must be fully expandable and expand to a string only). The -% default value is \PValue{marginpar}. -% \item[\Parameter{code}:] the code, that should become par of the note -% column. Note, that this will be written protected to a file. So you have -% 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{v0.1.2583}{2017/02/08}{new (internal)} -% \begin{macro}{\slnc@makenote} -% \changes{v0.1.2583}{2017/02/08}{new (internal)} +% \begin{command}{\makenote} +% \begin{description} +% \item[\oarg{string}:] the name of the note column the note should be added +% to (must be fully expandable and expand to a string only). The default +% value is |marginpar|. +% \item[\marg{code}:] the code, that should become par of the note +% column. Note, that this will be written protected to a file. So you have +% to use \cs{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,\slnc@makenote} +% \changes{v0.1.2583}{2017/02/08}{added} % \begin{macrocode} %<*body> \newcommand*{\slnc@unexpanded}{} @@ -784,10 +691,10 @@ \@esphack }% % \end{macrocode} -%^^A \begin{counter}{slncpage} +% \begin{counter}{slncpage} % This counter should be increased once per page with note column. This may % be done simply at a once per page executed hook of -% \Pagestyle{@everystyle@}. You should note, that auto-remove wouldn't +% \pstyle{@everystyle@}. You should note, that auto-remove wouldn't % remove the counter. % \begin{macrocode} \@ifundefined{c@slncpage}{% @@ -798,16 +705,15 @@ }{} % % \end{macrocode} -%^^A \end{counter}%^^A slncpage -% \end{macro}%^^A \slnc@unexpanded -% \end{macro}%^^A \slnc@makenote -% \end{macro}%^^A \makenote +% \end{counter}^^A slncpage +% \end{macro}^^A \slnc@makenote,\slnc@unexpanded +% \end{command}^^A \makenote % % \begin{macro}{\slnc@processnotes} -% \begin{description} -% \item[\Parameter{string}:] the name of the note column (must be fully -% expandable an expand to a string only). -% \end{description} +% \begin{description} +% \item[\marg{string}:] the name of the note column (must be fully expandable +% an expand to a string only). +% \end{description} % Each note column typesets the notes with this command. It works in following % steps: % \begin{macrocode} @@ -815,7 +721,7 @@ \newcommand*{\slnc@processnotes}[1]{% % \end{macrocode} % Read as long notes from the notes file until the number at \#2 of -% \Macro{slnc@note} in the file is greater than \Counter{slncpage}. Put all +% \cs{slnc@note} in the file is greater than \cnt{slncpage}. Put all % these to the corresponding unprocessed list. % \begin{macrocode} \begingroup @@ -844,9 +750,9 @@ \fi }% \long\def\slnc@note##1##2##3##4{% -% \typeout{TRACE (slnc): ##2<=\theslncpage?}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): ##2<=\theslncpage?}% \ifnum ##2>\value{slncpage}\relax -% \typeout{TRACE (slnc): no: unprocess note}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): no: unprocess note}% \expandafter\g@addto@macro\csname slnc@#1@unprocessed\endcsname{% \slnc@note{##1}{##2}{##3}{##4}% }% @@ -859,7 +765,7 @@ \expandafter\hsize\csname slnc@#1@width\endcsname \normalfont\normalsize % \end{macrocode} -% \changes{v0.2.3085}{2019/02/14}{using colour stack if available} +% \changes{v0.2.3085}{2019/02/14}{using color stack if available} % If a color stack is available we switch to it before changing the font. So a % color definition inside the font would overwrite every color change inside % the column! But if we don't have a color stack, color switching is not @@ -897,7 +803,6 @@ \@tempdimb=\dimexpr \expandafter\ht\csname slnc@#1@box\endcsname +\expandafter\dp\csname slnc@#1@box\endcsname \relax - \typeout{Soll: \the\@tempdima^^JIst: \space\the\@tempdimb}% \ifdim\@tempdima<\@tempdimb %<*trace> \PackageInfo{scrlayer-notecolumn}{% @@ -978,7 +883,7 @@ \splittopskip\topskip \splitmaxdepth\baselineskip % \end{macrocode} -% Bring back the colours: +% Bring back the colors: % \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added} % \begin{macrocode} \usekomafont{notecolumn.#1}{% @@ -997,7 +902,7 @@ \PackageInfo{scrlayer-notecolumn}{Flush note box `#1'}% % % \end{macrocode} -% Bring back the colours: +% Bring back the colors: % \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added} % \begin{macrocode} \usekomafont{notecolumn.#1}{% @@ -1013,18 +918,18 @@ } % \end{macrocode} % \begin{macro}{\slnc@switchcolorstack} -% \changes{v0.2.3085}{2019/02/14}{new internal} -% This either redefines \cs{set@color} or switches to the colour stack of the +% \changes{v0.2.3085}{2019/02/14}{added} +% This either redefines \cs{set@color} or switches to the color stack of the % note column given by the argument. % \begin{macrocode} \newcommand*{\slnc@switchcolorstack}[1]{% \scr@ifundefinedorrelax{slnc@#1@colorstack}{% \def\set@color{% \PackageWarningNoLine{scrlayer-notecolumn}{% - unsupported change of colour!\MessageBreak + unsupported change of color!\MessageBreak It seems you are using a TeX engine,\MessageBreak that does not support switching the\MessageBreak - colour stack like pdfTeX or luaTeX do.\MessageBreak + color stack like pdfTeX or luaTeX do.\MessageBreak Because of this, usage of \string\color,\MessageBreak \string\textcolor\space etc. inside a note column\MessageBreak @@ -1040,7 +945,7 @@ \scr@ifundefinedorrelax{pdfcolorstack}{% \scr@ifundefinedorrelax{pdfextension}{% \PackageError{scrlayer-notecolumm}{% - colour stack defined but not usable% + color stack defined but not usable% }{% \expandafter\string \csname slnc@#1@colorstack\endcsname\space defined @@ -1060,11 +965,11 @@ }% }% % \end{macrocode} -% \end{macro}%^^A \slnc@switchcolorstack -% \begin{macro}{\restoreinnote} -% \changes{v0.1.2582}{2017/02/08}{new command} +% \end{macro}^^A \slnc@switchcolorstack +% \begin{command}{\restoreinnote} +% \changes{v0.1.2582}{2017/02/08}{added} % \begin{macro}{\slnc@restoreinnote} -% \changes{v0.1.2582}{2017/02/08}{new (internal)} +% \changes{v0.1.2582}{2017/02/08}{added} % 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}. @@ -1085,14 +990,14 @@ \restoreinnote\index \restoreinnote\glossary % \end{macrocode} -% \end{macro}%^^A \slnc@restoreinnote -% \end{macro}%^^A \restoreinnote +% \end{macro}^^A \slnc@restoreinnote +% \end{command}^^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 -% \Counter{slncpage}. Put all these to the corresponding unprocessed list. +% \cs{slnc@note} or \cs{slnc@sync} in the file is greater than +% \cnt{slncpage}. Put all these to the corresponding unprocessed list. % \begin{macro}{\slnc@catcodes} -% \changes{v0.3}{2019/03/02}{new internal} +% \changes{v0.3}{2019/03/02}{added} % We need a helper macro \cs{slnc@catcodes} to restore (some of) the catcodes % before reading from file. % \begin{macrocode} @@ -1110,7 +1015,7 @@ \endgroup } % \end{macrocode} -% \end{macro}%^^A \slnc@catcodes +% \end{macro}^^A \slnc@catcodes % \begin{macrocode} \newcommand*\slnc@readnotes[1]{% \ifeof\slnc@file\else @@ -1184,18 +1089,14 @@ \fi }% % \end{macrocode} -% \end{macro}%^^A \slnc@readnotes -% \begin{macro}{\slnc@iofv} -% \begin{macro}{\slnc@iiofv} -% \begin{macro}{\slnc@iiiofv} +% \end{macro}^^A \slnc@readnotes +% \begin{macro}{\slnc@iofv,\slnc@iiofv,\slnc@iiiofv} % \begin{macrocode} \newcommand\slnc@iofv[6]{\def#1{#2}}% \newcommand\slnc@iiofv[6]{\def#1{#3}}% \newcommand\slnc@iiiofv[6]{\def#1{#4}}% % \end{macrocode} -% \end{macro}%^^A \slnc@iiiofv -% \end{macro}%^^A \slnc@iiofv -% \end{macro}%^^A \slnc@iofv +% \end{macro}^^A \slnc@iofv … \slnc@iiiofv % \begin{macro}{\slnc@unprocessed} % The \#2 of the last read note column from notes file. % \begin{macrocode} @@ -1209,7 +1110,7 @@ % \begin{macro}{\slnc@mdfivesum} % \changes{v0.1.2872}{2018/01/17}{definition and usage of Lua function % \texttt{slncmdfivesum}} -% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented Xe\TeX{} +% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented \XeTeX{} % primitive \cs{mdfivesum}} % \changes{v0.3.3591}{2021/03/25}{Lua function name changed to % \texttt{slnc.mdfivesum}} @@ -1260,12 +1161,14 @@ \immediate\openin\slnc@file \jobname.slnc % % \end{macrocode} -% \end{macro}%^^A \slnc@mdfivesum -% \end{macro}%^^A \slnc@file -% \end{macro}%^^A \slnc@unprocessed -% \end{macro}%^^A \slnc@processnotes +% \end{macro}^^A \slnc@mdfivesum +% \end{macro}^^A \slnc@file +% \end{macro}^^A \slnc@unprocessed +% \end{macro}^^A \slnc@processnotes % % \begin{option}{autoclearnotecolumns} +% \begin{macro}{\ifslnc@autoclearnotecolumns,\slnc@autoclearnotecolumnstrue, +% \slnc@autoclearnotecolumnsfalse} % \begin{macrocode} %<*options> \KOMA@ifkey{autoclearnotecolumns}{slnc@autoclearnotecolumns} @@ -1279,13 +1182,14 @@ \expandafter\g@addto@macro\expandafter\clearpage\expandafter{\reserved@a} % % \end{macrocode} +% \end{macro} % \end{option} % -% \begin{macro}{\clearnotecolumn} -% \begin{description} -% \item[\OParameter{string}:] the name of the note column (must be fully -% expandable and expand to a string only). Default is \PValue{marginpar}. -% \end{description} +% \begin{command}{\clearnotecolumn} +% \begin{description} +% \item[\oarg{string}:] the name of the note column (must be fully +% expandable and expand to a string only). Default is |marginpar|. +% \end{description} % Output as many (empty) pages as needed to output all unprocessed notes of % one note column. Note, that the output of the first page may result in more % unprocessed notes. But the output of the following (empty) pages shouldn't. @@ -1323,22 +1227,23 @@ \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}% }% %<*trace> - \typeout{TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, + \PackageInfo{scrlayer-notecolumn}{% + TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, abspage=\the\value{slncpage}, until page=\slnc@cmp@value, process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}% % \ifvmode\ifdim \pagetotal<\topskip % \end{macrocode} -% \Macro{clearpage} wouldn't result in a new page, so we do not have to output +% \cs{clearpage} wouldn't result in a new page, so we do not have to output % the notes of this page but only until the previous. % \begin{macrocode} \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}% -% \typeout{TRACE (slnc): until page=\slnc@cmp@value}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}% \fi\fi \ifnum \reserved@a=\z@ % \end{macrocode} % Next we read all notes until the end of the current page, but only -% if a \Macro{clearpage} wouldn't result in a new page. +% if a \cs{clearpage} wouldn't result in a new page. % \begin{macrocode} \ifvmode \ifdim \pagetotal<\topskip @@ -1378,7 +1283,7 @@ \@tempswatrue \fi \@whilesw\if@tempswa\fi{% -% \typeout{TRACE (slnc): add \string\clearpage}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): add \string\clearpage}% % \end{macrocode} % Yes, we have (maybe again)! % \begin{macrocode} @@ -1405,43 +1310,41 @@ \endgroup } % \end{macrocode} -% \begin{macro}{\slnc@firstof} -% \begin{macro}{\slnc@secondof} -% We need these little helpers, because some packages like -% \Package{hyperref} extend the label mechanism by additional arguments. +% \begin{macro}{\slnc@firstof,\slnc@secondof} +% We need these little helpers, because some packages like +% \pkg{hyperref} extend the label mechanism by additional arguments. % \begin{macrocode} \newcommand*{\slnc@firstof}{} \def\slnc@firstof#1#2\@nil{#1}% \newcommand*{\slnc@secondof}{} \def\slnc@secondof#1#2#3\@nil{#2}% % \end{macrocode} -% \end{macro}%^^A \slnc@firstof -% \end{macro}%^^A \slnc@secondof +% \end{macro}^^A \slnc@firstof,\slnc@secondof % \begin{macro}{\slnc@voidtest} -% \begin{description} -% \item[\Parameter{string}:] the name of a note column (must be fully -% expandable and expand to a string only). -% \end{description} -% If the box of the note column is empty/void it returns \Macro{z@} otherwise -% \Macro{@ne}. +% \begin{description} +% \item[\marg{string}:] the name of a note column (must be fully +% expandable and expand to a string only). +% \end{description} +% If the box of the note column is empty/void it returns \cs{z@} otherwise +% \cs{@ne}. % \begin{macrocode} \newcommand*{\slnc@voidtest}[1]{% \expandafter\ifvoid \csname slnc@#1@box\endcsname \z@\else \@ne\fi } % % \end{macrocode} -% \end{macro}%^^A \slnc@voidtest -% \end{macro}%^^A \clearnotecolumn +% \end{macro}^^A \slnc@voidtest +% \end{command}^^A \clearnotecolumn % -% \begin{macro}{\clearnotecolumns} +% \begin{command}{\clearnotecolumns} % \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} % \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}} -% \begin{description} -% \item[\OParameter{string list}:] comma separated list of note column names -% (must be fully expandable and each element must expand to a string only, -% that is the name of a note column); if omitted or empty all note columns -% will be used. -% \end{description} +% \begin{description} +% \item[\oarg{string list}:] comma separated list of note column names (must +% be fully expandable and each element must expand to a string only, that is +% the name of a note column); if omitted or empty all note columns will be +% used. +% \end{description} % Output as many (empty) pages as needed to output all unprocessed notes of % all (given) note columns. Note, that the output of the first page may % result in more unprocessed notes. But the output of the following (empty) @@ -1497,22 +1400,23 @@ \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}% }% %<*trace> - \typeout{TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, + \PackageInfo{scrlayer-notecolumn}{% + TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, abspage=\theslncpage, until page=\slnc@cmp@value, process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}% % \ifvmode\ifdim \pagetotal<\topskip % \end{macrocode} -% \Macro{clearpage} wouldn't result in a new page, so we do not have to output +% \cs{clearpage} wouldn't result in a new page, so we do not have to output % the notes of this page but only until the previous. % \begin{macrocode} \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}% -% \typeout{TRACE (slnc): until page=\slnc@cmp@value}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}% \fi\fi \ifnum \reserved@a=\z@ % \end{macrocode} % Next we read all notes until the end of the current page, but only -% if a \Macro{clearpage} wouldn't result in a new page. +% if a \cs{clearpage} wouldn't result in a new page. % \begin{macrocode} \ifvmode \ifdim \pagetotal<\topskip @@ -1553,7 +1457,7 @@ \@tempswatrue \fi \@whilesw\if@tempswa\fi{% -% \typeout{TRACE (slnc): add \string\clearpage}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): adding \string\clearpage}% % \end{macrocode} % Yes, we have (maybe again)! % \begin{macrocode} @@ -1583,10 +1487,10 @@ } % % \end{macrocode} -% \end{macro}%^^A \clearnotecolumns +% \end{command}^^A \clearnotecolumns % % -% \section{Syncronisation of Text and Note} +% \subsection{Syncronisation of text and note} % \label{sec:scrlayer-notecolumn.sync} % % Until yet we have the text and we have note columns. Normally note entries @@ -1595,17 +1499,18 @@ % note may be later (but never earlier), so we need a mechanism to force % synchronisation of the text with the note. % -% \begin{macro}{\syncwithnotecolumn} +% \begin{command}{\syncwithnotecolumn,\syncwithnotecolumns} % \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} % \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}} -% \begin{description} -% \item[\OParameter{string}:] the name of the note column to sync with (this -% must be fully expandable and expand to the name of a note column). By -% default sync with note column \PValue{marginpar}. -% \end{description} +% \begin{description} +% \item[\oarg{string}:] the name of the note column to sync with (this must be +% fully expandable and expand to the name of a note column). By default sync +% with note column |marginpar|. +% \end{description} +% \begin{counter}{slnc@syncpoint} % Add at the \LaTeX{} run after the next \LaTeX{} run as much space to the % text (not the note column!) as needed to reach the next position at the -% note column. This is not the same like \Macro{clearnotecolumn}, because it +% note column. This is not the same like \cs{clearnotecolumn}, because it % doesn't need to go to the next page, but it needs at least three \LaTeX{} % runs to terminate. % \begin{macrocode} @@ -1648,7 +1553,7 @@ Using \string\syncwithnotecolumn\space in horizontal\MessageBreak mode may result in unwanted vertical\MessageBreak space inside paragraphs and may lost\MessageBreak - colours of text of notes. \space So perhaps you\MessageBreak + colors of text of notes. \space So perhaps you\MessageBreak should move \string\syncwithnotecolumn\space before\MessageBreak or after the paragraph% }% @@ -1766,6 +1671,7 @@ \endgroup } % \end{macrocode} +% \end{counter} % \begin{macro}{\slnc@vadjust} % \begin{macrocode} \newcommand{\slnc@vadjust}[1]{% @@ -1775,23 +1681,23 @@ } % % \end{macrocode} -% \end{macro}%^^A \slnc@vadjust -% \end{macro}%^^A \syncwithnotecolumn +% \end{macro}^^A \slnc@vadjust +% \end{command}^^A \syncwithnotecolumn,\syncwithnotecolumns % % -% \iffalse^^A meta-comment +% \begin{macrocode} % -% \fi^^A meta-comment +% \end{macrocode} % % \Finale +% \PrintChanges % \endinput -% -% end of file `scrlayer-notecolumn.dtx' - -%%% Local Variables: -%%% mode: doctex -%%% mode: flyspell -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: t -%%% End: +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: -- cgit v1.2.3