texlive[69220] Master/texmf-dist: changebar (26dec23)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 26 22:02:15 CET 2023


Revision: 69220
          https://tug.org/svn/texlive?view=revision&revision=69220
Author:   karl
Date:     2023-12-26 22:02:15 +0100 (Tue, 26 Dec 2023)
Log Message:
-----------
changebar (26dec23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/changebar/CATALOG
    trunk/Master/texmf-dist/doc/latex/changebar/MANIFEST
    trunk/Master/texmf-dist/doc/latex/changebar/README
    trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug
    trunk/Master/texmf-dist/doc/latex/changebar/changebar.pdf
    trunk/Master/texmf-dist/source/latex/changebar/changebar.dtx
    trunk/Master/texmf-dist/source/latex/changebar/changebar.ins
    trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest1.tex
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
    trunk/Master/texmf-dist/doc/latex/changebar/cbtest2.tex

Modified: trunk/Master/texmf-dist/doc/latex/changebar/CATALOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/CATALOG	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/CATALOG	2023-12-26 21:02:15 UTC (rev 69220)
@@ -1,7 +1,7 @@
 Name: ChangeBar
 Problems-To: johannes.braams(at)texniek.nl
 Author: J.L. Braams
-Version: 3.6d
+Version: 3.7a
 
 Description:
 

Modified: trunk/Master/texmf-dist/doc/latex/changebar/MANIFEST
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/MANIFEST	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/MANIFEST	2023-12-26 21:02:15 UTC (rev 69220)
@@ -6,7 +6,7 @@
 %                    change bars to a document. Relies on \specials.
 %
 % changebar.pdf   -- The printed version of the package, including
-%                    a description of the use of the amcroś.
+%                    a description of the use of the macro's.
 %
 % changebar.ins   -- The installation script.
 %

Modified: trunk/Master/texmf-dist/doc/latex/changebar/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/README	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/README	2023-12-26 21:02:15 UTC (rev 69220)
@@ -1,6 +1,6 @@
                                changebar bundle
 
-                                 May 06, 2022
+                              December 24, 2023
 
 This bundle contains a package that I maintain to add changebars to a
 LaTeX document.
@@ -14,7 +14,7 @@
 the changebars.
 The file chbar.1, also contributed, documents the workings of chbar.sh
 
-Copyright (C) 2022 Johannes L. Braams johannes.braams(at)texniek.nl
+Copyright (C) 2023 Johannes L. Braams johannes.braams(at)texniek.nl
 
 This program can be redistributed and/or modified under the terms
 of the LaTeX Project Public License Distributed from CTAN

Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf	2023-12-26 21:02:15 UTC (rev 69220)

Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf	2023-12-26 21:02:15 UTC (rev 69220)

Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest1.tex	2023-12-26 21:02:15 UTC (rev 69220)
@@ -0,0 +1,322 @@
+\documentclass[12pt,twoside]{article}
+\usepackage{amsmath}
+\usepackage[outerbars,color]{changebar}
+\ifx\pdfoutput\undefined
+\else\ifnum\pdfoutput>0
+  \usepackage{pdfcolmk}
+\fi\fi
+
+%\setcounter{changebargrey}{60}
+\cbcolor{red}
+
+\usepackage{fancyhdr}
+
+%Header-footer instructions
+\pagestyle{fancy}
+\setlength{\headheight}{15pt}
+\lhead{\scriptsize Changebar test file}
+\chead{}
+\rhead{v3.5}
+\lfoot{Onecolumn text}
+\cfoot{Page \thepage}
+\rfoot{}
+\renewcommand{\headrulewidth}{0.4pt} %print a rule below the header
+\renewcommand{\footrulewidth}{0.4pt} %print a rule above the footer
+
+\setcounter{page}{16}
+\setlength{\emergencystretch}{4em}
+
+\begin{document}
+
+%\tableofcontents
+
+\title{CHANGEBAR TEST FILE \\FOR ADVANCED FEATURES}
+\author{Piet van Oostrum}
+\maketitle
+
+\raggedbottom
+
+\begin {abstract}
+
+This file tests various advanced features of the changebar package.
+\cbstart\textcolor{red}{\textbf{Text that should have a changebar is
+  printed in red, so that it can easily be checked that the changebars are
+  in the proper position.} This changebar should be on the left.
+\cbend}
+
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+\end{abstract}
+
+\newpage
+
+This file tests various advanced features of the changebar package.
+\cbstart\textcolor{red}{Text that should have a changebar (like this) is
+  printed in red, so that it can easily be checked that the changebars are
+  in the proper position.On this page, the changebar should be on the right.
+\cbend}
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+\cbstart[3mm] \textcolor{red}{Here is a thicker changebar. Text that should
+  have a changebar (like this) is printed in red, so that it can easily be
+  checked that the changebars are in the proper position.On this page, the
+  changebar should be on the right. We also include a formula with large
+  descenders which should be completely covered by the changebar:
+  $\displaystyle \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cdots}}}$
+  \cbend}
+
+\twocolumn
+\lfoot{Twocolumn page}
+
+\section{Introduction}
+
+\cbstart
+\color{red}
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+\cbend
+\color{black}
+
+\begin{figure}
+  \centering 
+  \cbstart \color{red} 
+  \fbox{
+    \parbox{0.8\linewidth}{
+      This is a figure. It has its
+      own changebar. This is a figure. This is a figure. It has its own
+      changebar. This is a figure. This is a figure. It has its own
+      changebar. This is a figure. This is a figure.\cbend}}
+  \color{black} 
+  \caption{This is a test figure}
+\end{figure}
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+\cbstart
+\color{red}
+Sections that have been added or modified are marked with a bar in
+the  margins. This is a small paragraph that crosses a column boundary. It
+should have a changebar in both parts.\cbend
+\color{black}
+
+\section{Continuation}
+\cbstart
+\color{red}
+
+\begin{figure}
+\centering
+\color{red}
+  \fbox{
+    \parbox{0.8\linewidth}{ This is a figure. It inherits a changebar from
+      the environment. This is a figure. This is a figure. This is a
+      figure. This is a figure. It inherits a changebar from the
+      environment. This is a figure. This is a figure.}}
+\caption{This is a test figure}
+\color{black}
+\end{figure}
+\cbend
+\color{black}
+
+\begin{figure}[p]
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\cbstart \color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+  }} \cbend\color{black}
+  \caption{Test figure}
+\end{figure}
+
+\color{red}
+\cbstart
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+\enlargethispage{1cm}
+\subsection{Enlarged column}
+
+\noindent\parbox{\linewidth}{%
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+\\
+\textbf{This column is enlarged, therefore its extends in the footer. 
+The changebar should also cover the extended text.}}
+
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+\section*{Specific issues}
+
+\addtocounter{page}{1}
+\textbf{Here we change the page number (skipping one page). Therefore we
+  have two even pages in a row. The page change is in the righthand column
+  which is not proper LaTeX coding, but it should be handled properly.}
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar. \cbend
+\color{black} The last sentence of this part is outside the changebar.
+\\[1ex]
+
+\color{red}\cbstart
+\noindent\fbox{\parbox[t]{0.95\linewidth}{%
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+}}\cbend\color{black}
+\\[2cm]
+There should be a lonely figure with a changebar at the right.
+\end{document}
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: 


Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf	2023-12-26 21:02:15 UTC (rev 69220)

Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf	2023-12-26 21:02:15 UTC (rev 69220)

Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/cbtest2.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/changebar/cbtest2.tex	2023-12-26 21:02:15 UTC (rev 69220)
@@ -0,0 +1,322 @@
+\documentclass[12pt,twoside]{article}
+\usepackage{amsmath}
+\usepackage[outerbars,xcolor]{changebar}
+\ifx\pdfoutput\undefined
+\else\ifnum\pdfoutput>0
+  \usepackage{pdfcolmk}
+\fi\fi
+
+%\setcounter{changebargrey}{60}
+\cbcolor{red}
+
+\usepackage{fancyhdr}
+
+%Header-footer instructions
+\pagestyle{fancy}
+\setlength{\headheight}{15pt}
+\lhead{\scriptsize Changebar test file}
+\chead{}
+\rhead{v3.5}
+\lfoot{Onecolumn text}
+\cfoot{Page \thepage}
+\rfoot{}
+\renewcommand{\headrulewidth}{0.4pt} %print a rule below the header
+\renewcommand{\footrulewidth}{0.4pt} %print a rule above the footer
+
+\setcounter{page}{16}
+\setlength{\emergencystretch}{4em}
+
+\begin{document}
+
+%\tableofcontents
+
+\title{CHANGEBAR TEST FILE \\FOR ADVANCED FEATURES}
+\author{Piet van Oostrum}
+\maketitle
+
+\raggedbottom
+
+\begin {abstract}
+
+This file tests various advanced features of the changebar package.
+\cbstart\textcolor{red}{\textbf{Text that should have a changebar is
+  printed in red, so that it can easily be checked that the changebars are
+  in the proper position.} This changebar should be on the left.
+\cbend}
+
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+\end{abstract}
+
+\newpage
+
+This file tests various advanced features of the changebar package.
+\cbstart\textcolor{red}{Text that should have a changebar (like this) is
+  printed in red, so that it can easily be checked that the changebars are
+  in the proper position.On this page, the changebar should be on the right.
+\cbend}
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+\cbstart[3mm] \textcolor{red}{Here is a thicker changebar. Text that should
+  have a changebar (like this) is printed in red, so that it can easily be
+  checked that the changebars are in the proper position.On this page, the
+  changebar should be on the right. We also include a formula with large
+  descenders which should be completely covered by the changebar:
+  $\displaystyle \cfrac{1}{2+\cfrac{1}{3+\cfrac{1}{4+\cdots}}}$
+  \cbend}
+
+\twocolumn
+\lfoot{Twocolumn page}
+
+\section{Introduction}
+
+\cbstart
+\color{red}
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+\cbend
+\color{black}
+
+\begin{figure}
+  \centering 
+  \cbstart \color{red} 
+  \fbox{
+    \parbox{0.8\linewidth}{
+      This is a figure. It has its
+      own changebar. This is a figure. This is a figure. It has its own
+      changebar. This is a figure. This is a figure. It has its own
+      changebar. This is a figure. This is a figure.\cbend}}
+  \color{black} 
+  \caption{This is a test figure}
+\end{figure}
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+
+\cbstart
+\color{red}
+Sections that have been added or modified are marked with a bar in
+the  margins. This is a small paragraph that crosses a column boundary. It
+should have a changebar in both parts.\cbend
+\color{black}
+
+\section{Continuation}
+\cbstart
+\color{red}
+
+\begin{figure}
+\centering
+\color{red}
+  \fbox{
+    \parbox{0.8\linewidth}{ This is a figure. It inherits a changebar from
+      the environment. This is a figure. This is a figure. This is a
+      figure. This is a figure. It inherits a changebar from the
+      environment. This is a figure. This is a figure.}}
+\caption{This is a test figure}
+\color{black}
+\end{figure}
+\cbend
+\color{black}
+
+\begin{figure}[p]
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+    This is a figure. This is a figure. This is a figure. This is a figure.
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\cbstart \color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+    This is a figure. It has its own changebar. This is a figure. It has
+    its own changebar. 
+  }} \cbend\color{black}
+  \caption{Test figure}
+\end{figure}
+
+\color{red}
+\cbstart
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+\enlargethispage{1cm}
+\subsection{Enlarged column}
+
+\noindent\parbox{\linewidth}{%
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+\\
+\textbf{This column is enlarged, therefore its extends in the footer. 
+The changebar should also cover the extended text.}}
+
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+\section*{Specific issues}
+
+\addtocounter{page}{1}
+\textbf{Here we change the page number (skipping one page). Therefore we
+  have two even pages in a row. The page change is in the righthand column
+  which is not proper LaTeX coding, but it should be handled properly.}
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar.
+
+This file tests various advanced features of the changebar package.
+This file contains the following features which in combinations used to
+give problems in  versions of changebar before version 3.5:
+Twoside document, onecolumn and towcolumn text, figures, columns of
+figures, page changes in the midst of a document.
+It should work both with latex, followed by a supported Postscript driver,
+and with pdflatex.
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+\begin{figure}[p]
+\color{red}
+\centering  \fbox{\parbox{.9\linewidth}{
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+    This is a figure. It has a changebar from the environment. This is a
+    figure. It has a changebar from the environment. 
+  }} 
+  \caption{Test figure}
+\end{figure}
+
+This part contains a changebar that crosses several column and page
+boundaries. Please note that it crosses several figures also but those have
+their own changebars (or not), they do not fall inside the continuation
+changebar. \cbend
+\color{black} The last sentence of this part is outside the changebar.
+\\[1ex]
+
+\color{red}\cbstart
+\noindent\fbox{\parbox[t]{0.95\linewidth}{%
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+This is a parbox. It should have a changebar along its total height.
+}}\cbend\color{black}
+\\[2cm]
+There should be a lonely figure with a changebar at the right.
+\end{document}
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: 


