texlive[46919] Master/texmf-dist: changebar (11mar18)

commits+karl at tug.org commits+karl at tug.org
Sun Mar 11 21:23:51 CET 2018


Revision: 46919
          http://tug.org/svn/texlive?view=revision&revision=46919
Author:   karl
Date:     2018-03-11 21:23:50 +0100 (Sun, 11 Mar 2018)
Log Message:
-----------
changebar (11mar18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/changebar/CATALOG
    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/tex/latex/changebar/changebar.sty

Modified: trunk/Master/texmf-dist/doc/latex/changebar/CATALOG
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/CATALOG	2018-03-11 20:23:11 UTC (rev 46918)
+++ trunk/Master/texmf-dist/doc/latex/changebar/CATALOG	2018-03-11 20:23:50 UTC (rev 46919)
@@ -1,7 +1,7 @@
 Name: ChangeBar
 Problems-To: texniek(at)braams.xs4all.nl
 Author: J.L. Braams
-Version: 3.6b
+Version: 3.6c
 
 Description:
 

Modified: trunk/Master/texmf-dist/doc/latex/changebar/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/README	2018-03-11 20:23:11 UTC (rev 46918)
+++ trunk/Master/texmf-dist/doc/latex/changebar/README	2018-03-11 20:23:50 UTC (rev 46919)
@@ -1,6 +1,6 @@
                                changebar bundle
 
-                               Februari 04, 2018
+                                March 08, 2018
 
 This bundle contains a package that I maintain to add changebars to a
 LaTeX document.

Modified: trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug	2018-03-11 20:23:11 UTC (rev 46918)
+++ trunk/Master/texmf-dist/doc/latex/changebar/changebar.bug	2018-03-11 20:23:50 UTC (rev 46919)
@@ -196,12 +196,13 @@
 %
 % v3.6b JLB: set changebarsep to 0.5\marginparsewp instead of 30pt 
 %       in order to prevent the changebar crossing a marginal paragraph.
+%
+% v3.6c JLB: changed the definition of \cb at checkPDF in order to prevent 
+%       an extra page at the end of the document, filled with "spsp"
 
 % Known problems
 %        - changebars for mmarginal paragraphs collide with changebars
 %          for the main body of text
-%        - The documentation contains a \clearpage to prevent a weird
-%          problem when processing the .cb2 file. Cause as of yet unknown.
 %        - With PostScript a dictstack overflow seems to occur with
 %          many changebars. cb at maxpoint=20 seems to help
 %        - I have received the file chgbar.sty, which was written by
@@ -213,7 +214,7 @@
 %	   the changebar will not be \changebarsep. Instead, the center of
 %	   the changebar will be aligned with the other changebars. The
 %	   solution to this would be to give an additional parameter to the
-%	   \cb at connect macro to indicat if the bar is on the left or on the
+%	   \cb at connect macro to indicate if the bar is on the left or on the
 %	   right. \cb at connect can then do the proper positioning. In that
 %	   case it is easier not to include the 0.5\changebarwidth
 %	   correction in the calculations in \cb at positions.

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	2018-03-11 20:23:11 UTC (rev 46918)
+++ trunk/Master/texmf-dist/source/latex/changebar/changebar.dtx	2018-03-11 20:23:50 UTC (rev 46919)
@@ -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{2579}
+% \CheckSum{2591}
 %
 %\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}
-           [2018/02/04 v3.6b Indicate changes with marginal bars]
+           [2018/03/09 v3.6c Indicate changes with marginal bars]
 %    \end{macrocode}
 %
 % \section{A driver for this document}
