summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-04 21:37:38 +0000
committerKarl Berry <karl@freefriends.org>2018-02-04 21:37:38 +0000
commit46ee79bdff3d640ffdb5af64fe7d566c7a56d465 (patch)
tree60f8eb402dee5d0da22c16a4e8e01175511a0a08 /Master/texmf-dist
parent7df71d21a634fa2ea2f83c35b0192f181cc37fb9 (diff)
changebar (4feb18)
git-svn-id: svn://tug.org/texlive/trunk@46540 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/changebar/CATALOG (renamed from Master/texmf-dist/doc/latex/changebar/catalog.txt)4
-rw-r--r--Master/texmf-dist/doc/latex/changebar/MANIFEST (renamed from Master/texmf-dist/doc/latex/changebar/manifest.txt)7
-rw-r--r--Master/texmf-dist/doc/latex/changebar/README (renamed from Master/texmf-dist/doc/latex/changebar/00readme.txt)4
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdfbin94457 -> 31002 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdfbin94172 -> 97927 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest1good.pdfbin0 -> 61872 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest1wrong.pdfbin0 -> 45449 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdfbin94457 -> 30930 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdfbin94175 -> 97839 bytes
-rw-r--r--Master/texmf-dist/doc/latex/changebar/changebar.bug12
-rw-r--r--Master/texmf-dist/doc/latex/changebar/changebar.pdfbin311114 -> 374848 bytes
-rw-r--r--Master/texmf-dist/source/latex/changebar/changebar.dtx588
-rw-r--r--Master/texmf-dist/source/latex/changebar/changebar.ins4
-rw-r--r--Master/texmf-dist/tex/latex/changebar/changebar.sty193
14 files changed, 624 insertions, 188 deletions
diff --git a/Master/texmf-dist/doc/latex/changebar/catalog.txt b/Master/texmf-dist/doc/latex/changebar/CATALOG
index 78a56db94e5..707e1bad293 100644
--- a/Master/texmf-dist/doc/latex/changebar/catalog.txt
+++ b/Master/texmf-dist/doc/latex/changebar/CATALOG
@@ -1,7 +1,7 @@
Name: ChangeBar
-Problems-To: texniek(at)braams.cistron.nl
+Problems-To: texniek(at)braams.xs4all.nl
Author: J.L. Braams
-Version: 3.5
+Version: 3.6b
Description:
diff --git a/Master/texmf-dist/doc/latex/changebar/manifest.txt b/Master/texmf-dist/doc/latex/changebar/MANIFEST
index a8f4eb20334..d6394a66b26 100644
--- a/Master/texmf-dist/doc/latex/changebar/manifest.txt
+++ b/Master/texmf-dist/doc/latex/changebar/MANIFEST
@@ -5,6 +5,9 @@
% changebar.dtx -- A LaTeX2e package that provides commands to add
% 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ƛ.
+%
% changebar.ins -- The installation script.
%
% changebar.bug -- A (historical) list of changes and of known
@@ -17,8 +20,8 @@
% chbar.1 -- A Unix man page describing the use of chbar.sh
%
% cbtest1.tex -- A sample file using the color package
-% cbtest1-ltx.pdf -- Produced with LaTeX and dvipdf
+% cbtest1-ltx.pdf -- Produced with LaTeX and dvipdfm
% cbtest1-pdf.pdf -- Produced with pdfLaTeX
% cbtest2.tex -- A sample file using the xcolor package
-% cbtest2-ltx.pdf -- Produced with LaTeX and dvipdf
+% cbtest2-ltx.pdf -- Produced with LaTeX and dvipdfm
% cbtest2-pdf.pdf -- Produced with pdfLaTeX
diff --git a/Master/texmf-dist/doc/latex/changebar/00readme.txt b/Master/texmf-dist/doc/latex/changebar/README
index d449aa29bea..da72ce0242e 100644
--- a/Master/texmf-dist/doc/latex/changebar/00readme.txt
+++ b/Master/texmf-dist/doc/latex/changebar/README
@@ -1,6 +1,6 @@
changebar bundle
- September 19, 2005
+ Februari 04, 2018
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) 2005 Johannes L. Braams texniek(at)braams.cistron.nl
+Copyright (C) 2018 Johannes L. Braams texniek(at)braams.xs4all.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
index 8581ac563b7..a146caad90b 100644
--- a/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest1-ltx.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
index 723471bab7b..fcdb761c734 100644
--- a/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest1-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1good.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest1good.pdf
new file mode 100644
index 00000000000..1ebbe7300d4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest1good.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest1wrong.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest1wrong.pdf
new file mode 100644
index 00000000000..2281a41da93
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest1wrong.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
index 8581ac563b7..dbc4221f5c0 100644
--- a/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest2-ltx.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf b/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
index c80c8166671..769b847f2e5 100644
--- a/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
+++ b/Master/texmf-dist/doc/latex/changebar/cbtest2-pdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/changebar/changebar.bug b/Master/texmf-dist/doc/latex/changebar/changebar.bug
index 45a576a5202..e37366ba044 100644
--- a/Master/texmf-dist/doc/latex/changebar/changebar.bug
+++ b/Master/texmf-dist/doc/latex/changebar/changebar.bug
@@ -5,6 +5,7 @@
% emTeX (dvidrv) (Eberhard Mattes)
% VTeX (Michael Vulis)
% PDFTeX (Piet van Oostrum)
+% XeTeX (Apostolos Syropoulos)
%
% change history
%
@@ -188,8 +189,19 @@
% v3.5c JLB: Add a small change in the TeXtures specific code that
% was submitted by Blue Sky Systems; made it work with both the
% color and xcolor packages.
+%
+% v3.6a Apostolos Syropoulus submitted support for XeTeX
+%
+% v3.6a JLB: a small change in the XeTeX macros
+%
+% v3.6b JLB: set changebarsep to 0.5\marginparsewp instead of 30pt
+% in order to prevent the changebar crossing a marginal paragraph.
% 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@maxpoint=20 seems to help
% - I have received the file chgbar.sty, which was written by
diff --git a/Master/texmf-dist/doc/latex/changebar/changebar.pdf b/Master/texmf-dist/doc/latex/changebar/changebar.pdf
index cf92b71d360..5bffb704f06 100644
--- a/Master/texmf-dist/doc/latex/changebar/changebar.pdf
+++ b/Master/texmf-dist/doc/latex/changebar/changebar.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/changebar/changebar.dtx b/Master/texmf-dist/source/latex/changebar/changebar.dtx
index e2dff72c3ff..b0d01dbdf20 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-2005 (C) Johannes Braams. All rights reserved.
+%% Copyright 1994-2018 (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{2189}
+% \CheckSum{2579}
%
%\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}
- [2005/09/18 v3.5c Indicate changes with marginal bars]
+ [2018/02/04 v3.6b Indicate changes with marginal bars]
% \end{macrocode}
%
% \section{A driver for this document}
@@ -128,8 +128,12 @@
% \changes{v3.4e}{2001/09/14}{Store original definitions using the
% \texttt{ltx} prefix, define own versions with \texttt{cb} prefix,
% the use \cmd{let} to replace \LaTeX\ macro.}
-% \changes{v3.5a}{2005/05/23}{Piet van Oostrum: Resolved bugs in twocolumn
+% \changes{v3.5a}{2005/05/23}{Piet van Oostrum: Resolved bugs in twocolumn
% mode, mid-document changes to page number, added pdflatex support.}
+% \changes{v3.6a}{2011/04/30}{Added support for XeTeX provided by
+% Apostolos Syropoulos}
+% \changes{v3.6b}{2018/02/03}{Added a macro for pdf scaling for
+% Xe\TeX}
%
% \title{The Changebar package
% \thanks{This file has version number \fileversion,
@@ -137,10 +141,7 @@
%
% \author{Michael Fine\\Distributed Systems Architecture \and
% Johannes Braams\\
-% Kersengaarde 33\\
-% 2723 BP Zoetermeer\\
-% The Netherlands\\
-% \texttt{texniek at braams.cistron.nl}}
+% \texttt{texniek at braams.xs4all.nl}}
%
% \date{Printed \today}
%
@@ -155,9 +156,10 @@
% modifications in a \LaTeX-document by putting bars in the
% margin. It realizes this by making use of the |\special|
% commands supported by `dvi drivers'. Currently six different
-% \changes{v3.5a}{2005/05/23}{Pdftex support added}
-% drivers are supported\cbstart, plus pdftex support\cbend.
-% More can easily be added.
+% \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{}
+% support. More can easily be added.
% \end{abstract}
%
% \section{Introduction}
@@ -188,13 +190,14 @@
%
% \item The colour of the changebars can be changed. This has sofar
% \changes{v3.5a}{2005/05/23}{Pdftex support added}
-% been tested with the \Lopt{dvips}\cbstart, \Lopt{pdftex}\cbend{} and
-% \Lopt{vtex} drivers,
+% \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,
% 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
% \changes{v3.5a}{2005/05/23}{Option xcolor mentioned}
-% option \Lopt{color}\cbstart{} or \Lopt{xcolor}\cbend.
+% option \Lopt{color} or \Lopt{xcolor}.
% \end{itemize}
%
% \section{The user interface}
@@ -217,9 +220,11 @@
% \item em\TeX
% \item \TeX tures
% \item V\TeX
-% \begin{changebar}
% \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
@@ -256,11 +261,11 @@
% \Lopt{grey} option.
%
% \subsubsection{Tracing}
-% The package also implements tracing for its own debugging. The
+% The package also implements tracing for its own debugging. The
% package options \Lopt{traceon} and \Lopt{traceoff} control
% tracing. An additional option \Lopt{tracestacks} is available for
% the die hard who wants to know what goes on in the internal stacks
-% maintained by this package.
+% maintained by this package.
%
% \subsection{Macros defined by the package}
%
@@ -333,8 +338,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. This behaviour can be changed
-% by including the command |\outerbarstrue| in your document.
+% on the right side of even pages. \cbdelete
%
%
% \section{Deficiencies and bugs}
@@ -353,10 +357,9 @@
% unpredictable results (but that could be called a feature for a
% page with so many bars). This limitation could be increased if
% desired.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Pdftex support added}
-% There is no such limit with PDF\TeX.
-% \end{changebar}
+% \changes{v3.6a}{2011/04/30}{XeTeX suport added}
+% There is no such limit with PDF\TeX \cbstart or Xe\TeX\cbend.
%
% \item Internal macro names are all of the form |\cb@xxxx|. No
% checking for conflicts with other macros is done.
@@ -379,7 +382,7 @@
%
% \item The colour support has only been tested with the \Lopt{dvips}
% \changes{v3.5a}{2005/05/23}{Pdftex support added}
-% \cbstart and \Lopt{pdftex} drivers\cbend.
+% and \Lopt{pdftex} drivers.
% \end{itemize}
%
% \section{The basic algorithm}
@@ -441,10 +444,8 @@
% Thus, to ensure that changebars are correct, the document must
% be processed twice. Luckily, this is generally required for
% \LaTeX\ anyway.
-% \begin{changebar}
% With PDF\LaTeX{} generally three (or even more) runs
% are necessary.
-% \end{changebar}
%
% This approach is sufficiently general to allow nested bars, bars
% in floating insertions, and bars around floating insertions.
@@ -572,14 +573,12 @@
%
% \begin{macro}{\cb@page}
% \begin{macro}{\cb@pagecount}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Twocolumn support changes}
% The macros need to keep track of the number of pages/columns
% output so far. To this end the counter |\cb@pagecount| is used.
% When a pagenumber is read from the history stack, it is stored in
% the counter |\cb@page|. The counter |\cb@pagecount| is initially
% $0$; it gets incremented during the call to |\@makebox| (see
-% \end{changebar}
% section~\ref{pagebreak}).
% \begin{macrocode}
\newcount\cb@page
@@ -593,28 +592,25 @@
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% A switch is provided to control where the changebars will be
% printed.
-% \begin{changebar}
% The value depends on the options given:
% \begin{itemize}
% \item[0] for innerbars (default),
% \item[1] for outerbars,
-% \item[2] gices leftbars,
+% \item[2] gives leftbars,
% \item[3] gives rightbars.
% \end{itemize}
% \begin{macrocode}
\def\cb@barsplace{0}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{Var}{@cb@trace}
-% A switch to enable tracing of the actions of this package
+% A switch to enable tracing of the actions of this package.
% \begin{macrocode}
\newif\if@cb@trace
% \end{macrocode}
% \end{Var}
%
-% \begin{changebar}
% \begin{Var}{@cb@firstcolumn}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% A switch to find out if a point is in the left column of a
@@ -627,15 +623,16 @@
% \begin{macro}{\cb@pdfxy}
% \changes{v3.5a}{2005/05/23}{Pdftex support added}
% The macro |\cb@pdfxy| populates the pdf x,y coordinates file.
-% In \Lopt{pdftex} mode it writes one line to \file{.cb2} 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} option is given it is redefined.
+% If the \Lopt{pdftex}\cbstart{} or \Lopt{xetex}\cbend{} option is
+% given it is redefined.
% \begin{macrocode}
\def\cb@pdfxy#1#2#3#4#5{}
% \end{macrocode}
% \end{macro}
-% \end{changebar}
%
% \begin{macro}{\cb@positions}
%
@@ -738,6 +735,7 @@
% specifying the driver name as an option to the
% |\usepackage| call.
% \changes{v3.5a}{2005/05/23}{Added the option \Lopt{PDFTeX}}
+% \changes{v3.6a}{2011/04/30}{Added the option \Lopt{XeTeX}}
% Possible choices are:
% \begin{itemize}
% \item DVItoLN03
@@ -746,8 +744,9 @@
% \item em\TeX
% \item Textures
% \item V\TeX
-% \begin{changebar}
% \item PDF\TeX
+% \begin{changebar}
+% \item Xe\TeX
% \end{changebar}
% \end{itemize}
%
@@ -757,6 +756,7 @@
% \changes{v3.3e}{1998/02/24}{Added the option \Lopt{textures}}
% \changes{v3.4a}{2001/04/18}{Added the option \Lopt{VTeX}}
% \changes{v3.5a}{2005/05/23}{Added the option \Lopt{PDFTeX}}
+% \changes{v3.6a}{2011/04/30}{Added the option \Lopt{XeTeX}}
% \begin{macrocode}
\DeclareOption{DVItoLN03}{\global\chardef\cb@driver@setup=0\relax}
\DeclareOption{dvitoln03}{\global\chardef\cb@driver@setup=0\relax}
@@ -771,12 +771,11 @@
\DeclareOption{VTeX}{\global\chardef\cb@driver@setup=5\relax}
\DeclareOption{vtex}{\global\chardef\cb@driver@setup=5\relax}
% \end{macrocode}
-% \begin{changebar}
% \begin{macrocode}
\DeclareOption{PDFTeX}{\cb@pdftexcheck}
\DeclareOption{pdftex}{\cb@pdftexcheck}
% \end{macrocode}
-% \changes{v3.5a}{2005/05/23}{Pdftex support added}
+% \changes{v3.5a}{2005/05/23}{PDFTeX support added}
% For the \Lopt{pdftex} option we have to check that the current
% \LaTeX{} run is using PDF\TeX{} and that PDF output is selected.
% If it is, we initialize the option and open an additional output file.
@@ -809,17 +808,54 @@
{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@xetexcheck}
+\DeclareOption{xetex}{\cb@xetexcheck}
+% \end{macrocode}
+% \changes{v3.6a}{2005/05/23}{XeTeX support added}
+% For the \Lopt{xetex} option we have to check that the current
+% \LaTeX{} run is using Xe\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@xetexcheck{%
+ \expandafter\ifx\csname XeTeXrevision\endcsname\@undefined \cb@xetexerror
+ \else
+ \global\chardef\cb@driver@setup=7\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}
+ \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}}
+ \gdef\sec@nd@ftw@##1 ##2{##2}
+ \fi}
+% \end{macrocode}
+%
+% Give a warning if we cannot support the \Lopt{xetex} option.
+% \begin{macrocode}
+\def\cb@xetexerror{\PackageError
+ {changebar}%
+ {XeTeX option cannot be used}%
+ {You are not using XeLaTeX}}
+% \end{macrocode}
% \end{changebar}
%
% The new features of \LaTeXe\ make it possible to implement the
% \Lopt{outerbars} option.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% \begin{macrocode}
\DeclareOption{outerbars}{\def\cb@barsplace{1}}
\DeclareOption{innerbars}{\def\cb@barsplace{0}}
% \end{macrocode}
-% \end{changebar}
%
% It is also possible to specify that the change bars should
% \emph{always} be printed on either the left or the right side of
@@ -831,13 +867,11 @@
% \changes{v3.3d}{1997/10/28}{Removed bogus offset}
% \changes{v3.3g}{1999/06/11}{take the setting of \Lopt{twoside} into
% account}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% \begin{macrocode}
\DeclareOption{leftbars}{\def\cb@barsplace{2}}
\DeclareOption{rightbars}{\def\cb@barsplace{3}}
% \end{macrocode}
-% \end{changebar}
% \changes{v3.3j}{2000/09/26}{\cs{cb@even@right} erroneously wasn't
% set in the oneside mode with option rightbars}
% A set of options to control tracing.
@@ -878,14 +912,15 @@
% \end{macrocode}
%
% Signal an error if an unknown option was specified.
-% \begin{changebar}
% \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
{changebar}%
{Unrecognised option `\CurrentOption'\MessageBreak
known options are dvitoln03, dvitops, dvips,\MessageBreak
- emtex, textures, pdftex and vtex,
+ emtex, textures, pdftex, vtex and xetex,
grey, color, xcolor,\MessageBreak
outerbars, innerbars, leftbars and rightbars}}
% \end{macrocode}
@@ -902,18 +937,23 @@
% \changes{v3.4b}{2001/08/28}{Added `grey' to the list of default
% options}
% \changes{v3.4d}{2001/09/04}{Added detection of V\TeX}
-% \begin{changebar}
% \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
- \ifx\pdfoutput\@undefined
- \ExecuteOptions{innerbars,traceoff,dvips,grey}
- \else
- \ifnum\pdfoutput>0
- \ExecuteOptions{innerbars,traceoff,pdftex,grey}
- \else
+ \expandafter\ifx\csname XeTeXrevision\endcsname\@undefined
+ \ifx\pdfoutput\@undefined
\ExecuteOptions{innerbars,traceoff,dvips,grey}
+ \else
+ \ifnum\pdfoutput>0
+ \ExecuteOptions{innerbars,traceoff,pdftex,grey}
+ \else
+ \ExecuteOptions{innerbars,traceoff,dvips,grey}
+ \fi
\fi
+ \else
+ \ExecuteOptions{innerbars,traceoff,xetex,grey}
\fi
\else
\ExecuteOptions{innerbars,traceoff,vtex,grey}
@@ -978,7 +1018,6 @@
\ProcessOptions\relax
% \end{macrocode}
%
-% \begin{changebar}
% We have to make sure that when the document is being processed by
% pdf\LaTeX, while also creating pdf as output, the driver to be
% used is the pdf driver. Therefore we add an extra check, possibly
@@ -997,7 +1036,6 @@
\fi
\fi
% \end{macrocode}
-% \end{changebar}
%
% \begin{macro}{\cb@trace}
% A macro that formats the tracing messages.
@@ -1028,8 +1066,9 @@
% \item em\TeX
% \item \TeX tures
% \item V\TeX
-% \begin{changebar}
% \item PDF\TeX
+% \begin{changebar}
+% \item Xe\TeX
% \end{changebar}
% \end{itemize}
% This command can only be used in the preamble of the document.
@@ -1042,7 +1081,6 @@
% compatibility mode}
% \changes{v3.3e}{1998/02/24}{Added \cs{Textures}}
% \changes{v3.5a}{2005/05/23}{Added 'PDFtex' option}
-% \begin{changebar}
% \begin{macrocode}
\if@compatibility
\def\driver#1{%
@@ -1054,8 +1092,14 @@
\def\emTeX{EMTEX}%
\def\Textures{TEXTURES}%
\def\VTeX{VTEX}%
- \def\pdfTeX{PDFTEX}
+ \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@setup@specials= that will be called from within
% \verb=\document=. For this purpose the control sequence
@@ -1070,9 +1114,16 @@
\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
- \egroup}
+% \end{macrocode}
+% \begin{changebar}
+% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
+% \begin{macrocode}
+ \ifx\tempa\xeTeX \cb@xetexcheck\fi
% \end{macrocode}
% \end{changebar}
+% \begin{macrocode}
+ \egroup}
+% \end{macrocode}
% We add \verb+\driver+ to \verb+\@preamblecmds+, which is a
% list of commands to be used only in the preamble of a document.
% \begin{macrocode}
@@ -1245,9 +1296,8 @@
% a filled circle is shown for such lines.
% \changes{v3.3e}{1998/02/24}{Added the definitions for textures
% support}
-% \changes{v3.5c}{2005/09/18}{A small change was submitted by gordon
+% \changes{v3.5c}{2005/09/18}{A small change was submitted by Gordon
% Lee from Blue Sky Systems}
-% \begin{changebar}
% \begin{macrocode}
\or
\def\cb@defpoint##1##2{%
@@ -1259,7 +1309,6 @@
/CBarY\the##1\space exch def}%
\if@cb@trace\cb@trace@defpoint##1##2\fi}
% \end{macrocode}
-% \end{changebar}
% \changes{v3.4b}{2001/08/29}{now use \cs{cb@ps@color} instead of
% setting the greyness directly}
% \begin{macrocode}
@@ -1302,8 +1351,7 @@
\cb@trace@connect##1##2##3}
\let\cb@resetpoints\relax
% \end{macrocode}
-% \begin{changebar}
-% \changes{v3.5a}{2005/05/23}{Pdftex support added}
+% \changes{v3.5a}{2005/05/23}{PDF\TeX{} support added}
% The code for PDF\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
@@ -1314,9 +1362,7 @@
\immediate\closeout\cb@writexy
\immediate\openin\cb@readxy=\jobname.cb2\relax
% \end{macrocode}
-% \end{changebar}
%
-% \begin{changebar}
% \begin{macro}{\cb@pdfpoints}
% \begin{macro}{\cb@pdfpagenr}
% The |\cb@pdfpoints| macro contains the list of coordinates of points
@@ -1339,6 +1385,269 @@
}
% \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}
+%
+% \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}
+%
+% \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}
+%
+% 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@
+ \pdfsavepos
+ \edef\cb@temp{\write\@auxout
+ {\string\cb@pdfxy\point
+ {\the\pdflastxpos}{\the\pdflastypos}{\the##2}}}%
+ \cb@temp
+ \endgroup
+ \fi
+ \cb@trace@defpoint##1##2%
+ }%
+% \end{macrocode}
+%
+% \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}
+%
+% 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=0.996264009963\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=0.996264009963\cb@dima\relax
+ ##3=0.996264009963##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}%
+ \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}
+%
+% \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}%
+ \ifnum##3=\cb@pdfx\relax
+ \ifnum##4=\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 PDF\TeX{} we don't need a limit on the number of bar points.
+% \begin{macrocode}
+ \def\cb@maxpoint{9999999}
+ \let\cb@resetpoints\relax
+\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
+% 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}
+ \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 Xe\TeX{} we mimick PDF\TeX's command |\pdfliteral|.
+% \begin{macrocode}
+ \def\pdfliteral##1{\special{pdf:literal ##1}}
+% \end{macrocode}
+% \end{macro}
% \end{changebar}
%
% \begin{changebar}
@@ -1479,6 +1788,17 @@
% \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 rightspot we need a little scaling
+% factor. We define it here.
+% \begin{macrocode}
+\def\cb@pdf@scale{0.996264009963}
+% \end{macrocode}
+% \end{macro}
+% \end{changebar}
+%
+% \begin{changebar}
% 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
@@ -1500,7 +1820,7 @@
\cb@dima=\cb@pdfz
\advance\cb@dima by-\cb@pdfx
\advance\cb@dima by1in
- \cb@dima=0.996264009963\cb@dima\relax
+ \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
@@ -1512,14 +1832,15 @@
\def\cb@temp{\cb@cvtpct\c@changebargrey}%
\pdfliteral{q \cb@temp\space g \cb@temp\space G}%
\else
- \pdfliteral{q \cb@current@color}%
+ \pdfliteral{q \expandafter\sec@nd@ftw@\cb@current@color\space RG
+ \expandafter\sec@nd@ftw@\cb@current@color\space rg}%
\fi
\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
- \pdfliteral direct{\expandafter\cb@removedim\the##3 w
+ \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
@@ -1564,18 +1885,18 @@
% \end{changebar}
%
% \begin{changebar}
-% For PDF\TeX{} we don't need a limit on the number of bar points.
+% For Xe\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
% be no-ops.
% \begin{macrocode}
-\or
\else
\PackageWarning{Changebar}{changebars not supported in unknown setup}
\def\cb@defpoint##1##2{\cb@trace@defpoint##1##2}
@@ -1684,9 +2005,12 @@
% \begin{macro}{\changebarsep}
% The default separation between all bars and the text is stored in
% the dimen register |\changebarsep|.
+% \changes{v3.6b}{2018/02/04}{set the default separtion between text
+% and changebars to half the separation between text and marginal
+% paragraphs}
% \begin{macrocode}
\newlength{\changebarsep}
-\setlength{\changebarsep}{30pt}
+\setlength{\changebarsep}{0.5\marginparsep}
% \end{macrocode}
% \end{macro}
%
@@ -1708,7 +2032,6 @@
% selected we need to load the appropriate package. When we're run
% by pdf\LaTeX\ we need to pass that information on to that package.
% \changes{v3.4e}{2001/09/14}{Detect pdf mode}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{The option \Lopt{pdftex} will be supplied
% automatically with the current color packages. Leave out
% \Lopt{dvipsnames} as it is usually automatically loaded and may clash
@@ -1718,7 +2041,6 @@
\@ifpackagewith{changebar}{\csname cb@color@pkg\endcsname}{%
\RequirePackage{\cb@color@pkg}%
% \end{macrocode}
-% \end{changebar}
% Then we need to define the command |\cbcolor| which is a slightly
% modified copy of the command |\color| from the \pkg{color}
% package.
@@ -1746,7 +2068,6 @@
% \changes{v3.5c}{2005/09/18}{Use the higher level interface throug
% \cs{color} to prevent problemns with \texttt{color.sty} or
% \texttt{xcolor.sty}}
-% \begin{changebar}
% \begin{macrocode}
\def\@undeclaredcbcolor[#1]#2{%
\begingroup
@@ -1756,14 +2077,12 @@
\ignorespaces
}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{macro}{\@declaredcbcolor}
% \changes{v3.5c}{2005/09/18}{Use the higher level interface throug
% \cs{color} to prevent problemns with \texttt{color.sty} or
% \texttt{xcolor.sty}}
-% \begin{changebar}
% \begin{macrocode}
\def\@declaredcbcolor#1{%
\begingroup
@@ -1773,7 +2092,6 @@
\ignorespaces}%
}{%
% \end{macrocode}
-% \end{changebar}
% When the \Lopt{color} option wasn't specified the usage of the
% |\cbcolor| command results in a warning message.
% \changes{v3.4d}{2001/09/04}{Isue an error when \cmd{cbcolor} is
@@ -1814,12 +2132,10 @@
% due to the asynchronous nature of the output routine it might be
% a different page. The macro |\cb@checkpage| finds the page number
% on the history stack.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Correction for nested changebars}
% \begin{macrocode}
\cb@checkpage\z@
% \end{macrocode}
-% \end{changebar}
% Temporarily assign the page number to |\cb@pagecount| as that
% register is used by |\cb@setBeginPoints|. Note that it's value is
% offset by one from the page counter.
@@ -1887,27 +2203,19 @@
% \end{macrocode}
% Call |\cb@checkpage| to find the page this point finally ends up
% on.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Correction for nested changebars}
% \begin{macrocode}
\cb@checkpage\thr@@
% \end{macrocode}
-% \end{changebar}
% Again, we need to temporarily overwrite |\cb@pagecount|.
% \begin{macrocode}
\cb@cnta\cb@pagecount
\cb@pagecount\cb@page\advance\cb@pagecount\m@ne
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\ifvmode
\cb@setEndPoints
\else
\vadjust{\cb@setEndPoints}%
\fi
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\cb@pagecount\cb@cnta
\fi
\ignorespaces}
@@ -1921,10 +2229,8 @@
%
% We expect the identification of the points in |\cb@topleft| and
% |\cb@page|. The resulting page will be stored in |\cb@page|.
-% \begin{changebar}
% The parameter indicates whether we are searching for a begin
% point (0) or end point (3).
-% \end{changebar}
% \changes{v3.3i}{1999/06/18}{Check for and handle the situation that
% the history stack is too short due to new bars added to a
% document}
@@ -1935,13 +2241,7 @@
% First store the identifiers in temporary registers.
% \begin{macrocode}
\cb@cnta\cb@topleft\relax
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\advance\cb@cnta by #1\relax
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\cb@cntb\cb@page\relax
\cb@dima\cb@curbarwd\relax
% \end{macrocode}
@@ -1954,7 +2254,6 @@
\ifnum\cb@topleft=\cb@nil
\else
% \end{macrocode}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Correction for moving floats}
% Now keep popping the stack until |\cb@topleft| is found. The values
% popped from the stack are pushed on a temporary stack to be pushed
@@ -1963,7 +2262,6 @@
% \begin{macrocode}
\cb@FindPageNum
% \end{macrocode}
-% \end{changebar}
% \changes{v3.5a}{2005/05/23}{Correction for nested changebars}
% \begin{macrocode}
\ifnum\cb@topleft>\cb@maxpoint\else
@@ -1981,14 +2279,10 @@
\cb@pop\cb@tempstack}%
\fi
% \end{macrocode}
-% Finally return the correct values.
-% \begin{changebar}
+% Finally return the correct values
% \changes{v3.5a}{2005/05/23}{Correction for nested changebars}
% \begin{macrocode}
\advance\cb@cnta by -#1\relax
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\cb@topleft\cb@cnta\relax
\cb@page\cb@cntb\relax
\cb@curbarwd\cb@dima\relax
@@ -1996,7 +2290,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{changebar}
% \begin{macro}{\cb@FindPageNum}
% |\cb@FindPageNum| recursively searches through the history stack until
% an entry is found that is equal to |\cb@cnta|.
@@ -2032,7 +2325,6 @@
}%
% \end{macrocode}
% \end{macro}
-% \end{changebar}
%
% \begin{macro}{\cb@setBeginPoints}
% \changes{v3.3a}{1997/09/26}{Renamed from \cs{cb@setBeginPoint} and
@@ -2051,15 +2343,9 @@
% \begin{macrocode}
\def\cb@setBeginPoints{%
\cb@topright=\cb@topleft\advance\cb@topright by\@ne
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\cb@cntb=\cb@pagecount
\divide\cb@cntb by\tw@
\ifodd\cb@cntb
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\cb@defpoint\cb@topleft\cb@even@left
\cb@defpoint\cb@topright\cb@even@right
\else
@@ -2092,26 +2378,14 @@
\cb@topright=\cb@topleft\advance\cb@topright by\@ne
\cb@botleft=\cb@topleft\advance\cb@botleft by\tw@
\cb@botright=\cb@topleft\advance\cb@botright by\thr@@
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\cb@cntb=\cb@pagecount
\divide\cb@cntb by\tw@
\ifodd\cb@cntb
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\cb@defpoint\cb@botleft\cb@even@left
\cb@defpoint\cb@botright\cb@even@right
\else
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\cb@defpoint\cb@botleft\cb@odd@left
\cb@defpoint\cb@botright\cb@odd@right
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\fi
\cb@writeAux\cb@botright
\edef\cb@leftbar{%
@@ -2124,16 +2398,13 @@
% \changes{v3.5a}{2005/05/23}{Checking |@firstcolumn| outside the output
% routine is unreliable; check \cs{cb@pagecount} instead}
% In twocolumn pages always use outerbars
-% \begin{changebar}
% \begin{macrocode}
\if@twocolumn
\ifodd\cb@pagecount\cb@rightbar\else\cb@leftbar\fi
% \end{macrocode}
-% \end{changebar}
%
% \changes{v3.4e}{2001/09/07}{The \cs{outerbars} conditional should be
% inside an \cs{else} clause}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Series of \cs{if}s replaced by
% \cs{ifcase} on \cs{cb@barsplace}}
% \begin{macrocode}
@@ -2170,7 +2441,6 @@
\fi
}%
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{macro}{\cb@writeAux}
@@ -2201,7 +2471,6 @@
% \subsection{Macros for Making It Work Across Page Breaks}
% \label{pagebreak}
%
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for twocolumn support: Detect page
% number changes in righthand columns.}
% \begin{Var}{@cb@pagejump}
@@ -2256,10 +2525,8 @@
\gdef\cb@pagejumplst{#2}}
% \end{macrocode}
% \end{macro}
-% \end{changebar}
%
% \begin{macro}{\cb@checkpagecount}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% This macro checks that |\cb@pagecount| is correct at the beginning of
% a column or page.
@@ -2318,8 +2585,6 @@
\fi
\else
% \end{macrocode}
-% \end{changebar}
-% \begin{changebar}
% In the righthand column check the flag (see above). If set, write a
% pagejump, but compensate for the increase done in the lefthand column.
% \begin{macrocode}
@@ -2353,7 +2618,6 @@
\fi
}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{macro}{\@makecol}
@@ -2377,7 +2641,6 @@
% \changes{v3.3a}{1997/09/26}{Now use the command
% \cs{cb@startSpanBars} to define top points for bars spoanning a
% page break}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% \begin{macrocode}
\let\ltx@makecol\@makecol
@@ -2389,15 +2652,10 @@
\string\cb@pagecount=\the\cb@pagecount}%
\let\cb@writeAux\@gobble
% \end{macrocode}
-% \end{changebar}
% First make sure that |\cb@pagecount| is correct.
% Then add the necessary bar points at beginning and end.
-% \begin{changebar}
% \begin{macrocode}
\cb@checkpagecount
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\setbox\@cclv \vbox{%
\cb@resetpoints
\cb@startSpanBars
@@ -2407,7 +2665,6 @@
\cb@buildstack\cb@processActive
\ltx@makecol
% \end{macrocode}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% In twocolumn pages write information to the aux file to indicate which
% column we are in. This write must precede the whole column, including
@@ -2425,9 +2682,6 @@
\fi
\cb@trace@stack{after makecol, page \the\c@page,
\string\cb@pagecount=\the\cb@pagecount}%
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
}
\let\@makecol\cb@makecol
% \end{macrocode}
@@ -2439,7 +2693,6 @@
% \changes{v3.3a}{1997/09/26}{Now use the command
% \cs{cb@startSpanBars} to define top points for bars spoanning a
% page break}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{We don't want spanning changebars from a
% previous page in a float column.
% The original code didn't work anyway. It did set \@outputbox,
@@ -2472,7 +2725,6 @@
}
\let\@vtryfc\cb@vtryfc
% \end{macrocode}
-% \end{changebar}
% \end{macro}
% \end{macro}
%
@@ -2679,7 +2931,6 @@
% stack; now it specifically checks that we are popping the history
% stack itself. Moreover we read from file only if the history
% stack is empty.}
-% \begin{changebar}
% \begin{macrocode}
\def\cb@thehistorystack{\cb@historystack}
\def\cb@pop#1{%
@@ -2702,7 +2953,6 @@
\fi
\cb@trace@pop{#1}}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{macro}{\cb@carcdr}
@@ -2738,13 +2988,11 @@
% \meta{element} described above.
% \changes{v3.5a}{2005/05/23}{Changes for twocolumn support: if a bar point
% is in the left column we have to subtract one from the pagecount.}
-% \begin{changebar}
% \begin{macrocode}
\def\cb@barpoint#1#2#3{\cb@cnta=#2
\if@cb@firstcolumn\advance\cb@cnta by\m@ne\fi
\immediate\write\cb@write{#1n\the\cb@cnta p#3l}}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \subsection{Macros For Checking That The \file{.aux} File Is Stable}
@@ -2766,7 +3014,6 @@
\AtBeginDocument{%
\cb@setup@specials
% \end{macrocode}
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% Add a sentinel to \cs{cb@pagejumplst}.
% \begin{macrocode}
@@ -2774,8 +3021,7 @@
% \end{macrocode}
% \changes{v3.5a}{2005/05/23}{Adaption of \cs{cb@pagecount} is no longer
% necessary, as \cs{cb@pagecount} will be adjusted at the beginning of
-% \cs{@makecol} and \cs{@vtryfc}.}
-% \end{changebar}
+% \cs{@makecol} and \cs{@vtryfc}.}
% Compute the left and right positions of the changebars.
% \changes{v3.4g}{2004/01/09}{Added tracing information for the left
% and right postions}
@@ -2812,7 +3058,6 @@
\immediate\openin\cb@read=\jobname.cb%
% \end{macrocode}
%
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{For pdftex we also close and reread the
% \file{.cb2} file.}
% Let |\cb@pdfxy=\cb@checkPdfxy| for checking. Make |\cb@pagejump| dummy.
@@ -2830,7 +3075,6 @@
\let\cb@pagejump\@gobble
\let\cb@barpoint\cb@checkHistory}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \begin{macro}{\cb@checkHistory}
@@ -2839,7 +3083,6 @@
% see if the point and page numbers are the same as the arguments
% $\#1$ and $\#2$ respectively. Prints a warning message if
% different.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Changes for twocolumn support: if a bar point
% is in the left column we have to subtract one from the pagecount.}
% \begin{macrocode}
@@ -2850,7 +3093,6 @@
\if@cb@firstcolumn\advance\cb@cnta by\m@ne\fi
\ifnum \cb@cnta=\cb@page\relax
% \end{macrocode}
-% \end{changebar}
% Both page and point numbers are equal; do nothing,
% \begin{macrocode}
\else
@@ -2866,16 +3108,13 @@
\cb@error
\fi}
% \end{macrocode}
-% \begin{changebar}
% Dummy definition for |\cb@checkPdfxy|. This will be overwritten by
-% the \Lopt{pdftex} option.
+% the \Lopt{pdftex}\cbstart{} and \Lopt{xetex}\cbend{} options.
% \begin{macrocode}
\def\cb@checkPdfxy#1#2#3#4#5{}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
-% \begin{changebar}
% \begin{macro}{\cb@rerun}
% \changes{v3.5a}{2005/05/23}{Changes for better twocolumn support}
% The macro |\cb@rerun| is called when we detect that we need to rerun
@@ -2886,16 +3125,14 @@
\let\cb@checkrerun\relax
% \end{macrocode}
% \end{macro}
-% \end{changebar}
%
% \begin{macro}{\cb@error}
% When a mismatch between the changebar information in the
% auxiliary file and the history stack is detected a warning is
% issued; further checking is disabled.
-% \begin{changebar}
% \changes{v3.5a}{2005/05/23}{Added pdftex support}
-% For pdftex we also disable |\cb@checkPdfxy|.
-% \end{changebar}
+% For pdf\TeX\cbstart{} and Xe\TeX\cbend{} we also disable
+% |\cb@checkPdfxy|.
% \begin{macrocode}
\def\cb@error{%
\PackageWarning{Changebar}%
@@ -2903,13 +3140,9 @@
Rerun to get the bars right}
\gdef\cb@checkHistory##1##2##3{}%
\let\cb@barpoint\cb@checkHistory
-% \end{macrocode}
-% \begin{changebar}
-% \begin{macrocode}
\gdef\cb@checkPdfxy##1##2##3##4##5{}%
\let\cb@pdfxy\cb@checkPdfxy}
% \end{macrocode}
-% \end{changebar}
% \end{macro}
%
% \subsection{Macros For Making It Work With Nested Floats/Footnotes}
@@ -2956,6 +3189,25 @@
% rebind |\endfigure|.
% \changes{3.2}{1994/04/21}{Removed
% \cs{let}\cs{endfigure}\cs{end@float}, no longer necessary}
+%
+% \begin{macro}{\@xympar}
+% There is one snag with this redefinition in that the macro
+% |\end@float| is also used by the command |\marginpar|. This may
+% lead to problems with stack underflow. Therefore we need to
+% redefine an internal macro from the marginal paragraph mechanism
+% as well. The solution is to make sure the this macro uses the
+% original definition of |\end@float|.
+% \changes{v3.5d}{2005/12/24}{Redefine \cs{@xympar} to use the
+% original version of \cs{end@float}}
+% \begin{macrocode}
+\let\ltx@@xympar\@xympar
+\def\@xympar{%
+ \let\end@float\ltx@end@float
+ \ltx@@xympar
+ \let\end@float\cb@end@float}
+% \end{macrocode}
+% \end{macro}
+%
% \end{macro}
%
% \begin{macro}{\float@end}
diff --git a/Master/texmf-dist/source/latex/changebar/changebar.ins b/Master/texmf-dist/source/latex/changebar/changebar.ins
index 0bba570d1b5..8b5a9684f6c 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-2005 Johannes Braams, All rights reserved.
+%% Copyright (C) 1994-2018 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-2005 Johannes Braams, All rights reserved.
+Copyright (C) 1994-2018 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 d7a6295adf8..c43be2cd1f2 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-2005 Johannes Braams, All rights reserved.
+%% Copyright (C) 1994-2018 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-2005 (C) Johannes Braams. All rights reserved.
+%% Copyright 1994-2018 (C) Johannes Braams. All rights reserved.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{changebar}
- [2005/09/18 v3.5c Indicate changes with marginal bars]
+ [2018/02/04 v3.6b Indicate changes with marginal bars]
\def\cb@maxpoint{80}
\def\cb@minpoint{1}
\def\cb@nil{0}
@@ -119,6 +119,26 @@
{PDFTeX option cannot be used}%
{You are using a LaTeX run which does not generate PDF\MessageBreak
or you are using a very old version of PDFTeX}}
+\DeclareOption{XeTeX}{\cb@xetexcheck}
+\DeclareOption{xetex}{\cb@xetexcheck}
+\def\cb@xetexcheck{%
+ \expandafter\ifx\csname XeTeXrevision\endcsname\@undefined \cb@xetexerror
+ \else
+ \global\chardef\cb@driver@setup=7\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}}
+ \gdef\sec@nd@ftw@##1 ##2{##2}
+ \fi}
+\def\cb@xetexerror{\PackageError
+ {changebar}%
+ {XeTeX option cannot be used}%
+ {You are not using XeLaTeX}}
\DeclareOption{outerbars}{\def\cb@barsplace{1}}
\DeclareOption{innerbars}{\def\cb@barsplace{0}}
\DeclareOption{leftbars}{\def\cb@barsplace{2}}
@@ -144,18 +164,22 @@
{changebar}%
{Unrecognised option `\CurrentOption'\MessageBreak
known options are dvitoln03, dvitops, dvips,\MessageBreak
- emtex, textures, pdftex and vtex,
+ emtex, textures, pdftex, vtex and xetex,
grey, color, xcolor,\MessageBreak
outerbars, innerbars, leftbars and rightbars}}
\ifx\VTeXversion\@undefined
- \ifx\pdfoutput\@undefined
- \ExecuteOptions{innerbars,traceoff,dvips,grey}
- \else
- \ifnum\pdfoutput>0
- \ExecuteOptions{innerbars,traceoff,pdftex,grey}
- \else
+ \expandafter\ifx\csname XeTeXrevision\endcsname\@undefined
+ \ifx\pdfoutput\@undefined
\ExecuteOptions{innerbars,traceoff,dvips,grey}
+ \else
+ \ifnum\pdfoutput>0
+ \ExecuteOptions{innerbars,traceoff,pdftex,grey}
+ \else
+ \ExecuteOptions{innerbars,traceoff,dvips,grey}
+ \fi
\fi
+ \else
+ \ExecuteOptions{innerbars,traceoff,xetex,grey}
\fi
\else
\ExecuteOptions{innerbars,traceoff,vtex,grey}
@@ -199,7 +223,8 @@
\def\emTeX{EMTEX}%
\def\Textures{TEXTURES}%
\def\VTeX{VTEX}%
- \def\pdfTeX{PDFTEX}
+ \def\pdfTeX{PDFTEX}%
+ \def\xeTeX{XETEX}
\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
@@ -208,6 +233,7 @@
\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
\egroup}
{\def\do{\noexpand\do\noexpand}
\xdef\@preamblecmds{\@preamblecmds \do\driver}
@@ -451,6 +477,144 @@
\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{\special{pdf: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@
+ \pdfsavepos
+ \edef\cb@temp{\write\@auxout
+ {\string\cb@pdfxy\point
+ {\the\pdflastxpos}{\the\pdflastypos}{\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 \expandafter\sec@nd@ftw@\cb@current@color\space RG
+ \expandafter\sec@nd@ftw@\cb@current@color\space rg}%
+ \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}%
+ \ifnum##3=\cb@pdfx\relax
+ \ifnum##4=\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}
@@ -479,7 +643,7 @@
\newlength{\deletebarwidth}
\setlength{\deletebarwidth}{4pt}
\newlength{\changebarsep}
-\setlength{\changebarsep}{30pt}
+\setlength{\changebarsep}{0.5\marginparsep}
\newcounter{changebargrey}
\setcounter{changebargrey}{65}
\@ifpackagewith{changebar}{\csname cb@color@pkg\endcsname}{%
@@ -915,6 +1079,11 @@
\fi
\ltx@end@float}
\let\end@float\cb@end@float
+\let\ltx@@xympar\@xympar
+\def\@xympar{%
+ \let\end@float\ltx@end@float
+ \ltx@@xympar
+ \let\end@float\cb@end@float}
\let\flt@float@end\float@end
\def\float@end{%
\cb@trace@stack{end float on page \the\c@page}%