Property changes on: trunk/Master/texmf-dist/doc/latex/changebar/cbtest2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug	2023-12-26 21:02:15 UTC (rev 69220)
@@ -201,10 +201,12 @@
 %       an extra page at the end of the document, filled with "spsp"
 %
 % v3.6d JLB: Added \relax at the end of \openin statements in order to
-%         prevent teX from looking too far ahead.
+%         prevent TeX from looking too far ahead.
 %
+% v3.7a JLB: Added support for LuaTeX based on the pdfTEX and XeTeX code
+%
 % Known problems
-%        - changebars for mmarginal paragraphs collide with changebars
+%        - changebars for marginal paragraphs collide with changebars
 %          for the main body of text
 %        - With PostScript a dictstack overflow seems to occur with
 %          many changebars. cb at maxpoint=20 seems to help

Modified: trunk/Master/texmf-dist/doc/latex/changebar/changebar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/changebar/changebar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/changebar/changebar.dtx	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/source/latex/changebar/changebar.dtx	2023-12-26 21:02:15 UTC (rev 69220)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%% Copyright 1994-2022 (C) Johannes Braams.  All rights reserved.
+%% Copyright 1994-2023 (C) Johannes Braams.  All rights reserved.
 %
 % This file is part of the changebar package.
 % -------------------------------------------