@@ -158,7 +158,7 @@
 %    commands supported by `dvi drivers'. Currently six different
 % \changes{v3.5a}{2005/05/23}{PDF\TeX{} support added}
 % \changes{v3.6a}{2011/04/30}{Xe\TeX{} support added}
-%    drivers are supported, plus pdftex\cbstart{} and XeTeX\cbend{}
+%    drivers are supported, plus pdftex and Xe\TeX
 %    support. More can easily be added. 
 % \end{abstract}
 %
@@ -192,7 +192,7 @@
 % \changes{v3.5a}{2005/05/23}{Pdftex support added}
 % \changes{v3.6a}{2011/05/02}{xetex support added}
 %      been tested with the \Lopt{dvips}, \Lopt{pdftex},
-%      \Lopt{vtex} and\cbstart{}\Lopt{xetex}\cbend{} drivers, 
+%      \Lopt{vtex} and\Lopt{xetex} drivers, 
 %      but it may also work with other PostScript based drivers. It will 
 %      \emph{not} work for the \texttt{DVItoLN03} and em\TeX\ drivers.
 %      For colored changebars to work, make sure that you specify the
@@ -222,10 +222,8 @@
 %      \item V\TeX
 % \changes{v3.5a}{2005/05/23}{Pdftex support added}
 %      \item PDF\TeX
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{XeTeX added}
 %      \item Xe\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.
@@ -338,7 +336,7 @@
 %    The changebars will be printed in the `inside' margin of your
 %    document.  This means they appear on the left side of the
 %    page. When \Lopt{twoside} is in effect the bars will be printed
-%    on the right side of even pages.  \cbdelete
+%    on the right side of even pages.
 %
 %
 % \section{Deficiencies and bugs}
@@ -359,7 +357,7 @@
 %    desired.
 % \changes{v3.5a}{2005/05/23}{Pdftex support added}
 % \changes{v3.6a}{2011/04/30}{XeTeX suport added}
-%    There is no such limit with PDF\TeX \cbstart or Xe\TeX\cbend.
+%    There is no such limit with PDF\TeX or Xe\TeX.
 %
 % \item Internal macro names are all of the form |\cb at xxxx|.  No
 %    checking for conflicts with other macros is done.
@@ -623,12 +621,11 @@
 % \begin{macro}{\cb at pdfxy}
 % \changes{v3.5a}{2005/05/23}{Pdftex support added}
 %    The macro |\cb at pdfxy| populates the pdf x,y coordinates file.
-%    In \Lopt{pdftex}\cbstart{} and \Lopt{xetex}\cbend{} mode it
-%    writes one line to \file{.cb2} file
-%    which is equivalent to one bar point. The default implementation
-%    is a noop. 
-%    If the \Lopt{pdftex}\cbstart{} or \Lopt{xetex}\cbend{} option is
-%    given it is redefined.
+%    In \Lopt{pdftex} and \Lopt{xetex} mode it writes one line to
+%    \file{.cb2} file which is equivalent to one bar point. The
+%    default implementation is a noop. 
+%    If the \Lopt{pdftex} or \Lopt{xetex} option is given it is
+%    redefined.
 %    \begin{macrocode}
 \def\cb at pdfxy#1#2#3#4#5{}
 %    \end{macrocode}
@@ -745,9 +742,7 @@
 %    \item Textures
 %    \item V\TeX
 %    \item PDF\TeX
-% \begin{changebar}
 %    \item Xe\TeX
-% \end{changebar}
 %    \end{itemize}
 %
 %    The intent is that the driver names should be case-insensitive,
@@ -808,8 +803,7 @@
       {You are using a LaTeX run which does not generate PDF\MessageBreak
         or you are using a very old version of PDFTeX}}
 %    \end{macrocode}
-%\clearpage
-% \begin{changebar}
+%
 %    \begin{macrocode}
 \DeclareOption{XeTeX}{\cb at xetexcheck}
 \DeclareOption{xetex}{\cb at xetexcheck}
@@ -847,7 +841,6 @@
       {XeTeX option cannot be used}%
       {You are not using XeLaTeX}}
 %    \end{macrocode}
-% \end{changebar}
 %
 %    The new features of \LaTeXe\ make it possible to implement the
 %    \Lopt{outerbars} option.
