From 5acd803fa16526d48d5c8e990dc509df22d856b7 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 31 Dec 2023 03:03:08 +0000
Subject: CTAN sync 202312310303

---
 macros/latex/contrib/changebar/changebar.dtx | 69 ++++++++++++++--------------
 1 file changed, 34 insertions(+), 35 deletions(-)

(limited to 'macros/latex/contrib/changebar/changebar.dtx')

diff --git a/macros/latex/contrib/changebar/changebar.dtx b/macros/latex/contrib/changebar/changebar.dtx
index 6f34ad89ec..e4d71b5c39 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{2949}
+% \CheckSum{2952}
 %
 %\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}
-           [2023/12/24 v3.7a Indicate changes with marginal bars]
+           [2023/12/30 v3.7b Indicate changes with marginal bars]
 %    \end{macrocode}
 %
 % \section{A driver for this document}
@@ -135,7 +135,10 @@
 % \changes{v3.6b}{2018/02/03}{Added a macro for pdf scaling for
 %    Xe\TeX}
 % \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}
+%
 % \title{The Changebar package
 %         \thanks{This file has version number \fileversion,
 %                 last revised \filedate.}}
@@ -797,9 +800,10 @@
 %    \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}
 %    \begin{macrocode}
     \gdef\cb@pdfxy##1##2##3##4##5{%
-      \immediate\write\cb@writexy{##1.##2p##3,##4,##5}%
+      \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
       \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
   \else\cb@pdftexerror\fi\fi\fi}
 %    \end{macrocode}
@@ -834,14 +838,23 @@
 %    \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}
 %    \begin{macrocode}
     \gdef\cb@pdfxy##1##2##3##4##5{%
-      \immediate\write\cb@writexy{##1.##2p##3,##4,##5}%
+      \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
       \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
     \gdef\sec@nd@ftw@##1 ##2{##2}
   \fi}
 %    \end{macrocode}
 %
+%    Give a warning if we cannot support the \Lopt{xetex} option.
+%    \begin{macrocode}
+\def\cb@xetexerror{\PackageError
+      {changebar}%
+      {XeTeX option cannot be used}%
+      {You are not using XeLaTeX}}
+%    \end{macrocode}
+%
 % \begin{changebar}
 %    \begin{macrocode}
 \DeclareOption{luaTeX}{\cb@luatexcheck}
@@ -865,9 +878,10 @@
 %    \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}
 %    \begin{macrocode}
     \gdef\cb@pdfxy##1##2##3##4##5{%
-      \immediate\write\cb@writexy{##1.##2p##3,##4,##5}%
+      \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
       \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
   \fi}
 %    \end{macrocode}
@@ -1451,10 +1465,11 @@
 %    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}
 %    \begin{macrocode}