@@ -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{2594}
+% \CheckSum{2949}
 %
 %\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}
-           [2022-05-06 v3.6d Indicate changes with marginal bars]
+           [2023/12/24 v3.7a Indicate changes with marginal bars]
 %    \end{macrocode}
 %
 % \section{A driver for this document}
@@ -52,7 +52,7 @@
 %    \begin{macrocode}
 %<*driver>
 \documentclass{ltxdoc}
-\usepackage[pdftex,rightbars,color]{changebar}
+\usepackage[pdftex,rightbars,color,traceon,tracestacks]{changebar}
 \cbcolor{red}
 \DoNotIndex{\@@,\@Esphack,\@Mii,\@cons,\@empty,\@gobble}
 \DoNotIndex{\@ifundefined,\@ne,\@spaces,\@whilenum}
@@ -134,7 +134,8 @@
 %    Apostolos Syropoulos}
 % \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}
+% 
 % \title{The Changebar package
 %         \thanks{This file has version number \fileversion,
 %                 last revised \filedate.}}
@@ -141,7 +142,7 @@
 %
 % \author{Michael Fine\\Distributed Systems Architecture \and
 %         Johannes Braams\\
-%         \texttt{texniek at braams.xs4all.nl}}
+%         \texttt{johannes.braams at texniek.nl}}
 %
 % \date{Printed \today}
 %
@@ -224,7 +225,11 @@
 %      \item PDF\TeX
 % \changes{v3.6a}{2011/04/30}{XeTeX added}
 %      \item Xe\TeX
-%    \end{itemize}
+% \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.
 %    Since version 3.4d the driver can be specified in a configuration
@@ -733,6 +738,7 @@
 %    |\usepackage| call.
 % \changes{v3.5a}{2005/05/23}{Added the option \Lopt{PDFTeX}}
 % \changes{v3.6a}{2011/04/30}{Added the option \Lopt{XeTeX}}
+% \changes{v3.6e}{2023/08/13}{Added the option \Lopt{luaTeX}}
 %    Possible choices are:
 %    \begin{itemize}
 %    \item DVItoLN03
@@ -743,6 +749,8 @@
 %    \item V\TeX
 %    \item PDF\TeX
 %    \item Xe\TeX
+%
+%    \cbstart\item luaTeX\cbend
 %    \end{itemize}
 %
 %    The intent is that the driver names should be case-insensitive,
@@ -834,13 +842,44 @@
   \fi}
 %    \end{macrocode}
 %
-%    Give a warning if we cannot support the \Lopt{xetex} option.
+% \begin{changebar}
 %    \begin{macrocode}
