diff options
Diffstat (limited to 'macros/latex/contrib/changebar/changebar.dtx')
-rw-r--r-- | macros/latex/contrib/changebar/changebar.dtx | 158 |
1 files changed, 105 insertions, 53 deletions
diff --git a/macros/latex/contrib/changebar/changebar.dtx b/macros/latex/contrib/changebar/changebar.dtx index 406ccf5290..58df74102c 100644 --- a/macros/latex/contrib/changebar/changebar.dtx +++ b/macros/latex/contrib/changebar/changebar.dtx @@ -24,7 +24,7 @@ % and covered by LPPL is defined by the unpacking scripts (with % extension .ins) which are part of the distribution. % \fi -% \CheckSum{2954} +% \CheckSum{2948} % %\iffalse % This file is built for \LaTeXe, so we make sure an error is @@ -39,7 +39,7 @@ \ProvidesFile{changebar.dtx} %</dtx> %<+package>\ProvidesPackage{changebar} - [2024/01/09 v3.7d Indicate changes with marginal bars] + [2024/07/17 v3.7e Indicate changes with marginal bars] % \end{macrocode} % % \section{A driver for this document} @@ -137,7 +137,10 @@ % \changes{v3.6e}{2023/08/13}{Added supprt for luaTeX} % \changes{v3.7b}{2023/12/28}{Added a few lines that were inadvertantly removed} % \changes{v3.7b}{2023/12/30}{the cb2-file use delimiting chars may -% change meaning when they end up in the wrong situation} +% change meaning when they end up in the wrong situation} +% \changes{v3.7e}{2024/07/17}{The us of the character `;´ as a string +% separator clashes with it's active variant when babel/french has +% been loaded} % % \title{The Changebar package % \thanks{This file has version number \fileversion, @@ -229,9 +232,7 @@ % \changes{v3.6a}{2011/04/30}{XeTeX added} % \item Xe\TeX % \changes{3.6e}{2023/08/13}{luaTeX added} -% \begin{changebar} % \item lua\TeX -% \end{changebar} % \end{itemize} % The drivers are represented in the normal typewriter method of % typing these names, or by the same entirely in lower case. @@ -752,7 +753,7 @@ % \item V\TeX % \item PDF\TeX % \item Xe\TeX -% \cbstart\item luaTeX\cbend +% \item luaTeX % \end{itemize} % % The intent is that the driver names should be case-insensitive, @@ -799,10 +800,17 @@ % \end{macrocode} % Redefine the |\cb@pdfxy| macro to write point coordinates to the % \file{.cb2} file. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} % \begin{macrocode} \gdef\cb@pdfxy##1##2##3##4##5{% - \immediate\write\cb@writexy{##1.##2p##3;##4;##5}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \immediate\write\cb@writexy{##1.##2p##3/##4/##5}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}} \else\cb@pdftexerror\fi\fi\fi} % \end{macrocode} @@ -837,10 +845,17 @@ % \end{macrocode} % Redefine the |\cb@pdfxy| macro to write point coordinates to the % \file{.cb2} file. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} % \begin{macrocode} \gdef\cb@pdfxy##1##2##3##4##5{% - \immediate\write\cb@writexy{##1.##2p##3;##4;##5}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \immediate\write\cb@writexy{##1.##2p##3/##4/##5}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}} \gdef\sec@nd@ftw@##1 ##2{##2} \fi} @@ -854,7 +869,6 @@ {You are not using XeLaTeX}} % \end{macrocode} % -% \begin{changebar} % \begin{macrocode} \DeclareOption{luaTeX}{\cb@luatexcheck} \DeclareOption{luatex}{\cb@luatexcheck} @@ -877,10 +891,17 @@ % \end{macrocode} % Redefine the |\cb@pdfxy| macro to write point coordinates to the % \file{.cb2} file. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of ",¨ as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} % \begin{macrocode} \gdef\cb@pdfxy##1##2##3##4##5{% - \immediate\write\cb@writexy{##1.##2p##3;##4;##5}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \immediate\write\cb@writexy{##1.##2p##3/##4/##5}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}} \fi} % \end{macrocode} @@ -892,7 +913,6 @@ {luaTeX option cannot be used}% {You are not using luaLaTeX}} % \end{macrocode} -% \end{changebar} % % The new features of \LaTeXe\ make it possible to implement the % \Lopt{outerbars} option. @@ -1120,6 +1140,8 @@ % compatibility mode} % \changes{v3.3e}{1998/02/24}{Added \cs{Textures}} % \changes{v3.5a}{2005/05/23}{Added 'PDFtex' option} +% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option} +% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option} % \begin{macrocode} \if@compatibility \def\driver#1{% @@ -1132,17 +1154,9 @@ \def\Textures{TEXTURES}% \def\VTeX{VTEX}% \def\pdfTeX{PDFTEX}% -% \end{macrocode} -% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option} -% \begin{macrocode} \def\xeTeX{XETEX} -% \end{macrocode} -% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option} -% \begin{changebar} -% \begin{macrocode} \def\luaTeX{LUATEX} % \end{macrocode} -% \end{changebar} % % The choice has to be communicated to the macro % \verb=\cb@setup@specials= that will be called from within @@ -1150,6 +1164,7 @@ % \verb=\cb@driver@setup= is used. It receives a numeric value % using \verb=\chardef=. % \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option} +% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option} % \begin{macrocode} \global\chardef\cb@driver@setup=0\relax \ifx\tempa\LN \global\chardef\cb@driver@setup=0\fi @@ -1160,14 +1175,7 @@ \ifx\tempa\VTeX \global\chardef\cb@driver@setup=5\fi \ifx\tempa\pdfTeX \cb@pdftexcheck\fi \ifx\tempa\xeTeX \cb@xetexcheck\fi -% \end{macrocode} -% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option} -% \begin{changebar} -% \begin{macrocode} \ifx\tempa\luaTeX \cb@luatexcheck\fi -% \end{macrocode} -% \end{changebar} -% \begin{macrocode} \egroup} % \end{macrocode} % We add \verb+\driver+ to \verb+\@preamblecmds+, which is a @@ -1464,11 +1472,22 @@ % When the point is found it is removed from |\cb@pdfpoints|. \#9 % contains the cumulative head of the list to construct the new list % with the entry removed. \#3--\#8 are for pattern matching. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{% \def\cb@next{% - \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -1519,8 +1538,13 @@ % \begin{macro}{\cb@pdfparsexy} % The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in % from the \file{.cb2} file. +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{% \def\cb@pdfpg{##2}}% % \end{macrocode} % \end{macro} @@ -1565,7 +1589,7 @@ % In order to get things in the right spot we need a little scaling % factor. We define it here. % \begin{macrocode} -\def\cb@pdf@scale{0.996264009963} + \def\cb@pdf@scale{0.996264009963} % \end{macrocode} % \end{macro} % @@ -1636,14 +1660,12 @@ % \begin{macrocode} \gdef\cb@checkPdfxy##1##2##3##4##5{% \cb@@findpdfpoint{##1}{##2}% -% \end{macrocdode} -% \begin{changebar} -% \begin{macrocode +% \end{macrocode} +% \begin{macrocode} \ifdim##3sp=\cb@pdfx\relax \ifdim##4sp=\cb@pdfy\relax -% \end{macrocdode} -% \end{changebar} -% \begin{macrocode +% \end{macrocode} +% \begin{macrocode} \ifdim##5=\cb@pdfz\relax \else \cb@error @@ -1741,11 +1763,22 @@ % When the point is found it is removed from |\cb@pdfpoints|. \#9 % contains the cumulative head of the list to construct the new list % with the entry removed. \#3--\#8 are for pattern matching. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{% \def\cb@next{% - \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -1796,8 +1829,13 @@ % \begin{macro}{\cb@pdfparsexy} % The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in % from the \file{.cb2} file. +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{% \def\cb@pdfpg{##2}}% % \end{macrocode} % \end{macro} @@ -1842,7 +1880,7 @@ % In order to get things in the right spot we need a little scaling % factor. We define it here. % \begin{macrocode} -\def\cb@pdf@scale{0.996264009963} + \def\cb@pdf@scale{0.996264009963} % \end{macrocode} % \end{macro} % @@ -1934,7 +1972,6 @@ \let\cb@resetpoints\relax % \end{macrocode} % -% \begin{changebar} % \changes{v3.6e}{2023/08/13}{lua\TeX{} support added} % The code for lua\TeX{}, like for pdf\TeX\ and Xe\TeX, % is more elaborate as the calculations have to @@ -2012,11 +2049,22 @@ % When the point is found it is removed from |\cb@pdfpoints|. \#9 % contains the cumulative head of the list to construct the new list % with the entry removed. \#3--\#8 are for pattern matching. -% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter} +% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter} +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{% \def\cb@next{% - \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}% +% \end{macrocode} +% \begin{changebar} +% \begin{macrocode} + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}% +% \end{macrocode} +% \end{changebar} +% \begin{macrocode} \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -2067,8 +2115,13 @@ % \begin{macro}{\cb@pdfparsexy} % The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in % from the \file{.cb2} file. +% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter} +% \begin{changebar} +% \begin{macrocode} + \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{% +% \end{macrocode} +% \end{changebar} % \begin{macrocode} - \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{% \def\cb@pdfpg{##2}}% % \end{macrocode} % \end{macro} @@ -2113,7 +2166,7 @@ % In order to get things in the right spot we need a little scaling % factor. We define it here. % \begin{macrocode} -\def\cb@pdf@scale{0.996264009963} + \def\cb@pdf@scale{0.996264009963} % \end{macrocode} % \end{macro} % @@ -2203,7 +2256,6 @@ \def\cb@maxpoint{9999999} \let\cb@resetpoints\relax % \end{macrocode} -%\end{changebar} % % When code for other drivers should be added it can be inserted % here. When someone makes a mistake and somehow selects an @@ -2296,7 +2348,7 @@ \newcommand*{\nochangebars}{% \def\cb@start[##1]{\ignorespaces}% \def\cb@delete[##1]{}% - \def\cb@end{\ignorespacesafterend} + \def\cb@end{\ignorespacesafterend}% } % \end{macrocode} % \end{macro} |