-  \def\cb@pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+  \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}}%
+      \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb@pdfx{##5sp}%
@@ -1506,7 +1521,7 @@
 %    The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
 %    from the \file{.cb2} file.
 %    \begin{macrocode}
-  \def\cb@pdfparsexy##1.##2p##3,##4,##5pt{%
+  \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
     \def\cb@pdfpg{##2}}%
 %    \end{macrocode}
 % \end{macro}
@@ -1623,12 +1638,12 @@
   \gdef\cb@checkPdfxy##1##2##3##4##5{%
     \cb@@findpdfpoint{##1}{##2}%
 %    \end{macrocdode}
-%\begin{changebar}
+% \begin{changebar}
 %    \begin{macrocode
     \ifdim##3sp=\cb@pdfx\relax
       \ifdim##4sp=\cb@pdfy\relax
 %    \end{macrocdode}
-%\end{changebar}
+% \end{changebar}
 %    \begin{macrocode
         \ifdim##5=\cb@pdfz\relax
         \else
@@ -1727,10 +1742,11 @@
 %    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}
 %    \begin{macrocode}
-  \def\cb@pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+  \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}}%
+      \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb@pdfx{##5sp}%
@@ -1782,7 +1798,7 @@
 %    The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
 %    from the \file{.cb2} file.
 %    \begin{macrocode}
-  \def\cb@pdfparsexy##1.##2p##3,##4,##5pt{%
+  \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
     \def\cb@pdfpg{##2}}%
 %    \end{macrocode}
 % \end{macro}
@@ -1932,9 +1948,7 @@
   \immediate\closeout\cb@writexy
   \immediate\openin\cb@readxy=\jobname.cb2\relax
 %    \end{macrocode}
-%  \end{changebar}
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@pdfpoints}
 % \begin{macro}{\cb@pdfpagenr}
 %   The |\cb@pdfpoints| macro contains the list of coordinates of points
@@ -1946,9 +1960,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-%  \end{changebar}
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@findpdfpoint}
 %    The |\cb@findpdfpoint| macro finds the coordinates of point \#1 on
 %    pagecount \#2. First we expand the arguments to get the real values.
@@ -1960,9 +1972,7 @@
   }
 %    \end{macrocode}
 % \end{macro}
-%  \end{changebar}
 %
-%  \begin{changebar}
 % \begin{macro}{\pdfliteral}
 %    For lua\TeX{} we also mimick PDF\TeX's command |\pdfliteral|.
 %    \begin{macrocode}
@@ -1994,9 +2004,7 @@
   }
 %    \end{macrocode}
 % \end{macro}
-%  \end{changebar}
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@pdffind}
 %    The |\cb@pdffind| recursively searches through |\cb@pdfpoints| to find
 %    point \#1 on pagecount \#2.  |\cb@pdfpoints| contains entries of the
@@ -2005,10 +2013,11 @@
 %    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}
 %    \begin{macrocode}
-  \def\cb@pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+  \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}}%
+      \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb@pdfx{##5sp}%
@@ -2025,9 +2034,7 @@
   }%
 %    \end{macrocode}
 % \end{macro}
-%  \end{changebar}
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@pdfreadxy}
 %    The |\cb@pdfreadxy| macro reads lines from the \file{.cb2} file in
 %    |\cb@pdfpoints| until the pagecount is greater than \#1 or the end of
@@ -2062,13 +2069,11 @@
 %    The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
 %    from the \file{.cb2} file.
 %    \begin{macrocode}
-  \def\cb@pdfparsexy##1.##2p##3,##4,##5pt{%
+  \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
     \def\cb@pdfpg{##2}}%
 %    \end{macrocode}
 % \end{macro}
-%  \end{changebar}
 %
-%  \begin{changebar}
 %     As PDF is not a programming language it does not have any variables to
 %    remember the coordinates of the current point. Therefore we write the
 %    information to the \file{.aux} file and read it in in the next run. We
@@ -2091,9 +2096,7 @@
     \cb@trace@defpoint##1##2%
   }%
 %    \end{macrocode}
-%  \end{changebar}  
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@cvtpct}
 %    The macro |\cb@cvtpct| converts a percentage between 0 and 100 to a
 %    decimal fraction.
@@ -2105,9 +2108,7 @@
     0.\the##1\fi\fi\fi}
 %    \end{macrocode}
 %  \end{macro}
-%  \end{changebar}
 %  
-%  \begin{changebar}
 % \begin{macro}{\cb@pdf@scale}
 % \changes{v3.6a}{2018/02/03}{Added macro for scale factor}
 %    In order to get things in the right spot we need a little scaling
@@ -2175,9 +2176,7 @@
     \cb@trace@connect##1##2##3%
   }%
 %    \end{macrocode}
-%  \end{changebar}  
 %
-%  \begin{changebar}
 % \begin{macro}{\cb@checkPdfxy}
 %    The macro |\cb@checkPdfxy| checks if the coordinates of a point have
 %    changed during the current run. If so, we need to rerun \LaTeX.
-- 
cgit v1.2.3