-\def\cb at xetexerror{\PackageError
+\DeclareOption{luaTeX}{\cb at luatexcheck}
+\DeclareOption{luatex}{\cb at luatexcheck}
+%    \end{macrocode}
+% \changes{v3.6e}{2023/08/13}{luaTeX support added}
+%    For the \Lopt{luatex} option we have to check that the current
+%    \LaTeX{} run is using lua\TeX{}.
+%    If it is, we initialize the option and open an additional output file.
+%    If not, we ignore the option and issue a warning..
+%    \begin{macrocode}
+\def\cb at luatexcheck{%
+  \ifx\directlua\@undefined \cb at luatexerror
+  \else
+    \global\chardef\cb at driver@setup=8\relax
+    \ifx\cb at writexy\@undefined
+      \newwrite\cb at writexy
+      \newread\cb at readxy
+      \immediate\openout\cb at writexy=\jobname.cb2\relax
+    \fi
+%    \end{macrocode}
+%    Redefine the |\cb at pdfxy| macro to write point coordinates to the
+%    \file{.cb2} file.
+%    \begin{macrocode}
+    \gdef\cb at pdfxy##1##2##3##4##5{%
+      \immediate\write\cb at writexy{##1.##2p##3,##4,##5}%
+      \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
+  \fi}
+%    \end{macrocode}
+%
+%    Give a warning if we cannot support the \Lopt{luatex} option.
+%    \begin{macrocode}
+\def\cb at luatexerror{\PackageError
       {changebar}%
-      {XeTeX option cannot be used}%
-      {You are not using XeLaTeX}}
+      {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.
@@ -1085,6 +1124,12 @@
 %    \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 at setup@specials= that will be called from within
@@ -1091,6 +1136,7 @@
 %    \verb=\document=. For this purpose the control sequence
 %    \verb=\cb at driver@setup= is used. It receives a numeric value
 %    using \verb=\chardef=. 
+% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
 %    \begin{macrocode}
       \global\chardef\cb at driver@setup=0\relax
       \ifx\tempa\LN       \global\chardef\cb at driver@setup=0\fi
@@ -1100,11 +1146,14 @@
       \ifx\tempa\Textures \global\chardef\cb at driver@setup=4\fi
       \ifx\tempa\VTeX     \global\chardef\cb at driver@setup=5\fi
       \ifx\tempa\pdfTeX   \cb at pdftexcheck\fi
+      \ifx\tempa\xeTeX    \cb at xetexcheck\fi
 %    \end{macrocode}
-% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
+% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option}
+% \begin{changebar}
 %    \begin{macrocode}
-      \ifx\tempa\xeTeX    \cb at xetexcheck\fi
+      \ifx\tempa\luaTeX   \cb at luatexcheck\fi
 %    \end{macrocode}
+% \end{changebar}   
 %    \begin{macrocode}
     \egroup}
 %    \end{macrocode}
@@ -1396,14 +1445,16 @@
 %
 % \begin{macro}{\cb at pdffind}
 %    The |\cb at pdffind| recursively searches through |\cb at pdfpoints| to find
-%    point \#1 on pagecount \#2.  |\cb at pdfpoints| contains entries of the
-%    form \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt.
+%    point \#1 on pagecount \#2. |\cb at pdfpoints| contains entries of the
+%    form\\
+%    \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt.
 %    When the point is found it is removed from |\cb at pdfpoints|. \#9
 %    contains the cumulative head of the list to construct the new list
 %    with the entry removed. \#3--\#8 are for pattern matching.
 %    \begin{macrocode}
   \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
-    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb at pdfx{##5sp}%
@@ -1495,6 +1546,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\cb at 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
+%    factor. We define it here.
+%    \begin{macrocode}
+\def\cb at pdf@scale{0.996264009963}
+%    \end{macrocode}
+% \end{macro}
+%
 %    The |\cb at connect| finds the coordinates of the begin and end points,
 %    converts them to PDF units and draws the bar with |\pdfliteral|. It
 %    also sets the color or gray level, if necessary. When any of the
@@ -1515,8 +1575,8 @@
          \begingroup
            \cb at dima=\cb at pdfz
            \advance\cb at dima by-\cb at pdfx
-           \advance\cb at dima by1in
-           \cb at dima=0.996264009963\cb at dima\relax
+           \advance\cb at dima by1in%
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
 %    \end{macrocode}
 %    First we let PDF save the graphics state. Then we generate the color
 %    selection code followed by the code to draw the changebar. Finally the
@@ -1533,8 +1593,8 @@
            \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
            \cb at dima=\cb at pdftopy
            \advance\cb at dima-\cb at pdfy\relax
-           \cb at dima=0.996264009963\cb at dima\relax
-           ##3=0.996264009963##3\relax
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+           ##3=\cb at pdf@scale##3\relax
            \pdfliteral direct{\expandafter\cb at removedim\the##3 w
              \cb at temp 0 m
              \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
@@ -1650,7 +1710,8 @@
     \ifx\cb at pdfpoints\@empty\else
       \ifnum##2<0\relax
       \else
-        \edef\cb at temp{\noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \edef\cb at temp{%
+          \noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
         \cb at temp
       \fi
     \fi
@@ -1661,13 +1722,15 @@
 % \begin{macro}{\cb at pdffind}
 %    The |\cb at pdffind| recursively searches through |\cb at pdfpoints| to find
 %    point \#1 on pagecount \#2.  |\cb at pdfpoints| contains entries of the
-%    form \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt.
+%    form\\
+%    \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt.
 %    When the point is found it is removed from |\cb at pdfpoints|. \#9
 %    contains the cumulative head of the list to construct the new list
 %    with the entry removed. \#3--\#8 are for pattern matching.
 %    \begin{macrocode}
   \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
-    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb at pdfx{##5sp}%
@@ -1788,7 +1851,7 @@
          \begingroup
            \cb at dima=\cb at pdfz
            \advance\cb at dima by-\cb at pdfx
-           \advance\cb at dima by1in
+           \advance\cb at dima by1in%
            \cb at dima=\cb at pdf@scale\cb at dima\relax
 %    \end{macrocode}
 %    First we let PDF save the graphics state. Then we generate the color
@@ -1831,19 +1894,11 @@
 % \begin{macro}{\cb at checkPdfxy}
 %    The macro |\cb at checkPdfxy| checks if the coordinates of a point have
 %    changed during the current run. If so, we need to rerun \LaTeX.
-% \changes{v3.6c}{2018/03/09}{Use \cs{ifdim} instead of \cs{ifnum} as
-%    \cs{cb at pdfx} is defined as a dimension}
 %    \begin{macrocode}
   \gdef\cb at checkPdfxy##1##2##3##4##5{%
     \cb@@findpdfpoint{##1}{##2}%
-%    \end{macrocdode}
-%\begin{changebar}
-%    \begin{macrocode
     \ifdim##3sp=\cb at pdfx\relax
       \ifdim##4sp=\cb at pdfy\relax
-%    \end{macrocdode}
-%\end{changebar}
-%    \begin{macrocode
         \ifdim##5=\cb at pdfz\relax
         \else
         \cb at error
@@ -1864,6 +1919,294 @@
   \let\cb at 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
+%    be done in \TeX. |\cb at defpoint| will write information about the
+%    coordinates of the point to the \file{.aux} file, from where it will
+%    be picked up in the next run. Then we will construct the PDF
+%    code necessary to draw the changebars.
+%    \begin{macrocode}
+\or
+  \immediate\closeout\cb at writexy
+  \immediate\openin\cb at readxy=\jobname.cb2\relax
+%    \end{macrocode}
+%  \end{changebar}
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at pdfpoints}
+% \begin{macro}{\cb at pdfpagenr}
+%   The |\cb at pdfpoints| macro contains the list of coordinates of points
+%   that have been read in memory from the \file{.cb2} file. The
+%   |\cb at pdfpagenr| macro contains the next pagecount to be read in.
+%    \begin{macrocode}
+  \def\cb at pdfpoints{}
+  \def\cb at pdfpagenr{0}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%  \end{changebar}
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at findpdfpoint}
+%    The |\cb at findpdfpoint| macro finds the coordinates of point \#1 on
+%    pagecount \#2. First we expand the arguments to get the real values.
+%    \begin{macrocode}
+  \def\cb at findpdfpoint##1##2{%
+      \edef\cb at temp
+        {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}%
+      \cb at temp
+  }
+%    \end{macrocode}
+% \end{macro}
+%  \end{changebar}
+%
+%  \begin{changebar}
+% \begin{macro}{\pdfliteral}
+%    For lua\TeX{} we also mimick PDF\TeX's command |\pdfliteral|.
+%    \begin{macrocode}
+  \def\pdfliteral##1{\pdfextension literal {##1}}
+%    \end{macrocode}
+% \end{macro}
+%
+%  \begin{macro}{\cb@@findpdfpoint}
+%   The |\cb@@findpdfpoint| macro finds the coordinates of point \#1 on
+%   pagecount \#2. If the information is not yet in memory is it read from
+%   the \file{.cb2} file. The coordinates of the current point in the text
+%   will be delivered in |\cb at pdfx| and |\cb at pdfy|, and |\cb at pdfz| will get
+%   the x coordinate of the changebar. If the point is unknown, |\cb at pdfx|
+%   will be set to |\relax|.
+%    \begin{macrocode}
+  \def\cb@@findpdfpoint##1##2{%
+    \ifnum##2<\cb at pdfpagenr\relax\else
+      \cb at pdfreadxy{##2}%
+    \fi
+    \let\cb at pdfx\relax
+    \ifx\cb at pdfpoints\@empty\else
+      \ifnum##2<0\relax
+      \else
+        \edef\cb at temp{%
+          \noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \cb at temp
+      \fi
+    \fi
+  }
+%    \end{macrocode}
+% \end{macro}
+%  \end{changebar}
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at pdffind}
+%    The |\cb at pdffind| recursively searches through |\cb at pdfpoints| to find
+%    point \#1 on pagecount \#2.  |\cb at pdfpoints| contains entries of the
+%    form\\
+%    \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt.
+%    When the point is found it is removed from |\cb at pdfpoints|. \#9
+%    contains the cumulative head of the list to construct the new list
+%    with the entry removed. \#3--\#8 are for pattern matching.
+%    \begin{macrocode}
+  \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \ifnum ##1=##3
+      \ifnum ##2=##4
+        \def\cb at pdfx{##5sp}%
+        \def\cb at pdfy{##6sp}%
+        \def\cb at pdfz{##7pt}%
+        \let\cb at next\relax
+        \gdef\cb at pdfpoints{##9##8}%
+      \fi
+    \fi
+    \ifx\relax##8\relax
+      \let\cb at next\relax
+    \fi
+    \cb at next
+  }%
+%    \end{macrocode}
+% \end{macro}
+%  \end{changebar}
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at pdfreadxy}
+%    The |\cb at pdfreadxy| macro reads lines from the \file{.cb2} file in
+%    |\cb at pdfpoints| until the pagecount is greater than \#1 or the end of
+%    the file is reached. This ensures that all entries belonging to the
+%    current column are in memory.
+%    \begin{macrocode}
+  \def\cb at pdfreadxy##1{%
+    \let\cb at next\relax
+    \ifeof\cb at readxy
+      \global\let\cb at pdfpagenr\cb at maxpoint
+    \else
+      {\endlinechar=-1\read\cb at readxy to\cb at temp
+        \ifx\cb at temp\@empty\else
+          \expandafter\cb at pdfparsexy\cb at temp
+          \ifnum\cb at pdfpg<0\else
+            \xdef\cb at pdfpoints{\cb at pdfpoints\cb at temp}%
+            \cb at trace{PDFpoints=\cb at pdfpoints}%
+            \global\let\cb at pdfpagenr\cb at pdfpg
+          \fi
+          \ifnum\cb at pdfpg>##1\else
+            \global\def\cb at next{\cb at pdfreadxy{##1}}%
+          \fi
+        \fi
+      }%
+    \fi
+    \cb at next
+  }%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cb at pdfparsexy}
+%    The |\cb at pdfparsexy| macro extracts the pagecount from an entry read in
+%    from the \file{.cb2} file.
+%    \begin{macrocode}
+  \def\cb at pdfparsexy##1.##2p##3,##4,##5pt{%
+    \def\cb at 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
+%    write the x,y coordinates of the current point in the text and the x
+%    coordinate of the change bar. 
+%    We also need the value of |\cb at pagecount| here, not during the write.
+%    \begin{macrocode}
+  \def\cb at defpoint##1##2{%
+    \if at filesw
+      \begingroup
+        \edef\point{{\the##1}{\the\cb at pagecount}}%
+        \let\the=\z@
+        \savepos
+        \edef\cb at temp{\write\@auxout
+          {\string\cb at pdfxy\point
+            {\the\lastxpos}{\the\lastypos}{\the##2}}}%
+        \cb at temp
+      \endgroup
+    \fi
+    \cb at trace@defpoint##1##2%
+  }%
+%    \end{macrocode}
+%  \end{changebar}  
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at cvtpct}
+%    The macro |\cb at cvtpct| converts a percentage between 0 and 100 to a
+%    decimal fraction.
+%    \begin{macrocode}
+  \def\cb at cvtpct##1{%
+    \ifnum##1<0 0\else
+    \ifnum##1>99 1\else
+    \ifnum##1<10 0.0\the##1\else
+    0.\the##1\fi\fi\fi}
+%    \end{macrocode}
+%  \end{macro}
+%  \end{changebar}
+%  
+%  \begin{changebar}
+% \begin{macro}{\cb at 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
+%    factor. We define it here.
+%    \begin{macrocode}
+\def\cb at pdf@scale{0.996264009963}
+%    \end{macrocode}
+% \end{macro}
+%
+%     The |\cb at connect| finds the coordinates of the begin and end points,
+%    converts them to PDF units and draws the bar with |\pdfliteral|. It
+%    also sets the color or gray level, if necessary. When any of the
+%    points is unknown the bar is skipped and a rerun is signalled.
+%    \begin{macrocode}
+  \def\cb at connect##1##2##3{%
+    \cb at findpdfpoint{##1}\cb at pagecount
+    \ifx\cb at pdfx\relax\cb at rerun
+    \else
+      \let\cb at pdftopy\cb at pdfy
+      \cb at findpdfpoint{##2}\cb at pagecount
+      \ifx\cb at pdfx\relax\cb at rerun
+      \else
+%    \end{macrocode}
+%    We do everything in a group, so that we can freely use all kinds of
+%    registers.
+%    \begin{macrocode}
+         \begingroup
+           \cb at dima=\cb at pdfz
+           \advance\cb at dima by-\cb at pdfx
+           \advance\cb at dima by1in%
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+%    \end{macrocode}
+%    First we let PDF save the graphics state. Then we generate the color
+%    selection code followed by the code to draw the changebar. Finally the
+%    graphics state is restored. We cannot use the color commands from the
+%    color package here, as the generated PDF code may be moved to the next
+%    line.
+%    \begin{macrocode}
+           \ifx\cb at current@color\@undefined
+             \def\cb at temp{\cb at cvtpct\c at changebargrey}%
+             \pdfliteral{q \cb at temp\space g \cb at temp\space G}%
+           \else
+             \pdfliteral{q \cb at current@color}%
+           \fi
+           \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
+           \cb at dima=\cb at pdftopy
+           \advance\cb at dima-\cb at pdfy\relax
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+           ##3=\cb at pdf@scale##3\relax
+           \pdfliteral{\expandafter\cb at removedim\the##3 w
+             \cb at temp 0 m
+             \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
+        \endgroup
+%    \end{macrocode}
+%    We look up the two unused points to get them removed from |\cb at pdfpoints|.
+%    \begin{macrocode}
+        \cb at cntb=##1\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+        \cb at cntb=##2\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+      \fi
+    \fi
+    \cb at trace@connect##1##2##3%
+  }%
+%    \end{macrocode}
+%  \end{changebar}  
+%
+%  \begin{changebar}
+% \begin{macro}{\cb at checkPdfxy}
+%    The macro |\cb at checkPdfxy| checks if the coordinates of a point have
+%    changed during the current run. If so, we need to rerun \LaTeX.
+%    \begin{macrocode}
+  \gdef\cb at checkPdfxy##1##2##3##4##5{%
+    \cb@@findpdfpoint{##1}{##2}%
+    \ifdim##3sp=\cb at pdfx\relax
+      \ifdim##4sp=\cb at pdfy\relax
+        \ifdim##5=\cb at pdfz\relax
+        \else
+        \cb at error
+        \fi
+      \else
+        \cb at error
+      \fi
+    \else
+      \cb at error
+    \fi
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+%    For lua\TeX{} we don't need a limit on the number of bar points.
+%    \begin{macrocode}
+  \def\cb at maxpoint{9999999}
+  \let\cb at 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
 %    unknown driver a warning is issued and the macros are defined to
@@ -1876,15 +2219,16 @@
   \let\cb at resetpoints\relax
 \fi
 %    \end{macrocode}
-%    The last thing to do is to forget about |\cb at setup@specials|.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The last thing to do is to forget about |\cb at setup@specials|.
 %    \begin{macrocode}
 \global\let\cb at setup@specials\relax}
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
+% 
 % \begin{macro}{\cbstart}
 %    The macro |\cbstart| starts a new changebar. It has an (optional)
 %    argument that will be used to determine the width of the bar.

Modified: trunk/Master/texmf-dist/source/latex/changebar/changebar.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/changebar/changebar.ins	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/source/latex/changebar/changebar.ins	2023-12-26 21:02:15 UTC (rev 69220)
@@ -10,7 +10,7 @@
 %% 
 %% IMPORTANT NOTICE:
 %% 
-%% Copyright (C) 1994-2018 Johannes Braams,  All rights reserved.
+%% Copyright (C) 1994-2023 Johannes Braams,  All rights reserved.
 %% 
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN
@@ -24,7 +24,7 @@
 \preamble
 This is a generated file.
 
-Copyright (C) 1994-2022 Johannes Braams,  All rights reserved.
+Copyright (C) 1994-2023 Johannes Braams,  All rights reserved.
 
 This file was generated from file(s) of the changebar package.
 --------------------------------------------------------------

Modified: trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty	2023-12-26 17:22:21 UTC (rev 69219)
+++ trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty	2023-12-26 21:02:15 UTC (rev 69220)
@@ -7,7 +7,7 @@
 %% changebar.dtx  (with options: `package')
 %% This is a generated file.
 %% 
-%% Copyright (C) 1994-2022 Johannes Braams,  All rights reserved.
+%% Copyright (C) 1994-2023 Johannes Braams,  All rights reserved.
 %% 
 %% This file was generated from file(s) of the changebar package.
 %% --------------------------------------------------------------
@@ -34,10 +34,10 @@
 %% The list of derived (unpacked) files belonging to the distribution
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
-%% Copyright 1994-2022 (C) Johannes Braams.  All rights reserved.
+%% Copyright 1994-2023 (C) Johannes Braams.  All rights reserved.
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{changebar}
-           [2022-05-06 v3.6d Indicate changes with marginal bars]
+           [2023/12/24 v3.7a Indicate changes with marginal bars]
 \def\cb at maxpoint{80}
 \def\cb at minpoint{1}
 \def\cb at nil{0}
@@ -135,10 +135,25 @@
       \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
     \gdef\sec at nd@ftw@##1 ##2{##2}
   \fi}
-\def\cb at xetexerror{\PackageError
+\DeclareOption{luaTeX}{\cb at luatexcheck}
+\DeclareOption{luatex}{\cb at luatexcheck}
+\def\cb at luatexcheck{%
+  \ifx\directlua\@undefined \cb at luatexerror
+  \else
+    \global\chardef\cb at driver@setup=8\relax
+    \ifx\cb at writexy\@undefined
+      \newwrite\cb at writexy
+      \newread\cb at readxy
+      \immediate\openout\cb at writexy=\jobname.cb2\relax
+    \fi
+    \gdef\cb at pdfxy##1##2##3##4##5{%
+      \immediate\write\cb at writexy{##1.##2p##3,##4,##5}%
+      \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
+  \fi}
+\def\cb at luatexerror{\PackageError
       {changebar}%
-      {XeTeX option cannot be used}%
-      {You are not using XeLaTeX}}
+      {luaTeX option cannot be used}%
+      {You are not using luaLaTeX}}
 \DeclareOption{outerbars}{\def\cb at barsplace{1}}
 \DeclareOption{innerbars}{\def\cb at barsplace{0}}
 \DeclareOption{leftbars}{\def\cb at barsplace{2}}
@@ -225,6 +240,7 @@
       \def\VTeX{VTEX}%
       \def\pdfTeX{PDFTEX}%
       \def\xeTeX{XETEX}
+      \def\luaTeX{LUATEX}
       \global\chardef\cb at driver@setup=0\relax
       \ifx\tempa\LN       \global\chardef\cb at driver@setup=0\fi
       \ifx\tempa\DVItoPS  \global\chardef\cb at driver@setup=1\fi
@@ -234,6 +250,7 @@
       \ifx\tempa\VTeX     \global\chardef\cb at driver@setup=5\fi
       \ifx\tempa\pdfTeX   \cb at pdftexcheck\fi
       \ifx\tempa\xeTeX    \cb at xetexcheck\fi
+      \ifx\tempa\luaTeX   \cb at luatexcheck\fi
     \egroup}
   {\def\do{\noexpand\do\noexpand}
     \xdef\@preamblecmds{\@preamblecmds \do\driver}
@@ -364,7 +381,8 @@
     \fi
   }
   \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
-    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb at pdfx{##5sp}%
@@ -421,6 +439,7 @@
     \ifnum##1>99 1\else
     \ifnum##1<10 0.0\the##1\else
     0.\the##1\fi\fi\fi}
+\def\cb at pdf@scale{0.996264009963}
   \def\cb at connect##1##2##3{%
     \cb at findpdfpoint{##1}\cb at pagecount
     \ifx\cb at pdfx\relax\cb at rerun
@@ -432,8 +451,8 @@
          \begingroup
            \cb at dima=\cb at pdfz
            \advance\cb at dima by-\cb at pdfx
-           \advance\cb at dima by1in
-           \cb at dima=0.996264009963\cb at dima\relax
+           \advance\cb at dima by1in%
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
            \ifx\cb at current@color\@undefined
              \def\cb at temp{\cb at cvtpct\c at changebargrey}%
              \pdfliteral{q \cb at temp\space g \cb at temp\space G}%
@@ -443,8 +462,8 @@
            \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
            \cb at dima=\cb at pdftopy
            \advance\cb at dima-\cb at pdfy\relax
-           \cb at dima=0.996264009963\cb at dima\relax
-           ##3=0.996264009963##3\relax
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+           ##3=\cb at pdf@scale##3\relax
            \pdfliteral direct{\expandafter\cb at removedim\the##3 w
              \cb at temp 0 m
              \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
@@ -495,13 +514,15 @@
     \ifx\cb at pdfpoints\@empty\else
       \ifnum##2<0\relax
       \else
-        \edef\cb at temp{\noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \edef\cb at temp{%
+          \noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
         \cb at temp
       \fi
     \fi
   }
   \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
-    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
     \ifnum ##1=##3
       \ifnum ##2=##4
         \def\cb at pdfx{##5sp}%
@@ -570,7 +591,7 @@
          \begingroup
            \cb at dima=\cb at pdfz
            \advance\cb at dima by-\cb at pdfx
-           \advance\cb at dima by1in
+           \advance\cb at dima by1in%
            \cb at dima=\cb at pdf@scale\cb at dima\relax
            \ifx\cb at current@color\@undefined
              \def\cb at temp{\cb at cvtpct\c at changebargrey}%
@@ -615,6 +636,146 @@
   }
   \def\cb at maxpoint{9999999}
   \let\cb at resetpoints\relax
+\or
+  \immediate\closeout\cb at writexy
+  \immediate\openin\cb at readxy=\jobname.cb2\relax
+  \def\cb at pdfpoints{}
+  \def\cb at pdfpagenr{0}
+  \def\cb at findpdfpoint##1##2{%
+      \edef\cb at temp
+        {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}%
+      \cb at temp
+  }
+  \def\pdfliteral##1{\pdfextension literal {##1}}
+  \def\cb@@findpdfpoint##1##2{%
+    \ifnum##2<\cb at pdfpagenr\relax\else
+      \cb at pdfreadxy{##2}%
+    \fi
+    \let\cb at pdfx\relax
+    \ifx\cb at pdfpoints\@empty\else
+      \ifnum##2<0\relax
+      \else
+        \edef\cb at temp{%
+          \noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \cb at temp
+      \fi
+    \fi
+  }
+  \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+    \def\cb at next{%
+      \cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \ifnum ##1=##3
+      \ifnum ##2=##4
+        \def\cb at pdfx{##5sp}%
+        \def\cb at pdfy{##6sp}%
+        \def\cb at pdfz{##7pt}%
+        \let\cb at next\relax
+        \gdef\cb at pdfpoints{##9##8}%
+      \fi
+    \fi
+    \ifx\relax##8\relax
+      \let\cb at next\relax
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfreadxy##1{%
+    \let\cb at next\relax
+    \ifeof\cb at readxy
+      \global\let\cb at pdfpagenr\cb at maxpoint
+    \else
+      {\endlinechar=-1\read\cb at readxy to\cb at temp
+        \ifx\cb at temp\@empty\else
+          \expandafter\cb at pdfparsexy\cb at temp
+          \ifnum\cb at pdfpg<0\else
+            \xdef\cb at pdfpoints{\cb at pdfpoints\cb at temp}%
+            \cb at trace{PDFpoints=\cb at pdfpoints}%
+            \global\let\cb at pdfpagenr\cb at pdfpg
+          \fi
+          \ifnum\cb at pdfpg>##1\else
+            \global\def\cb at next{\cb at pdfreadxy{##1}}%
+          \fi
+        \fi
+      }%
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfparsexy##1.##2p##3,##4,##5pt{%
+    \def\cb at pdfpg{##2}}%
+  \def\cb at defpoint##1##2{%
+    \if at filesw
+      \begingroup
+        \edef\point{{\the##1}{\the\cb at pagecount}}%
+        \let\the=\z@
+        \savepos
+        \edef\cb at temp{\write\@auxout
+          {\string\cb at pdfxy\point
+            {\the\lastxpos}{\the\lastypos}{\the##2}}}%
+        \cb at temp
+      \endgroup
+    \fi
+    \cb at trace@defpoint##1##2%
+  }%
+  \def\cb at cvtpct##1{%
+    \ifnum##1<0 0\else
+    \ifnum##1>99 1\else
+    \ifnum##1<10 0.0\the##1\else
+    0.\the##1\fi\fi\fi}
+\def\cb at pdf@scale{0.996264009963}
+  \def\cb at connect##1##2##3{%
+    \cb at findpdfpoint{##1}\cb at pagecount
+    \ifx\cb at pdfx\relax\cb at rerun
+    \else
+      \let\cb at pdftopy\cb at pdfy
+      \cb at findpdfpoint{##2}\cb at pagecount
+      \ifx\cb at pdfx\relax\cb at rerun
+      \else
+         \begingroup
+           \cb at dima=\cb at pdfz
+           \advance\cb at dima by-\cb at pdfx
+           \advance\cb at dima by1in%
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+           \ifx\cb at current@color\@undefined
+             \def\cb at temp{\cb at cvtpct\c at changebargrey}%
+             \pdfliteral{q \cb at temp\space g \cb at temp\space G}%
+           \else
+             \pdfliteral{q \cb at current@color}%
+           \fi
+           \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
+           \cb at dima=\cb at pdftopy
+           \advance\cb at dima-\cb at pdfy\relax
+           \cb at dima=\cb at pdf@scale\cb at dima\relax
+           ##3=\cb at pdf@scale##3\relax
+           \pdfliteral{\expandafter\cb at removedim\the##3 w
+             \cb at temp 0 m
+             \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
+        \endgroup
+        \cb at cntb=##1\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+        \cb at cntb=##2\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+      \fi
+    \fi
+    \cb at trace@connect##1##2##3%
+  }%
+  \gdef\cb at checkPdfxy##1##2##3##4##5{%
+    \cb@@findpdfpoint{##1}{##2}%
+    \ifdim##3sp=\cb at pdfx\relax
+      \ifdim##4sp=\cb at pdfy\relax
+        \ifdim##5=\cb at pdfz\relax
+        \else
+        \cb at error
+        \fi
+      \else
+        \cb at error
+      \fi
+    \else
+      \cb at error
+    \fi
+  }
+  \def\cb at maxpoint{9999999}
+  \let\cb at resetpoints\relax
 \else
   \PackageWarning{Changebar}{changebars not supported in unknown setup}
   \def\cb at defpoint##1##2{\cb at trace@defpoint##1##2}



More information about the tex-live-commits mailing list.