diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/CATALOG | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/MANIFEST | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf | bin | 0 -> 33692 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf | bin | 0 -> 104033 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest1.tex | 322 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf | bin | 0 -> 33610 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf | bin | 0 -> 103943 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/cbtest2.tex | 322 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/changebar.bug | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/changebar/changebar.pdf | bin | 380646 -> 483766 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/changebar/changebar.dtx | 418 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/changebar/changebar.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/changebar/changebar.sty | 189 |
14 files changed, 1210 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/changebar/CATALOG b/Master/texmf-dist/doc/latex/changebar/CATALOG index a4ecdec11f1..395f902fe27 100644 --- a/Master/texmf-dist/doc/latex/changebar/CATALOG +++ b/Master/texmf-dist/doc/latex/changebar/CATALOG @@ -1,7 +1,7 @@ Name: ChangeBar Problems-To: johannes.braams(at)texniek.nl Author: J.L. Braams -Version: 3.6d +Version: 3.7a Description: diff --git a/Master/texmf-dist/doc/latex/changebar/MANIFEST b/Master/texmf-dist/doc/latex/changebar/MANIFEST index d6394a66b26..aea5dfa1feb 100644 --- a/Master/texmf-dist/doc/latex/changebar/MANIFEST +++ b/Master/texmf-dist/doc/latex/changebar/MANIFEST @@ -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. % diff --git a/Master/texmf-dist/doc/latex/changebar/README b/Master/texmf-dist/doc/latex/changebar/README index ffc63526e75..209e8748d3b 100644 --- a/Master/texmf-dist/doc/latex/changebar/README +++ b/Master/texmf-dist/doc/latex/changebar/README @@ -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 @@ be used to compare two versions of a document and automatically add 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 diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf Binary files differnew file mode 100644 index 00000000000..b15937eb8fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf Binary files differnew file mode 100644 index 00000000000..61b3ca3cd03 --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1.tex b/Master/texmf-dist/doc/latex/changebar/cbtest1.tex new file mode 100644 index 00000000000..040518bbd94 --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest1.tex @@ -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: diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf Binary files differnew file mode 100644 index 00000000000..212f9f8da24 --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf Binary files differnew file mode 100644 index 00000000000..ecca6f17ea6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest2.tex b/Master/texmf-dist/doc/latex/changebar/cbtest2.tex new file mode 100644 index 00000000000..1f53624e4e6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/changebar/cbtest2.tex @@ -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: diff --git a/Master/texmf-dist/doc/latex/changebar/changebar.bug b/Master/texmf-dist/doc/latex/changebar/changebar.bug index bc04f1ca689..aed1dc80a74 100644 --- a/Master/texmf-dist/doc/latex/changebar/changebar.bug +++ b/Master/texmf-dist/doc/latex/changebar/changebar.bug @@ -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@maxpoint=20 seems to help diff --git a/Master/texmf-dist/doc/latex/changebar/changebar.pdf b/Master/texmf-dist/doc/latex/changebar/changebar.pdf Binary files differindex bbe12810887..c12a901d4a6 100644 --- a/Master/texmf-dist/doc/latex/changebar/changebar.pdf +++ b/Master/texmf-dist/doc/latex/changebar/changebar.pdf diff --git a/Master/texmf-dist/source/latex/changebar/changebar.dtx b/Master/texmf-dist/source/latex/changebar/changebar.dtx index b07d80083f2..6f34ad89ec1 100644 --- a/Master/texmf-dist/source/latex/changebar/changebar.dtx +++ b/Master/texmf-dist/source/latex/changebar/changebar.dtx @@ -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,14 +134,15 @@ % 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.}} % % \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} +\DeclareOption{luaTeX}{\cb@luatexcheck} +\DeclareOption{luatex}{\cb@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@luatexcheck{% + \ifx\directlua\@undefined \cb@luatexerror + \else + \global\chardef\cb@driver@setup=8\relax + \ifx\cb@writexy\@undefined + \newwrite\cb@writexy + \newread\cb@readxy + \immediate\openout\cb@writexy=\jobname.cb2\relax + \fi +% \end{macrocode} +% Redefine the |\cb@pdfxy| macro to write point coordinates to the +% \file{.cb2} file. % \begin{macrocode} -\def\cb@xetexerror{\PackageError + \gdef\cb@pdfxy##1##2##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} +% +% Give a warning if we cannot support the \Lopt{luatex} option. +% \begin{macrocode} +\def\cb@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,12 +1124,19 @@ % \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 % \verb=\document=. For this purpose the control sequence % \verb=\cb@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@driver@setup=0\relax \ifx\tempa\LN \global\chardef\cb@driver@setup=0\fi @@ -1100,11 +1146,14 @@ \ifx\tempa\Textures \global\chardef\cb@driver@setup=4\fi \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.6a}{2011/04/30}{Added 'XeTeX' option} +% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option} +% \begin{changebar} % \begin{macrocode} - \ifx\tempa\xeTeX \cb@xetexcheck\fi + \ifx\tempa\luaTeX \cb@luatexcheck\fi % \end{macrocode} +% \end{changebar} % \begin{macrocode} \egroup} % \end{macrocode} @@ -1396,14 +1445,16 @@ % % \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 -% form \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt. +% point \#1 on pagecount \#2. |\cb@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@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@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}}% + \def\cb@next{% + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}% \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -1495,6 +1546,15 @@ % \end{macrocode} % \end{macro} % +% \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 +% factor. We define it here. +% \begin{macrocode} +\def\cb@pdf@scale{0.996264009963} +% \end{macrocode} +% \end{macro} +% % The |\cb@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@dima=\cb@pdfz \advance\cb@dima by-\cb@pdfx - \advance\cb@dima by1in - \cb@dima=0.996264009963\cb@dima\relax + \advance\cb@dima by1in% + \cb@dima=\cb@pdf@scale\cb@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@temp{\expandafter\cb@removedim\the\cb@dima\space}% \cb@dima=\cb@pdftopy \advance\cb@dima-\cb@pdfy\relax - \cb@dima=0.996264009963\cb@dima\relax - ##3=0.996264009963##3\relax + \cb@dima=\cb@pdf@scale\cb@dima\relax + ##3=\cb@pdf@scale##3\relax \pdfliteral direct{\expandafter\cb@removedim\the##3 w \cb@temp 0 m \cb@temp \expandafter\cb@removedim\the\cb@dima\space l S Q}% @@ -1650,7 +1710,8 @@ \ifx\cb@pdfpoints\@empty\else \ifnum##2<0\relax \else - \edef\cb@temp{\noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% + \edef\cb@temp{% + \noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% \cb@temp \fi \fi @@ -1661,13 +1722,15 @@ % \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 -% 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@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@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}}% + \def\cb@next{% + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}% \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -1788,7 +1851,7 @@ \begingroup \cb@dima=\cb@pdfz \advance\cb@dima by-\cb@pdfx - \advance\cb@dima by1in + \advance\cb@dima by1in% \cb@dima=\cb@pdf@scale\cb@dima\relax % \end{macrocode} % First we let PDF save the graphics state. Then we generate the color @@ -1831,19 +1894,11 @@ % \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. -% \changes{v3.6c}{2018/03/09}{Use \cs{ifdim} instead of \cs{ifnum} as -% \cs{cb@pdfx} is defined as a dimension} % \begin{macrocode} \gdef\cb@checkPdfxy##1##2##3##4##5{% \cb@@findpdfpoint{##1}{##2}% -% \end{macrocdode} -%\begin{changebar} -% \begin{macrocode \ifdim##3sp=\cb@pdfx\relax \ifdim##4sp=\cb@pdfy\relax -% \end{macrocdode} -%\end{changebar} -% \begin{macrocode \ifdim##5=\cb@pdfz\relax \else \cb@error @@ -1864,6 +1919,294 @@ \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 +% be done in \TeX. |\cb@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@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 +% that have been read in memory from the \file{.cb2} file. The +% |\cb@pdfpagenr| macro contains the next pagecount to be read in. +% \begin{macrocode} + \def\cb@pdfpoints{} + \def\cb@pdfpagenr{0} +% \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. +% \begin{macrocode} + \def\cb@findpdfpoint##1##2{% + \edef\cb@temp + {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}% + \cb@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@pdfx| and |\cb@pdfy|, and |\cb@pdfz| will get +% the x coordinate of the changebar. If the point is unknown, |\cb@pdfx| +% will be set to |\relax|. +% \begin{macrocode} + \def\cb@@findpdfpoint##1##2{% + \ifnum##2<\cb@pdfpagenr\relax\else + \cb@pdfreadxy{##2}% + \fi + \let\cb@pdfx\relax + \ifx\cb@pdfpoints\@empty\else + \ifnum##2<0\relax + \else + \edef\cb@temp{% + \noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% + \cb@temp + \fi + \fi + } +% \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 +% form\\ +% \meta{pointnr}.\meta{pagecount}p\meta{x},\meta{y},\meta{z}pt. +% 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. +% \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}}% + \ifnum ##1=##3 + \ifnum ##2=##4 + \def\cb@pdfx{##5sp}% + \def\cb@pdfy{##6sp}% + \def\cb@pdfz{##7pt}% + \let\cb@next\relax + \gdef\cb@pdfpoints{##9##8}% + \fi + \fi + \ifx\relax##8\relax + \let\cb@next\relax + \fi + \cb@next + }% +% \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 +% the file is reached. This ensures that all entries belonging to the +% current column are in memory. +% \begin{macrocode} + \def\cb@pdfreadxy##1{% + \let\cb@next\relax + \ifeof\cb@readxy + \global\let\cb@pdfpagenr\cb@maxpoint + \else + {\endlinechar=-1\read\cb@readxy to\cb@temp + \ifx\cb@temp\@empty\else + \expandafter\cb@pdfparsexy\cb@temp + \ifnum\cb@pdfpg<0\else + \xdef\cb@pdfpoints{\cb@pdfpoints\cb@temp}% + \cb@trace{PDFpoints=\cb@pdfpoints}% + \global\let\cb@pdfpagenr\cb@pdfpg + \fi + \ifnum\cb@pdfpg>##1\else + \global\def\cb@next{\cb@pdfreadxy{##1}}% + \fi + \fi + }% + \fi + \cb@next + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cb@pdfparsexy} +% 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@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@pagecount| here, not during the write. +% \begin{macrocode} + \def\cb@defpoint##1##2{% + \if@filesw + \begingroup + \edef\point{{\the##1}{\the\cb@pagecount}}% + \let\the=\z@ + \savepos + \edef\cb@temp{\write\@auxout + {\string\cb@pdfxy\point + {\the\lastxpos}{\the\lastypos}{\the##2}}}% + \cb@temp + \endgroup + \fi + \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. +% \begin{macrocode} + \def\cb@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@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@pdf@scale{0.996264009963} +% \end{macrocode} +% \end{macro} +% +% The |\cb@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@connect##1##2##3{% + \cb@findpdfpoint{##1}\cb@pagecount + \ifx\cb@pdfx\relax\cb@rerun + \else + \let\cb@pdftopy\cb@pdfy + \cb@findpdfpoint{##2}\cb@pagecount + \ifx\cb@pdfx\relax\cb@rerun + \else +% \end{macrocode} +% We do everything in a group, so that we can freely use all kinds of +% registers. +% \begin{macrocode} + \begingroup + \cb@dima=\cb@pdfz + \advance\cb@dima by-\cb@pdfx + \advance\cb@dima by1in% + \cb@dima=\cb@pdf@scale\cb@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@current@color\@undefined + \def\cb@temp{\cb@cvtpct\c@changebargrey}% + \pdfliteral{q \cb@temp\space g \cb@temp\space G}% + \else + \pdfliteral{q \cb@current@color}% + \fi + \edef\cb@temp{\expandafter\cb@removedim\the\cb@dima\space}% + \cb@dima=\cb@pdftopy + \advance\cb@dima-\cb@pdfy\relax + \cb@dima=\cb@pdf@scale\cb@dima\relax + ##3=\cb@pdf@scale##3\relax + \pdfliteral{\expandafter\cb@removedim\the##3 w + \cb@temp 0 m + \cb@temp \expandafter\cb@removedim\the\cb@dima\space l S Q}% + \endgroup +% \end{macrocode} +% We look up the two unused points to get them removed from |\cb@pdfpoints|. +% \begin{macrocode} + \cb@cntb=##1\relax + \ifodd\cb@cntb\advance\cb@cntb 1\else\advance\cb@cntb -1\fi + \cb@findpdfpoint\cb@cntb\cb@pagecount + \cb@cntb=##2\relax + \ifodd\cb@cntb\advance\cb@cntb 1\else\advance\cb@cntb -1\fi + \cb@findpdfpoint\cb@cntb\cb@pagecount + \fi + \fi + \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. +% \begin{macrocode} + \gdef\cb@checkPdfxy##1##2##3##4##5{% + \cb@@findpdfpoint{##1}{##2}% + \ifdim##3sp=\cb@pdfx\relax + \ifdim##4sp=\cb@pdfy\relax + \ifdim##5=\cb@pdfz\relax + \else + \cb@error + \fi + \else + \cb@error + \fi + \else + \cb@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@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 % unknown driver a warning is issued and the macros are defined to @@ -1876,15 +2219,16 @@ \let\cb@resetpoints\relax \fi % \end{macrocode} -% The last thing to do is to forget about |\cb@setup@specials|. -% \begin{macrocode} -\global\let\cb@setup@specials\relax} -% \end{macrocode} -% \end{macro} % \end{macro} % \end{macro} % \end{macro} % +% The last thing to do is to forget about |\cb@setup@specials|. +% \begin{macrocode} +\global\let\cb@setup@specials\relax} +% \end{macrocode} +% \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. diff --git a/Master/texmf-dist/source/latex/changebar/changebar.ins b/Master/texmf-dist/source/latex/changebar/changebar.ins index 21a53322235..f9c86c49433 100644 --- a/Master/texmf-dist/source/latex/changebar/changebar.ins +++ b/Master/texmf-dist/source/latex/changebar/changebar.ins @@ -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. -------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/changebar/changebar.sty b/Master/texmf-dist/tex/latex/changebar/changebar.sty index 31b64ec3ccd..7150d4ab383 100644 --- a/Master/texmf-dist/tex/latex/changebar/changebar.sty +++ b/Master/texmf-dist/tex/latex/changebar/changebar.sty @@ -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@maxpoint{80} \def\cb@minpoint{1} \def\cb@nil{0} @@ -135,10 +135,25 @@ \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}} \gdef\sec@nd@ftw@##1 ##2{##2} \fi} -\def\cb@xetexerror{\PackageError +\DeclareOption{luaTeX}{\cb@luatexcheck} +\DeclareOption{luatex}{\cb@luatexcheck} +\def\cb@luatexcheck{% + \ifx\directlua\@undefined \cb@luatexerror + \else + \global\chardef\cb@driver@setup=8\relax + \ifx\cb@writexy\@undefined + \newwrite\cb@writexy + \newread\cb@readxy + \immediate\openout\cb@writexy=\jobname.cb2\relax + \fi + \gdef\cb@pdfxy##1##2##3##4##5{% + \immediate\write\cb@writexy{##1.##2p##3,##4,##5}% + \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}} + \fi} +\def\cb@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@barsplace{1}} \DeclareOption{innerbars}{\def\cb@barsplace{0}} \DeclareOption{leftbars}{\def\cb@barsplace{2}} @@ -225,6 +240,7 @@ \def\VTeX{VTEX}% \def\pdfTeX{PDFTEX}% \def\xeTeX{XETEX} + \def\luaTeX{LUATEX} \global\chardef\cb@driver@setup=0\relax \ifx\tempa\LN \global\chardef\cb@driver@setup=0\fi \ifx\tempa\DVItoPS \global\chardef\cb@driver@setup=1\fi @@ -234,6 +250,7 @@ \ifx\tempa\VTeX \global\chardef\cb@driver@setup=5\fi \ifx\tempa\pdfTeX \cb@pdftexcheck\fi \ifx\tempa\xeTeX \cb@xetexcheck\fi + \ifx\tempa\luaTeX \cb@luatexcheck\fi \egroup} {\def\do{\noexpand\do\noexpand} \xdef\@preamblecmds{\@preamblecmds \do\driver} @@ -364,7 +381,8 @@ \fi } \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}}% + \def\cb@next{% + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}% \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@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@pdf@scale{0.996264009963} \def\cb@connect##1##2##3{% \cb@findpdfpoint{##1}\cb@pagecount \ifx\cb@pdfx\relax\cb@rerun @@ -432,8 +451,8 @@ \begingroup \cb@dima=\cb@pdfz \advance\cb@dima by-\cb@pdfx - \advance\cb@dima by1in - \cb@dima=0.996264009963\cb@dima\relax + \advance\cb@dima by1in% + \cb@dima=\cb@pdf@scale\cb@dima\relax \ifx\cb@current@color\@undefined \def\cb@temp{\cb@cvtpct\c@changebargrey}% \pdfliteral{q \cb@temp\space g \cb@temp\space G}% @@ -443,8 +462,8 @@ \edef\cb@temp{\expandafter\cb@removedim\the\cb@dima\space}% \cb@dima=\cb@pdftopy \advance\cb@dima-\cb@pdfy\relax - \cb@dima=0.996264009963\cb@dima\relax - ##3=0.996264009963##3\relax + \cb@dima=\cb@pdf@scale\cb@dima\relax + ##3=\cb@pdf@scale##3\relax \pdfliteral direct{\expandafter\cb@removedim\the##3 w \cb@temp 0 m \cb@temp \expandafter\cb@removedim\the\cb@dima\space l S Q}% @@ -495,13 +514,15 @@ \ifx\cb@pdfpoints\@empty\else \ifnum##2<0\relax \else - \edef\cb@temp{\noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% + \edef\cb@temp{% + \noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% \cb@temp \fi \fi } \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}}% + \def\cb@next{% + \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}% \ifnum ##1=##3 \ifnum ##2=##4 \def\cb@pdfx{##5sp}% @@ -570,7 +591,7 @@ \begingroup \cb@dima=\cb@pdfz \advance\cb@dima by-\cb@pdfx - \advance\cb@dima by1in + \advance\cb@dima by1in% \cb@dima=\cb@pdf@scale\cb@dima\relax \ifx\cb@current@color\@undefined \def\cb@temp{\cb@cvtpct\c@changebargrey}% @@ -615,6 +636,146 @@ } \def\cb@maxpoint{9999999} \let\cb@resetpoints\relax +\or + \immediate\closeout\cb@writexy + \immediate\openin\cb@readxy=\jobname.cb2\relax + \def\cb@pdfpoints{} + \def\cb@pdfpagenr{0} + \def\cb@findpdfpoint##1##2{% + \edef\cb@temp + {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}% + \cb@temp + } + \def\pdfliteral##1{\pdfextension literal {##1}} + \def\cb@@findpdfpoint##1##2{% + \ifnum##2<\cb@pdfpagenr\relax\else + \cb@pdfreadxy{##2}% + \fi + \let\cb@pdfx\relax + \ifx\cb@pdfpoints\@empty\else + \ifnum##2<0\relax + \else + \edef\cb@temp{% + \noexpand\cb@pdffind{##1}{##2}\cb@pdfpoints\relax{}}% + \cb@temp + \fi + \fi + } + \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}}% + \ifnum ##1=##3 + \ifnum ##2=##4 + \def\cb@pdfx{##5sp}% + \def\cb@pdfy{##6sp}% + \def\cb@pdfz{##7pt}% + \let\cb@next\relax + \gdef\cb@pdfpoints{##9##8}% + \fi + \fi + \ifx\relax##8\relax + \let\cb@next\relax + \fi + \cb@next + }% + \def\cb@pdfreadxy##1{% + \let\cb@next\relax + \ifeof\cb@readxy + \global\let\cb@pdfpagenr\cb@maxpoint + \else + {\endlinechar=-1\read\cb@readxy to\cb@temp + \ifx\cb@temp\@empty\else + \expandafter\cb@pdfparsexy\cb@temp + \ifnum\cb@pdfpg<0\else + \xdef\cb@pdfpoints{\cb@pdfpoints\cb@temp}% + \cb@trace{PDFpoints=\cb@pdfpoints}% + \global\let\cb@pdfpagenr\cb@pdfpg + \fi + \ifnum\cb@pdfpg>##1\else + \global\def\cb@next{\cb@pdfreadxy{##1}}% + \fi + \fi + }% + \fi + \cb@next + }% + \def\cb@pdfparsexy##1.##2p##3,##4,##5pt{% + \def\cb@pdfpg{##2}}% + \def\cb@defpoint##1##2{% + \if@filesw + \begingroup + \edef\point{{\the##1}{\the\cb@pagecount}}% + \let\the=\z@ + \savepos + \edef\cb@temp{\write\@auxout + {\string\cb@pdfxy\point + {\the\lastxpos}{\the\lastypos}{\the##2}}}% + \cb@temp + \endgroup + \fi + \cb@trace@defpoint##1##2% + }% + \def\cb@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@pdf@scale{0.996264009963} + \def\cb@connect##1##2##3{% + \cb@findpdfpoint{##1}\cb@pagecount + \ifx\cb@pdfx\relax\cb@rerun + \else + \let\cb@pdftopy\cb@pdfy + \cb@findpdfpoint{##2}\cb@pagecount + \ifx\cb@pdfx\relax\cb@rerun + \else + \begingroup + \cb@dima=\cb@pdfz + \advance\cb@dima by-\cb@pdfx + \advance\cb@dima by1in% + \cb@dima=\cb@pdf@scale\cb@dima\relax + \ifx\cb@current@color\@undefined + \def\cb@temp{\cb@cvtpct\c@changebargrey}% + \pdfliteral{q \cb@temp\space g \cb@temp\space G}% + \else + \pdfliteral{q \cb@current@color}% + \fi + \edef\cb@temp{\expandafter\cb@removedim\the\cb@dima\space}% + \cb@dima=\cb@pdftopy + \advance\cb@dima-\cb@pdfy\relax + \cb@dima=\cb@pdf@scale\cb@dima\relax + ##3=\cb@pdf@scale##3\relax + \pdfliteral{\expandafter\cb@removedim\the##3 w + \cb@temp 0 m + \cb@temp \expandafter\cb@removedim\the\cb@dima\space l S Q}% + \endgroup + \cb@cntb=##1\relax + \ifodd\cb@cntb\advance\cb@cntb 1\else\advance\cb@cntb -1\fi + \cb@findpdfpoint\cb@cntb\cb@pagecount + \cb@cntb=##2\relax + \ifodd\cb@cntb\advance\cb@cntb 1\else\advance\cb@cntb -1\fi + \cb@findpdfpoint\cb@cntb\cb@pagecount + \fi + \fi + \cb@trace@connect##1##2##3% + }% + \gdef\cb@checkPdfxy##1##2##3##4##5{% + \cb@@findpdfpoint{##1}{##2}% + \ifdim##3sp=\cb@pdfx\relax + \ifdim##4sp=\cb@pdfy\relax + \ifdim##5=\cb@pdfz\relax + \else + \cb@error + \fi + \else + \cb@error + \fi + \else + \cb@error + \fi + } + \def\cb@maxpoint{9999999} + \let\cb@resetpoints\relax \else \PackageWarning{Changebar}{changebars not supported in unknown setup} \def\cb@defpoint##1##2{\cb@trace@defpoint##1##2} |