@@ -913,7 +906,6 @@
 %
 %    Signal an error if an unknown option was specified.
 % \changes{v3.5a}{2005/05/23}{Added 'pdftex' to the option list}
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{Added 'xetex' to the option list}
 %    \begin{macrocode}
 \DeclareOption*{\OptionNotUsed\PackageError
@@ -924,7 +916,6 @@
         grey, color, xcolor,\MessageBreak
         outerbars, innerbars, leftbars and rightbars}}
 %    \end{macrocode}
-% \end{changebar}
 %
 %    The default is to have grey change bars on the left side of the
 %    text on odd pages. When V\TeX\ is used the option \Lopt{dvips} is
@@ -938,7 +929,6 @@
 %    options}
 % \changes{v3.4d}{2001/09/04}{Added detection of V\TeX}
 % \changes{v3.5a}{2005/05/23}{Added detection of PDF\TeX}
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{Added detection of Xe\TeX}
 %    \begin{macrocode}
 \ifx\VTeXversion\@undefined
@@ -959,7 +949,6 @@
   \ExecuteOptions{innerbars,traceoff,vtex,grey}
 \fi
 %    \end{macrocode}
-% \end{changebar}
 %
 %    A local configuration file may be used to define a site wide
 %    default for the driver, by calling |\ExecuteOptions| with the
@@ -1067,9 +1056,7 @@
 %    \item \TeX tures
 %    \item V\TeX
 %    \item PDF\TeX
-% \begin{changebar}
 %    \item Xe\TeX
-% \end{changebar}
 %    \end{itemize}
 %    This command can only be used in the preamble of the document.
 %
@@ -1094,12 +1081,11 @@
       \def\VTeX{VTEX}%
       \def\pdfTeX{PDFTEX}%
 %    \end{macrocode}
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
 %    \begin{macrocode}
       \def\xeTeX{XETEX}
 %    \end{macrocode}
-% \end{changebar}
+%
 %    The choice has to be communicated to the macro
 %    \verb=\cb at setup@specials= that will be called from within
 %    \verb=\document=. For this purpose the control sequence
@@ -1115,12 +1101,10 @@
       \ifx\tempa\VTeX     \global\chardef\cb at driver@setup=5\fi
       \ifx\tempa\pdfTeX   \cb at pdftexcheck\fi
 %    \end{macrocode}
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
 %    \begin{macrocode}
       \ifx\tempa\xeTeX    \cb at xetexcheck\fi
 %    \end{macrocode}
-% \end{changebar}
 %    \begin{macrocode}
     \egroup}
 %    \end{macrocode}
@@ -1204,7 +1188,7 @@
   \def\cb at resetpoints{%
     \special{ln03:resetpoints \cb at minpoint \space\cb at maxpoint}}
 %    \end{macrocode}
-%    The first extension to the {changebar} option was for the
+%    The first extension to the \textsf{changebar} package was for the
 %    |\special| syntax of the program \texttt{DVItoPS} by James Clark.
 %    \begin{macrocode}
 \or
@@ -1573,11 +1557,19 @@
 % \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}%
-    \ifnum##3=\cb at pdfx\relax
-      \ifnum##4=\cb at pdfy\relax
+%    \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
@@ -1599,7 +1591,6 @@
 \or
 %    \end{macrocode}
 %
-% \begin{changebar}
 % \changes{v3.6a}{2011/04/30}{Xe\TeX{} support added}
 %    The code for Xe\TeX{} is, like for PDF\TeX{}, more elaborate as
 %    the calculations have to 
@@ -1611,9 +1602,7 @@
   \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
@@ -1625,9 +1614,7 @@
 %    \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.
@@ -1639,9 +1626,7 @@
   }
 %    \end{macrocode}
 %  \end{macro}
-% \end{changebar}
 %
-% \begin{changebar}
 %  \begin{macro}{\pdfliteral}
 %    For Xe\TeX{} we mimick PDF\TeX's command |\pdfliteral|.
 %    \begin{macrocode}
@@ -1648,9 +1633,7 @@
   \def\pdfliteral##1{\special{pdf:literal ##1}}
 %    \end{macrocode}
 %  \end{macro}
-% \end{changebar}
 %
-% \begin{changebar}
 % \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
@@ -1674,9 +1657,7 @@
   }
 %    \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
@@ -1703,9 +1684,7 @@
   }%
 %    \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
@@ -1735,9 +1714,7 @@
   }%
 %    \end{macrocode}
 % \end{macro}
-% \end{changebar}
 %
-% \begin{changebar}
 % \begin{macro}{\cb at pdfparsexy}
 %    The |\cb at pdfparsexy| macro extracts the pagecount from an entry read in
 %    from the \file{.cb2} file.
@@ -1746,14 +1723,12 @@
     \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. 
+%    As \textsc{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{%
@@ -1771,9 +1746,7 @@
     \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.
@@ -1785,20 +1758,16 @@
     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 rightspot we need a little scaling
+%    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}
-% \end{changebar}
 %
-% \begin{changebar}
 %    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
@@ -1858,17 +1827,23 @@
     \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.
+% \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}%
-    \ifnum##3=\cb at pdfx\relax
-      \ifnum##4=\cb at pdfy\relax
+%    \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
@@ -1882,15 +1857,12 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% \end{changebar}
 %
-% \begin{changebar}
 %    For Xe\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
@@ -3109,7 +3081,7 @@
   \fi}
 %    \end{macrocode}
 %    Dummy definition for |\cb at checkPdfxy|. This will be overwritten by
-%    the \Lopt{pdftex}\cbstart{} and \Lopt{xetex}\cbend{} options.
+%    the \Lopt{pdftex} and \Lopt{xetex} options.
 %    \begin{macrocode}
 \def\cb at checkPdfxy#1#2#3#4#5{}
 %    \end{macrocode}
@@ -3131,7 +3103,7 @@
 %    auxiliary file and the history stack is detected a warning is
 %    issued; further checking is disabled.
 % \changes{v3.5a}{2005/05/23}{Added pdftex support}
-%    For pdf\TeX\cbstart{} and Xe\TeX\cbend{} we also disable
+%    For pdf\TeX and Xe\TeX we also disable
 %    |\cb at checkPdfxy|.
 %    \begin{macrocode}
 \def\cb at error{%

Modified: trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty	2018-03-11 20:23:11 UTC (rev 46918)
+++ trunk/Master/texmf-dist/tex/latex/changebar/changebar.sty	2018-03-11 20:23:50 UTC (rev 46919)
@@ -37,7 +37,7 @@
 %% Copyright 1994-2018 (C) Johannes Braams.  All rights reserved.
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{changebar}
-           [2018/02/04 v3.6b Indicate changes with marginal bars]
+           [2018/03/09 v3.6c Indicate changes with marginal bars]
 \def\cb at maxpoint{80}
 \def\cb at minpoint{1}
 \def\cb at nil{0}
@@ -461,8 +461,8 @@
   }%
   \gdef\cb at checkPdfxy##1##2##3##4##5{%
     \cb@@findpdfpoint{##1}{##2}%
-    \ifnum##3=\cb at pdfx\relax
-      \ifnum##4=\cb at pdfy\relax
+    \ifdim##3sp=\cb at pdfx\relax
+      \ifdim##4sp=\cb at pdfy\relax
         \ifdim##5=\cb at pdfz\relax
         \else
         \cb at error
@@ -600,8 +600,8 @@
   }%
   \gdef\cb at checkPdfxy##1##2##3##4##5{%
     \cb@@findpdfpoint{##1}{##2}%
-    \ifnum##3=\cb at pdfx\relax
-      \ifnum##4=\cb at pdfy\relax
+    \ifdim##3sp=\cb at pdfx\relax
+      \ifdim##4sp=\cb at pdfy\relax
         \ifdim##5=\cb at pdfz\relax
         \else
         \cb at error



More information about the tex-live-commits mailing list