texlive[44954] Master: xechangebar (4aug17)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 5 00:08:43 CEST 2017


Revision: 44954
          http://tug.org/svn/texlive?view=revision&revision=44954
Author:   karl
Date:     2017-08-05 00:08:43 +0200 (Sat, 05 Aug 2017)
Log Message:
-----------
xechangebar (4aug17)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-xetex.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/xelatex/xechangebar/
    trunk/Master/texmf-dist/doc/xelatex/xechangebar/README
    trunk/Master/texmf-dist/doc/xelatex/xechangebar/cbtest1.tex
    trunk/Master/texmf-dist/tex/xelatex/xechangebar/
    trunk/Master/texmf-dist/tex/xelatex/xechangebar/xechangebar.sty
    trunk/Master/tlpkg/tlpsrc/xechangebar.tlpsrc

Added: trunk/Master/texmf-dist/doc/xelatex/xechangebar/README
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xechangebar/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/xechangebar/README	2017-08-04 22:08:43 UTC (rev 44954)
@@ -0,0 +1,11 @@
+This is package xechangebar that extends package changebar
+so it can be used with XeLaTeX. The package introduces the
+new option `xetex' for use with XeLaTeX. Everything else
+remains the same and users should consult the original 
+documenation for usage information.
+
+Apostolos Syropoulos
+asyropoulos at yahoo.com
+
+Xanthi, Greece
+2017/08/03


Property changes on: trunk/Master/texmf-dist/doc/xelatex/xechangebar/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/xechangebar/cbtest1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xechangebar/cbtest1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/xechangebar/cbtest1.tex	2017-08-04 22:08:43 UTC (rev 44954)
@@ -0,0 +1,319 @@
+\documentclass[12pt,twoside]{article}
+\usepackage{amsmath}
+\usepackage[outerbars,color,xetex]{changebar}
+\usepackage{xltxtra}
+\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}
+\setmainfont[Mapping=tex-text,Ligatures=Common]{Minion Pro}
+%\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}
+


Property changes on: trunk/Master/texmf-dist/doc/xelatex/xechangebar/cbtest1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/xelatex/xechangebar/xechangebar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xechangebar/xechangebar.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/xelatex/xechangebar/xechangebar.sty	2017-08-04 22:08:43 UTC (rev 44954)
@@ -0,0 +1,1158 @@
+%%
+%%  
+%% Copyright (C) 1994-2005 Johannes Braams,  All rights reserved.
+%% Copyright (C) 2017 Apostolos Syropoulos,  All rights reserved.
+%% Modified by Apostolos Syropoulos for use with XeLaTeX
+%% --------------------------------------------------------------
+%% 
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainer of this work is Johannes Braams.
+%% 
+%% This file may only be distributed together with a copy of the
+%% changebar package. You may however distribute thechangebar package
+%% without such generated files.
+%% 
+%% The list of all files belonging to the changebar package is
+%% given in the file `manifest.txt.
+%% 
+%% 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.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xechangebar}
+           [2017/08/03 v1.0 Extends v3.5c of package changebar]
+\def\cb at maxpoint{80}
+\def\cb at minpoint{1}
+\def\cb at nil{0}
+\newcount\cb at nextpoint
+\cb at nextpoint=\cb at minpoint
+\newcount\cb at topleft
+\newcount\cb at topright
+\newcount\cb at botleft
+\newcount\cb at botright
+\newcount\cb at cnta
+\newcount\cb at cntb
+\newdimen\cb at dima
+\newdimen\cb at curbarwd
+\newcount\cb at page
+\newcount\cb at pagecount
+\cb at pagecount=0
+\def\cb at barsplace{0}
+\newif\if at cb@trace
+\newif\if at cb@firstcolumn
+\def\cb at pdfxy#1#2#3#4#5{}
+\newdimen\cb at odd@left
+\newdimen\cb at odd@right
+\newdimen\cb at even@left
+\newdimen\cb at even@right
+\def\cb at positions{%
+  \global\cb at odd@left=\hoffset
+  \global\cb at even@left\cb at odd@left
+  \global\advance\cb at odd@left by \oddsidemargin
+  \global\cb at odd@right\cb at odd@left
+  \global\advance\cb at odd@right by \textwidth
+  \global\advance\cb at odd@right by \changebarsep
+  \global\advance\cb at odd@right by 0.5\changebarwidth
+  \global\advance\cb at odd@left by -\changebarsep
+  \global\advance\cb at odd@left by -0.5\changebarwidth
+  \if at twoside
+    \global\advance\cb at even@left by \evensidemargin
+    \global\cb at even@right\cb at even@left
+    \global\advance\cb at even@left by -\changebarsep
+    \global\advance\cb at even@left by -0.5\changebarwidth
+    \global\advance\cb at even@right by \textwidth
+    \global\advance\cb at even@right by \changebarsep
+    \global\advance\cb at even@right by 0.5\changebarwidth
+  \else
+    \global\let\cb at even@left\cb at odd@left
+    \global\let\cb at even@right\cb at odd@right
+  \fi
+  }
+{\catcode`\p=12\catcode`\t=12 \gdef\cb at removedim#1pt{#1}}
+\DeclareOption{DVItoLN03}{\global\chardef\cb at driver@setup=0\relax}
+\DeclareOption{dvitoln03}{\global\chardef\cb at driver@setup=0\relax}
+\DeclareOption{DVItoPS}{\global\chardef\cb at driver@setup=1\relax}
+\DeclareOption{dvitops}{\global\chardef\cb at driver@setup=1\relax}
+\DeclareOption{DVIps}{\global\chardef\cb at driver@setup=2\relax}
+\DeclareOption{dvips}{\global\chardef\cb at driver@setup=2\relax}
+\DeclareOption{emTeX}{\global\chardef\cb at driver@setup=3\relax}
+\DeclareOption{emtex}{\global\chardef\cb at driver@setup=3\relax}
+\DeclareOption{textures}{\global\chardef\cb at driver@setup=4\relax}
+\DeclareOption{Textures}{\global\chardef\cb at driver@setup=4\relax}
+\DeclareOption{VTeX}{\global\chardef\cb at driver@setup=5\relax}
+\DeclareOption{vtex}{\global\chardef\cb at driver@setup=5\relax}
+\DeclareOption{PDFTeX}{\cb at pdftexcheck}
+\DeclareOption{pdftex}{\cb at pdftexcheck}
+\DeclareOption{xetex}{\cb at xetexcheck}  
+\def\cb at pdftexcheck{%
+  \ifx\pdfsavepos\@undefined\cb at pdftexerror
+  \else\ifx\pdfoutput\@undefined\cb at pdftexerror
+  \else\ifnum\pdfoutput>0
+    \global\chardef\cb at driver@setup=6\relax
+    \ifx\cb at writexy\@undefined
+      \newwrite\cb at writexy
+      \newread\cb at readxy
+      \immediate\openout\cb at writexy=\jobname.cb2\relax
+    \fi
+    \gdef\cb at pdfxy##1##2##3##4##5{%
+      \immediate\write\cb at writexy{##1.##2p##3,##4,##5}%
+      \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
+  \else\cb at pdftexerror\fi\fi\fi}
+\def\cb at pdftexerror{\PackageError
+      {changebar}%
+      {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}}
+\def\cb at xetexcheck{%  
+  \expandafter\ifx\csname XeTeXrevision\endcsname\@undefined \cb at xetexerror
+  \else
+    \global\chardef\cb at driver@setup=7\relax
+    \ifx\cb at writexy\@undefined
+      \newwrite\cb at writexy
+      \newread\cb at readxy
+      \immediate\openout\cb at writexy=\jobname.cb2\relax
+    \fi
+    \gdef\cb at pdfxy##1##2##3##4##5{%
+      \immediate\write\cb at writexy{##1.##2p##3,##4,##5}%
+      \expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
+    \gdef\sec at nd@ftw@##1 ##2{##2}
+  \fi}
+\def\cb at xetexerror{\PackageError
+      {changebar}%
+      {XeTeX option cannot be used}%
+      {You are not using XeLaTeX}}
+\DeclareOption{outerbars}{\def\cb at barsplace{1}}
+\DeclareOption{innerbars}{\def\cb at barsplace{0}}
+\DeclareOption{leftbars}{\def\cb at barsplace{2}}
+\DeclareOption{rightbars}{\def\cb at barsplace{3}}
+\DeclareOption{traceon}{\@cb at tracetrue}
+\DeclareOption{traceoff}{\@cb at tracefalse}
+\DeclareOption{tracestacks}{%
+  \let\cb at trace@stack\cb@@show at stack
+  \def\cb at trace@push#1{\cb at trace{%
+      Pushed point \the\cb at topleft\space on \noexpand#1: #1}}%
+  \def\cb at trace@pop#1{\cb at trace{%
+      Popped point \the\cb at topleft\space from \noexpand#1: #1}}%
+  }
+\DeclareOption{grey}{%
+  \def\cb at ps@color{\thechangebargrey\space 100 div setgray}}
+\DeclareOption{color}{%
+  \def\cb at ps@color{\expandafter\c at lor@to at ps\cb at current@color\@@}%
+  \def\cb at color@pkg{color}}
+\DeclareOption{xcolor}{%
+  \def\cb at ps@color{\expandafter\c at lor@to at ps\cb at current@color\@@}%
+  \def\cb at color@pkg{xcolor}}
+\DeclareOption*{\OptionNotUsed\PackageError
+      {changebar}%
+      {Unrecognised option `\CurrentOption'\MessageBreak
+        known options are dvitoln03, dvitops, dvips,\MessageBreak
+        emtex, textures, pdftex, and vtex
+        grey, color, xcolor,\MessageBreak
+        outerbars, innerbars, leftbars and rightbars}}
+\ifx\VTeXversion\@undefined
+  \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}
+\fi
+\InputIfFileExists{changebar.cfg}{}{}
+\def\cb@@show at stack#1{%
+  \cb at trace{%
+    stack status at #1:\MessageBreak
+    current stack: \cb at currentstack\MessageBreak
+    \@spaces end stack: \cb at endstack\MessageBreak
+    \space\space begin stack: \cb at beginstack\MessageBreak
+    history stack: \cb at historystack
+    }}
+\let\cb at trace@stack\@gobble
+\let\cb at trace@push\@gobble
+\let\cb at trace@pop\@gobble
+\ProcessOptions\relax
+\ifx\pdfsavepos\@undefined
+\else
+  \ifx\pdfoutput\@undefined
+  \else
+    \ifnum\pdfoutput>0
+      \global\chardef\cb at driver@setup=6\relax
+    \fi
+  \fi
+\fi
+\newcommand{\cb at trace}[1]{%
+  \if at cb@trace
+    \GenericWarning
+      {(changebar)\@spaces\@spaces}%
+      {Package changebar: #1\@gobble}%
+  \fi
+  }
+\if at compatibility
+  \def\driver#1{%
+    \bgroup\edef\next{\def\noexpand\tempa{#1}}%
+      \uppercase\expandafter{\next}%
+      \def\LN{DVITOLN03}%
+      \def\DVItoPS{DVITOPS}%
+      \def\DVIPS{DVIPS}%
+      \def\emTeX{EMTEX}%
+      \def\Textures{TEXTURES}%
+      \def\VTeX{VTEX}%
+      \def\pdfTeX{PDFTEX}
+      \def\xetex{XETEX}
+      \global\chardef\cb at driver@setup=0\relax
+      \ifx\tempa\LN       \global\chardef\cb at driver@setup=0\fi
+      \ifx\tempa\DVItoPS  \global\chardef\cb at driver@setup=1\fi
+      \ifx\tempa\DVIPS    \global\chardef\cb at driver@setup=2\fi
+      \ifx\tempa\emTeX    \global\chardef\cb at driver@setup=3\fi
+      \ifx\tempa\Textures \global\chardef\cb at driver@setup=4\fi
+      \ifx\tempa\VTeX     \global\chardef\cb at driver@setup=5\fi
+      \ifx\tempa\pdfTeX   \cb at pdftexcheck\fi
+      \ifx\tempa\xeTeX    \cb at xetexcheck\fi
+    \egroup}
+  {\def\do{\noexpand\do\noexpand}
+    \xdef\@preamblecmds{\@preamblecmds \do\driver}
+    }
+\fi
+\def\cb at trace@defpoint#1#2{%
+  \cb at trace{%
+    defining point \the#1 at position \the#2
+    \MessageBreak
+    cb at pagecount: \the\cb at pagecount; page \thepage}}
+\def\cb at trace@connect#1#2#3{%
+  \cb at trace{%
+    connecting points \the#1 and \the#2; barwidth: \the#3
+    \MessageBreak
+    cb at pagecount: \the\cb at pagecount; page \thepage}}
+\def\cb at setup@specials{%
+\ifcase\cb at driver@setup
+  \def\cb at defpoint##1##2{%
+    \special{ln03:defpoint \the##1(\the##2,)}%
+    \cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{%
+    \special{ln03:connect \the##1\space\space \the##2\space \the##3}%
+    \cb at trace@connect##1##2##3}
+  \def\cb at resetpoints{%
+    \special{ln03:resetpoints \cb at minpoint \space\cb at maxpoint}}
+\or
+  \def\cb at defpoint##1##2{%
+    \special{dvitops: inline
+                \expandafter\cb at removedim\the##2\space 6.5536 mul\space
+                /CBarX\the##1\space exch def currentpoint exch pop
+                /CBarY\the##1\space exch def}%
+    \cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{%
+    \special{dvitops: inline
+                gsave \cb at ps@color\space
+                \expandafter\cb at removedim\the##3\space 6.5536 mul\space
+                CBarX\the##1\space\space CBarY\the##1\space\space moveto
+                CBarX\the##2\space\space CBarY\the##2\space\space lineto
+                stroke grestore}%
+    \cb at trace@connect##1##2##3}
+  \let\cb at resetpoints\relax
+\or
+  \def\cb at defpoint##1##2{%
+     \special{ps:
+                \expandafter\cb at removedim\the##2\space
+                Resolution\space mul\space 72.27\space div\space
+                /CBarX\the##1\space exch def currentpoint exch pop
+                /CBarY\the##1\space exch def}%
+    \cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{%
+    \special{ps:
+                gsave \cb at ps@color\space
+                \expandafter\cb at removedim\the##3\space
+                Resolution\space mul\space 72.27\space div\space
+                setlinewidth
+                CBarX\the##1\space\space CBarY\the##1\space\space moveto
+                CBarX\the##2\space\space CBarY\the##2\space\space lineto
+                stroke grestore}%
+    \cb at trace@connect##1##2##3}
+  \let\cb at resetpoints\relax
+\or
+  \def\cb at defpoint##1##2{%
+    \special{em:point \the##1,\the##2}%
+    \cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{%
+    \special{em:line \the##1,\the##2,\the##3}%
+    \cb at trace@connect##1##2##3}
+  \let\cb at resetpoints\relax
+\or
+  \def\cb at defpoint##1##2{%
+    \special{postscript 0 0 transform}% leave [x,y] on the stack
+    \special{rawpostscript
+                \expandafter\cb at removedim\the##2\space
+                /CBarX\the##1\space exch def
+                itransform exch pop
+                /CBarY\the##1\space exch def}%
+    \if at cb@trace\cb at trace@defpoint##1##2\fi}
+  \def\cb at connect##1##2##3{%
+    \special{rawpostscript
+                gsave 1 setlinecap \cb at ps@color\space
+                \expandafter\cb at removedim\the##3\space
+                setlinewidth
+                CBarX\the##1\space\space CBarY\the##1\space\space moveto
+                CBarX\the##2\space\space CBarY\the##2\space\space lineto
+                stroke grestore}%
+    \if at cb@trace\cb at trace@connect##1##2##3\fi}
+  \let\cb at resetpoints\relax
+\or
+  \def\cb at defpoint##1##2{%
+    \special{pS:
+                \expandafter\cb at removedim\the##2\space
+                Resolution\space mul\space 72.27\space div\space
+                /CBarX\the##1\space exch def currentpoint exch pop
+                /CBarY\the##1\space exch def}%
+    \cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{%
+    \special{pS:
+                gsave \cb at ps@color\space
+                \expandafter\cb at removedim\the##3\space
+                Resolution\space mul\space 72.27\space div\space
+                setlinewidth
+                CBarX\the##1\space\space CBarY\the##1\space\space moveto
+                CBarX\the##2\space\space CBarY\the##2\space\space lineto
+                stroke grestore}%
+    \cb at trace@connect##1##2##3}
+  \let\cb at resetpoints\relax
+\or
+  \immediate\closeout\cb at writexy
+  \immediate\openin\cb at readxy=\jobname.cb2\relax
+  \def\cb at pdfpoints{}
+  \def\cb at pdfpagenr{0}
+  \def\cb at findpdfpoint##1##2{%
+      \edef\cb at temp
+        {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}%
+      \cb at temp
+  }
+  \def\cb@@findpdfpoint##1##2{%
+    \ifnum##2<\cb at pdfpagenr\relax\else
+      \cb at pdfreadxy{##2}%
+    \fi
+    \let\cb at pdfx\relax
+    \ifx\cb at pdfpoints\@empty\else
+      \ifnum##2<0\relax
+      \else
+        \edef\cb at temp{\noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \cb at temp
+      \fi
+    \fi
+  }
+  \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \ifnum ##1=##3
+      \ifnum ##2=##4
+        \def\cb at pdfx{##5sp}%
+        \def\cb at pdfy{##6sp}%
+        \def\cb at pdfz{##7pt}%
+        \let\cb at next\relax
+        \gdef\cb at pdfpoints{##9##8}%
+      \fi
+    \fi
+    \ifx\relax##8\relax
+      \let\cb at next\relax
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfreadxy##1{%
+    \let\cb at next\relax
+    \ifeof\cb at readxy
+      \global\let\cb at pdfpagenr\cb at maxpoint
+    \else
+      {\endlinechar=-1\read\cb at readxy to\cb at temp
+        \ifx\cb at temp\@empty\else
+          \expandafter\cb at pdfparsexy\cb at temp
+          \ifnum\cb at pdfpg<0\else
+            \xdef\cb at pdfpoints{\cb at pdfpoints\cb at temp}%
+            \cb at trace{PDFpoints=\cb at pdfpoints}%
+            \global\let\cb at pdfpagenr\cb at pdfpg
+          \fi
+          \ifnum\cb at pdfpg>##1\else
+            \global\def\cb at next{\cb at pdfreadxy{##1}}%
+          \fi
+        \fi
+      }%
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfparsexy##1.##2p##3,##4,##5pt{%
+    \def\cb at pdfpg{##2}}%
+  \def\cb at defpoint##1##2{%
+    \if at filesw
+      \begingroup
+        \edef\point{{\the##1}{\the\cb at pagecount}}%
+        \let\the=\z@
+        \pdfsavepos
+        \edef\cb at temp{\write\@auxout
+          {\string\cb at pdfxy\point
+            {\the\pdflastxpos}{\the\pdflastypos}{\the##2}}}%
+        \cb at temp
+      \endgroup
+    \fi
+    \cb at trace@defpoint##1##2%
+  }%
+  \def\cb at cvtpct##1{%
+    \ifnum##1<0 0\else
+    \ifnum##1>99 1\else
+    \ifnum##1<10 0.0\the##1\else
+    0.\the##1\fi\fi\fi}
+  \def\cb at connect##1##2##3{%
+    \cb at findpdfpoint{##1}\cb at pagecount
+    \ifx\cb at pdfx\relax\cb at rerun
+    \else
+      \let\cb at pdftopy\cb at pdfy
+      \cb at findpdfpoint{##2}\cb at pagecount
+      \ifx\cb at pdfx\relax\cb at rerun
+      \else
+         \begingroup
+           \cb at dima=\cb at pdfz
+           \advance\cb at dima by-\cb at pdfx
+           \advance\cb at dima by1in
+           \cb at dima=0.996264009963\cb at dima\relax
+           \ifx\cb at current@color\@undefined
+             \def\cb at temp{\cb at cvtpct\c at changebargrey}%
+             \pdfliteral{q \cb at temp\space g \cb at temp\space G}%
+           \else
+             \pdfliteral{q \cb at current@color}%
+           \fi
+           \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
+           \cb at dima=\cb at pdftopy
+           \advance\cb at dima-\cb at pdfy\relax
+           \cb at dima=0.996264009963\cb at dima\relax
+           ##3=0.996264009963##3\relax
+           \pdfliteral direct{\expandafter\cb at removedim\the##3 w
+             \cb at temp 0 m
+             \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
+        \endgroup
+        \cb at cntb=##1\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+        \cb at cntb=##2\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+      \fi
+    \fi
+    \cb at trace@connect##1##2##3%
+  }%
+  \gdef\cb at checkPdfxy##1##2##3##4##5{%
+    \cb@@findpdfpoint{##1}{##2}%
+    \ifnum##3=\cb at pdfx\relax
+      \ifnum##4=\cb at pdfy\relax
+        \ifdim##5=\cb at pdfz\relax
+        \else
+        \cb at error
+        \fi
+      \else
+        \cb at error
+      \fi
+    \else
+      \cb at error
+    \fi
+  }
+  \def\cb at maxpoint{9999999}
+  \let\cb at resetpoints\relax
+\or
+%xetex
+  \immediate\closeout\cb at writexy
+  \immediate\openin\cb at readxy=\jobname.cb2\relax
+  \def\cb at pdfpoints{}
+  \def\cb at pdfpagenr{0}
+  \def\cb at findpdfpoint##1##2{%
+      \edef\cb at temp
+        {\noexpand\cb@@findpdfpoint{\the##1}{\the##2}}%
+      \cb at temp
+  }
+  \def\cb@@findpdfpoint##1##2{%
+    \ifnum##2<\cb at pdfpagenr\relax\else
+      \cb at pdfreadxy{##2}%
+    \fi
+    \let\cb at pdfx\relax
+    \ifx\cb at pdfpoints\@empty\else
+      \ifnum##2<0\relax
+      \else
+        \edef\cb at temp{\noexpand\cb at pdffind{##1}{##2}\cb at pdfpoints\relax{}}%
+        \cb at temp
+      \fi
+    \fi
+  }
+  \def\cb at pdffind##1##2##3.##4p##5,##6,##7pt##8\relax##9{%
+    \def\cb at next{\cb at pdffind{##1}{##2}##8\relax{##9##3.##4p##5,##6,##7pt}}%
+    \ifnum ##1=##3
+      \ifnum ##2=##4
+        \def\cb at pdfx{##5sp}%
+        \def\cb at pdfy{##6sp}%
+        \def\cb at pdfz{##7pt}%
+        \let\cb at next\relax
+        \gdef\cb at pdfpoints{##9##8}%
+      \fi
+    \fi
+    \ifx\relax##8\relax
+      \let\cb at next\relax
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfreadxy##1{%
+    \let\cb at next\relax
+    \ifeof\cb at readxy
+      \global\let\cb at pdfpagenr\cb at maxpoint
+    \else
+      {\endlinechar=-1\read\cb at readxy to\cb at temp
+        \ifx\cb at temp\@empty\else
+          \expandafter\cb at pdfparsexy\cb at temp
+          \ifnum\cb at pdfpg<0\else
+            \xdef\cb at pdfpoints{\cb at pdfpoints\cb at temp}%
+            \cb at trace{PDFpoints=\cb at pdfpoints}%
+            \global\let\cb at pdfpagenr\cb at pdfpg
+          \fi
+          \ifnum\cb at pdfpg>##1\else
+            \global\def\cb at next{\cb at pdfreadxy{##1}}%
+          \fi
+        \fi
+      }%
+    \fi
+    \cb at next
+  }%
+  \def\cb at pdfparsexy##1.##2p##3,##4,##5pt{%
+    \def\cb at pdfpg{##2}}%
+  \def\cb at defpoint##1##2{%
+    \if at filesw
+      \begingroup
+        \edef\point{{\the##1}{\the\cb at pagecount}}%
+        \let\the=\z@
+        \pdfsavepos
+        \edef\cb at temp{\write\@auxout
+          {\string\cb at pdfxy\point
+            {\the\pdflastxpos}{\the\pdflastypos}{\the##2}}}%
+        \cb at temp
+      \endgroup
+    \fi
+    \cb at trace@defpoint##1##2%
+  }%
+  \def\cb at cvtpct##1{%
+    \ifnum##1<0 0\else
+    \ifnum##1>99 1\else
+    \ifnum##1<10 0.0\the##1\else
+    0.\the##1\fi\fi\fi}
+  \def\cb at connect##1##2##3{%
+    \cb at findpdfpoint{##1}\cb at pagecount
+    \ifx\cb at pdfx\relax\cb at rerun
+    \else
+      \let\cb at pdftopy\cb at pdfy
+      \cb at findpdfpoint{##2}\cb at pagecount
+      \ifx\cb at pdfx\relax\cb at rerun
+      \else
+         \begingroup
+           \cb at dima=\cb at pdfz
+           \advance\cb at dima by-\cb at pdfx
+           \advance\cb at dima by1in
+           \cb at dima=0.996264009963\cb at dima\relax
+           \ifx\cb at current@color\@undefined
+             \def\cb at temp{\cb at cvtpct\c at changebargrey}%
+             \special{pdf:literal q \cb at temp\space g\space\cb at temp\space G}%
+           \else
+             \special{pdf:literal q \expandafter\sec at nd@ftw@\cb at current@color\space RG 
+                                    \expandafter\sec at nd@ftw@\cb at current@color\space rg}%
+           \fi
+           \edef\cb at temp{\expandafter\cb at removedim\the\cb at dima\space}%
+           \cb at dima=\cb at pdftopy
+           \advance\cb at dima-\cb at pdfy\relax
+           \cb at dima=0.996264009963\cb at dima\relax
+           ##3=0.996264009963##3\relax 
+           \special{pdf:literal \expandafter\cb at removedim\the##3 w
+             \cb at temp 0 m
+             \cb at temp \expandafter\cb at removedim\the\cb at dima\space l S Q}%
+        \endgroup
+        \cb at cntb=##1\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+        \cb at cntb=##2\relax
+        \ifodd\cb at cntb\advance\cb at cntb 1\else\advance\cb at cntb -1\fi
+        \cb at findpdfpoint\cb at cntb\cb at pagecount
+      \fi
+    \fi
+    \cb at trace@connect##1##2##3%
+  }%
+  \gdef\cb at checkPdfxy##1##2##3##4##5{%
+    \cb@@findpdfpoint{##1}{##2}%
+    \ifnum##3=\cb at pdfx\relax
+      \ifnum##4=\cb at pdfy\relax
+        \ifdim##5=\cb at pdfz\relax
+        \else
+        \cb at error
+        \fi
+      \else
+        \cb at error
+      \fi
+    \else
+      \cb at error
+    \fi
+  }
+  \def\cb at maxpoint{9999999}
+  \let\cb at resetpoints\relax
+%
+\or
+\else
+  \PackageWarning{Changebar}{changebars not supported in unknown setup}
+  \def\cb at defpoint##1##2{\cb at trace@defpoint##1##2}
+  \def\cb at connect##1##2##3{\cb at trace@connect##1##2##3}
+  \let\cb at resetpoints\relax
+\fi
+\global\let\cb at setup@specials\relax}
+\newcommand*{\cbstart}{\@ifnextchar [%]
+                        {\cb at start}%
+                        {\cb at start[\changebarwidth]}}
+\newcommand*{\cbend}{\cb at end}
+\newcommand*{\cbdelete}{\@ifnextchar [%]
+  {\cb at delete}%
+  {\cb at delete[\deletebarwidth]}}
+\def\cb at delete[#1]{\vbox to \z@{\vss\cb at start[#1]\vskip #1\cb at end}}
+\newenvironment{changebar}%
+               {\@ifnextchar [{\cb at start}%
+                              {\cb at start[\changebarwidth]}}%
+               {\cb at end}
+\newcommand*{\nochangebars}{%
+  \def\cb at start[##1]{}%
+  \def\cb at delete[##1]{}%
+  \let\cb at end\relax}
+\newlength{\changebarwidth}
+\setlength{\changebarwidth}{2pt}
+\newlength{\deletebarwidth}
+\setlength{\deletebarwidth}{4pt}
+\newlength{\changebarsep}
+\setlength{\changebarsep}{30pt}
+\newcounter{changebargrey}
+\setcounter{changebargrey}{65}
+\@ifpackagewith{changebar}{\csname cb at color@pkg\endcsname}{%
+    \RequirePackage{\cb at color@pkg}%
+  \DeclareRobustCommand\cbcolor{%
+    \@ifnextchar[\@undeclaredcbcolor\@declaredcbcolor}
+  \def\@undeclaredcbcolor[#1]#2{%
+    \begingroup
+      \color[#1]{#2}%
+      \global\let\cb at current@color\current at color
+    \endgroup
+    \ignorespaces
+    }
+  \def\@declaredcbcolor#1{%
+    \begingroup
+      \color{#1}%
+      \global\let\cb at current@color\current at color
+    \endgroup
+    \ignorespaces}%
+  }{%
+  \def\cbcolor{\@ifnextchar[%]
+    \@@cbcolor\@cbcolor}%
+  \def\@@cbcolor[#1]#2{\cb at colwarn\def\@@cbcolor[##1]##2{}}%
+  \def\@cbcolor#1{\cb at colwarn\def\@cbcolor##1{}}%
+  \def\cb at colwarn{\PackageWarning{Changebar}%
+    {You didn't specify the option `color';\MessageBreak
+      your command \string\cbcolor\space will be ignored}}%
+  }
+\def\cb at start[#1]{%
+  \cb at topleft=\cb at nextpoint
+  \cb at curbarwd#1\relax
+  \cb at push\cb at currentstack
+  \cb at checkpage\z@
+  \cb at cnta\cb at pagecount
+  \cb at pagecount\cb at page\advance\cb at pagecount\m at ne
+  \ifvmode
+    \cb at setBeginPoints
+  \else
+    \vbox to \z@{%
+      \vskip -\ht\strutbox
+      \cb at setBeginPoints
+      \vskip \ht\strutbox}%
+  \fi
+  \cb at pagecount\cb at cnta
+  \cb at advancePoint}
+\def\cb at advancePoint{%
+  \global\advance\cb at nextpoint by 4\relax
+  \ifnum\cb at nextpoint>\cb at maxpoint
+    \global\cb at nextpoint=\cb at minpoint\relax
+  \fi}
+\def\cb at end{%
+  \cb at trace@stack{end of bar on page \the\c at page}%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+    \PackageWarning{Changebar}%
+      {Badly nested changebars; Expect erroneous results}%
+  \else
+    \cb at checkpage\thr@@
+    \cb at cnta\cb at pagecount
+    \cb at pagecount\cb at page\advance\cb at pagecount\m at ne
+    \ifvmode
+      \cb at setEndPoints
+    \else
+      \vadjust{\cb at setEndPoints}%
+    \fi
+    \cb at pagecount\cb at cnta
+  \fi
+  \ignorespaces}
+\def\cb at checkpage#1{%
+  \cb at cnta\cb at topleft\relax
+  \advance\cb at cnta by #1\relax
+  \cb at cntb\cb at page\relax
+  \cb at dima\cb at curbarwd\relax
+  \cb at pop\cb at historystack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \cb at FindPageNum
+    \ifnum\cb at topleft>\cb at maxpoint\else
+      \cb at cntb\cb at page
+    \fi
+    \@whilenum\cb at topleft>\cb at nil\do{%
+      \cb at push\cb at historystack
+      \cb at pop\cb at tempstack}%
+  \fi
+  \advance\cb at cnta by -#1\relax
+  \cb at topleft\cb at cnta\relax
+  \cb at page\cb at cntb\relax
+  \cb at curbarwd\cb at dima\relax
+  }
+\def\cb at FindPageNum{%
+  \ifnum\cb at topleft=\cb at cnta
+  \else
+    \cb at push\cb at tempstack
+    \cb at pop\cb at historystack
+    \ifnum\cb at topleft=\cb at nil
+      \cb at trace{Ran out of history stack, new changebar?}%
+      \cb at topleft\cb at maxpoint\advance\cb at topleft\@ne
+    \else
+      \expandafter\expandafter\expandafter\cb at FindPageNum
+    \fi
+  \fi
+  }%
+\def\cb at setBeginPoints{%
+  \cb at topright=\cb at topleft\advance\cb at topright by\@ne
+  \cb at cntb=\cb at pagecount
+  \divide\cb at cntb by\tw@
+  \ifodd\cb at cntb
+    \cb at defpoint\cb at topleft\cb at even@left
+    \cb at defpoint\cb at topright\cb at even@right
+  \else
+    \cb at defpoint\cb at topleft\cb at odd@left
+    \cb at defpoint\cb at topright\cb at odd@right
+  \fi
+  \cb at writeAux\cb at topleft
+  }
+\def\cb at setEndPoints{%
+  \cb at topright=\cb at topleft\advance\cb at topright by\@ne
+  \cb at botleft=\cb at topleft\advance\cb at botleft by\tw@
+  \cb at botright=\cb at topleft\advance\cb at botright by\thr@@
+   \cb at cntb=\cb at pagecount
+  \divide\cb at cntb by\tw@
+  \ifodd\cb at cntb
+    \cb at defpoint\cb at botleft\cb at even@left
+    \cb at defpoint\cb at botright\cb at even@right
+  \else
+    \cb at defpoint\cb at botleft\cb at odd@left
+    \cb at defpoint\cb at botright\cb at odd@right
+  \fi
+  \cb at writeAux\cb at botright
+  \edef\cb at leftbar{%
+    \noexpand\cb at connect{\cb at topleft}{\cb at botleft}{\cb at curbarwd}}%
+  \edef\cb at rightbar{%
+    \noexpand\cb at connect{\cb at topright}{\cb at botright}{\cb at curbarwd}}%
+  \if at twocolumn
+     \ifodd\cb at pagecount\cb at rightbar\else\cb at leftbar\fi
+  \else
+    \ifcase\cb at barsplace
+      \ifodd\cb at cntb
+        \cb at rightbar
+      \else
+        \if at twoside\cb at leftbar\else\cb at rightbar\fi
+      \fi
+    \or
+      \ifodd\cb at cntb
+        \cb at leftbar
+      \else
+        \if at twoside\cb at rightbar\else\cb at leftbar\fi
+      \fi
+    \or
+      \cb at leftbar
+    \or
+      \cb at rightbar
+    \fi
+  \fi
+  }%
+\def\cb at writeAux#1{%
+  \if at filesw
+    \begingroup
+      \edef\point{\the#1}%
+      \edef\level{\the\cb at curbarwd}%
+      \let\the=\z@
+      \edef\cb at temp{\write\@auxout
+        {\string\cb at barpoint{\point}{\the\cb at pagecount}{\level}}}%
+      \cb at temp
+    \endgroup
+  \fi}
+\newif\if at cb@pagejump
+\def\cb at pagejumplst{-1}
+\def\cb at nextpagejump{-1}
+\def\cb at pagejump#1{\xdef\cb at pagejumplst{\cb at pagejumplst,#1}}
+\def\cb at writepagejump#1{
+  \cb at cntb=\cb at pagecount
+  \advance\cb at cntb by#1\relax
+  \global\setbox\@leftcolumn\vbox to\@colht{%
+    \edef\cb at temp{\write\@auxout{\string\cb at pagejump{\the\cb at cntb}}}%
+    \cb at temp
+    \dimen@ \dp\@leftcolumn
+    \unvbox \@leftcolumn
+    \vskip -\dimen@
+  }%
+}
+\def\cb at poppagejump#1,#2\relax{%
+  \gdef\cb at nextpagejump{#1}%
+  \gdef\cb at pagejumplst{#2}}
+\def\cb at checkpagecount{%
+  \if at twocolumn
+    \if at firstcolumn
+      \ifodd\cb at pagecount\global\advance\cb at pagecount by\@ne\fi
+    \fi
+  \else
+    \ifodd\cb at pagecount\global\advance\cb at pagecount by\@ne\fi
+  \fi
+  \if at twoside
+    \cb at cntb=\cb at pagecount
+    \divide\cb at cntb by\tw@
+    \advance\cb at cntb by-\c at page
+    \ifodd\cb at cntb
+      \if at twocolumn
+        \if at firstcolumn
+          \@whilenum\cb at pagecount>\cb at nextpagejump\do{%
+            \expandafter\cb at poppagejump\cb at pagejumplst\relax}%
+          \ifnum\cb at pagecount=\cb at nextpagejump
+            \cb at trace{Page jump: \string\cb at pagecount=\the\cb at pagecount}
+            \global\advance\cb at pagecount by\tw@
+            \global\@cb at pagejumptrue
+          \else
+            \global\@cb at pagejumpfalse
+          \fi
+        \else
+          \if at cb@pagejump
+            \cb at writepagejump{-3}%
+          \fi
+        \fi
+      \fi
+    \else
+      \if at twocolumn
+        \if at firstcolumn
+          \global\advance\cb at pagecount by\tw@
+          \global\@cb at pagejumpfalse
+        \else
+          \if at cb@pagejump
+            \cb at trace{Page jump annulled, %
+                      \string\cb at pagecount=\the\cb at pagecount}
+          \else
+            \cb at writepagejump{-1}%
+            \global\advance\cb at pagecount by\tw@
+            \cb at rerun
+          \fi
+        \fi
+      \else
+        \global\advance\cb at pagecount by\tw@
+      \fi
+    \fi
+  \fi
+}
+\let\ltx at makecol\@makecol
+\def\cb at makecol{%
+  \if at twocolumn
+    \cb at trace{Twocolumn: \if at firstcolumn Left \else Right \fi column}%
+  \fi
+  \cb at trace@stack{before makecol, page \the\c at page,
+                  \string\cb at pagecount=\the\cb at pagecount}%
+  \let\cb at writeAux\@gobble
+  \cb at checkpagecount
+  \setbox\@cclv \vbox{%
+    \cb at resetpoints
+    \cb at startSpanBars
+    \unvbox\@cclv
+    \boxmaxdepth\maxdepth}%
+  \global\advance\cb at pagecount by\@ne
+  \cb at buildstack\cb at processActive
+  \ltx at makecol
+   \if at twocolumn
+     \global\setbox\@outputbox \vbox to\@colht {%
+       \if at firstcolumn\write\@auxout{\string\@cb at firstcolumntrue}%
+       \else\write\@auxout{\string\@cb at firstcolumnfalse}%
+       \fi
+       \dimen@ \dp\@outputbox
+       \unvbox \@outputbox
+       \vskip -\dimen@
+       }%
+   \fi
+  \cb at trace@stack{after makecol, page \the\c at page,
+                  \string\cb at pagecount=\the\cb at pagecount}%
+  }
+\let\@makecol\cb at makecol
+\let\ltx at vtryfc\@vtryfc
+\def\cb at vtryfc#1{%
+  \cb at trace{In vtryfc, page \the\c at page,
+                  \string\cb at pagecount=\the\cb at pagecount}%
+  \let\cb at writeAux\@gobble
+  \cb at checkpagecount
+  \ltx at vtryfc{#1}%
+  \if at twocolumn
+    \global\setbox\@outputbox \vbox to\@colht{%
+      \if at firstcolumn\write\@auxout{\string\@cb at firstcolumntrue}%
+      \else\write\@auxout{\string\@cb at firstcolumnfalse}%
+      \fi
+      \unvbox\@outputbox
+      \boxmaxdepth\maxdepth
+    }%
+  \fi
+  \global\advance\cb at pagecount by \@ne
+}
+\let\@vtryfc\cb at vtryfc
+\def\cb at processActive{%
+  \cb at pop\cb at endstack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \setbox\@cclv\vbox{%
+      \unvbox\@cclv
+      \boxmaxdepth\maxdepth
+      \advance\cb at pagecount by -1\relax
+      \cb at setEndPoints}%
+    \cb at push\cb at historystack
+    \cb at push\cb at beginstack
+    \expandafter\cb at processActive
+  \fi}
+\def\cb at startSpanBars{%
+  \cb at pop\cb at beginstack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \cb at setBeginPoints
+    \cb at trace@stack{after StartSpanBars, page \the\c at page}%
+    \expandafter\cb at startSpanBars
+  \fi
+  }
+\def\cb at buildstack{%
+  \cb at initstack\cb at endstack
+  \cb at pushNextActive}
+\def\cb at pushNextActive{%
+  \cb at pop\cb at historystack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \ifnum\cb at page>\cb at pagecount
+      \cb at push\cb at historystack
+    \else
+      \ifodd\cb at topleft
+        \cb at push\cb at endstack
+      \else
+        \cb at pop\cb at endstack
+      \fi
+      \expandafter\expandafter\expandafter\cb at pushNextActive
+    \fi
+  \fi}
+\def\cb at initstack#1{\xdef#1{}}
+\cb at initstack\cb at historystack
+\newwrite\cb at write
+\newread\cb at read
+\immediate\openout\cb at write=\jobname.cb\relax
+\cb at initstack\cb at endstack
+\cb at initstack\cb at beginstack
+\cb at initstack\cb at tempstack
+\cb at initstack\cb at currentstack
+\def\cb at thehistorystack{\cb at historystack}
+\def\cb at pop#1{%
+  \ifx #1\@empty
+    \def\cb at temp{#1}%
+    \ifx\cb at temp\cb at thehistorystack
+      \ifeof\cb at read
+      \else
+        {\endlinechar=-1\read\cb at read to\cb at temp
+         \xdef\cb at historystack{\cb at historystack\cb at temp}%
+        }%
+      \fi
+    \fi
+  \fi
+  \ifx#1\@empty
+    \global\cb at topleft\cb at nil
+    \global\cb at page\z@\relax
+  \else
+    \expandafter\cb at carcdr#1e#1%
+  \fi
+  \cb at trace@pop{#1}}
+\def\cb at carcdr#1n#2p#3l#4e#5{%
+  \global\cb at topleft#1\relax
+  \global\cb at page#2\relax
+  \global\cb at curbarwd#3\relax
+  \xdef#5{#4}}
+\def\cb at push#1{%
+  \xdef#1{\the\cb at topleft n\the\cb at page p\the\cb at curbarwd l#1}%
+  \cb at trace@push{#1}}
+
+\def\cb at barpoint#1#2#3{\cb at cnta=#2
+  \if at cb@firstcolumn\advance\cb at cnta by\m at ne\fi
+  \immediate\write\cb at write{#1n\the\cb at cnta p#3l}}
+\AtBeginDocument{%
+  \cb at setup@specials
+  \cb at pagejump{999999999,}%
+  \cb at positions
+  \cb at trace{%
+    Odd left : \the\cb at odd@left\space
+    Odd right : \the\cb at odd@right\MessageBreak
+    Even left: \the\cb at even@left\space
+    Even right: \the\cb at even@right
+    }%
+  \immediate\closeout\cb at write
+  \immediate\openin\cb at read=\jobname.cb}
+\AtEndDocument{%
+  \clearpage
+  \cb at initstack\cb at historystack
+  \immediate\closein\cb at read
+  \immediate\openin\cb at read=\jobname.cb%
+  \ifx\cb at readxy\@undefined
+  \else
+    \immediate\closein\cb at readxy
+    \immediate\openin\cb at readxy=\jobname.cb2%
+    \def\cb at pdfpoints{}%
+    \def\cb at pdfpagenr{0}%
+  \fi
+  \@cb at firstcolumnfalse
+  \cb at checkrerun
+  \let\cb at pdfxy\cb at checkPdfxy
+  \let\cb at pagejump\@gobble
+  \let\cb at barpoint\cb at checkHistory}
+\def\cb at checkHistory#1#2#3{%
+  \cb at pop\cb at historystack
+  \ifnum #1=\cb at topleft\relax
+    \cb at cnta=#2
+    \if at cb@firstcolumn\advance\cb at cnta by\m at ne\fi
+    \ifnum \cb at cnta=\cb at page\relax
+    \else
+      \cb at error
+    \fi
+  \else
+    \cb at error
+  \fi}
+\def\cb at checkPdfxy#1#2#3#4#5{}
+\def\cb at rerun{%
+  \global\let\cb at checkrerun\cb at error}
+\let\cb at checkrerun\relax
+\def\cb at error{%
+  \PackageWarning{Changebar}%
+    {Changebar info has changed.\MessageBreak
+     Rerun to get the bars right}
+  \gdef\cb at checkHistory##1##2##3{}%
+  \let\cb at barpoint\cb at checkHistory
+  \gdef\cb at checkPdfxy##1##2##3##4##5{}%
+  \let\cb at pdfxy\cb at checkPdfxy}
+\let\ltx at end@float\end at float
+\def\cb at end@float{%
+  \cb at trace@stack{end float on page \the\c at page}%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \cb at push\cb at currentstack
+    \global\cb at curbarwd=\cb at curbarwd
+    \@endfloatbox
+    \global\setbox\@currbox
+      \color at vbox
+      \normalcolor
+      \vbox\bgroup\cb at start[\cb at curbarwd]\unvbox\@currbox\cb at end
+  \fi
+  \ltx at end@float}
+\let\end at float\cb at end@float
+\let\flt at float@end\float at end
+\def\float at end{%
+  \cb at trace@stack{end float on page \the\c at page}%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \cb at push\cb at currentstack
+    \global\cb at curbarwd\cb at curbarwd
+    \@endfloatbox
+    \global\setbox\@currbox
+      \color at vbox
+      \normalcolor
+      \vbox\bgroup\cb at start[\cb at curbarwd]\unvbox\@currbox\cb at end
+  \fi
+  \let\end at float\ltx at end@float
+  \flt at float@end
+  }
+\let\ltx at end@dblfloat\end at dblfloat
+\def\cb at end@dblfloat{%
+  \if at twocolumn
+    \cb at trace@stack{end dblfloat on page \the\c at page}%
+    \cb at pop\cb at currentstack
+    \ifnum\cb at topleft=\cb at nil
+    \else
+      \cb at push\cb at currentstack
+      \global\cb at curbarwd=\cb at curbarwd
+      \@endfloatbox
+      \global\setbox\@currbox
+        \color at vbox
+        \normalcolor
+        \vbox\bgroup\cb at start[\cb at curbarwd]\unvbox\@currbox\cb at end
+    \fi
+    \@endfloatbox
+    \ifnum\@floatpenalty <\z@
+      \@largefloatcheck
+      \@cons\@dbldeferlist\@currbox
+    \fi
+    \ifnum \@floatpenalty =-\@Mii \@Esphack\fi
+  \else
+    \end at float
+  \fi}
+\let\end at dblfloat\cb at end@dblfloat
+\let\flt at float@dblend\float at dblend
+\def\float at dblend{%
+  \cb at trace@stack{end dbl float on page \the\c at page}%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+  \else
+    \cb at push\cb at currentstack
+    \global\cb at curbarwd=\cb at curbarwd
+    \@endfloatbox
+    \global\setbox\@currbox
+      \color at vbox
+      \normalcolor
+      \vbox\bgroup\cb at start[\cb at curbarwd]\unvbox\@currbox\cb at end
+  \fi
+  \let\end at dblfloat\ltx at end@dblfloat
+  \flt at float@dblend
+  }
+\let\ltx at footnotetext\@footnotetext
+\long\def\cb at footnotetext#1{%
+  \cb at trace@stack{end footnote on page \the\c at page}%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+    \ltx at footnotetext{#1}%
+  \else
+    \cb at push\cb at currentstack
+    \edef\cb at temp{\the\cb at curbarwd}%
+    \ltx at footnotetext{\cb at start[\cb at temp]#1\cb at end}%
+  \fi}
+\let\@footnotetext\cb at footnotetext
+\let\ltx at mpfootnotetext\@mpfootnotetext
+\long\def\cb at mpfootnotetext#1{%
+  \cb at pop\cb at currentstack
+  \ifnum\cb at topleft=\cb at nil
+    \ltx at mpfootnotetext{#1}%
+  \else
+    \cb at push\cb at currentstack
+    \edef\cb at temp{\the\cb at curbarwd}%
+    \ltx at mpfootnotetext{\cb at start[\cb at temp]#1\cb at end}%
+  \fi}
+\let\@mpfootnotetext\cb at mpfootnotetext
+\endinput
+%%
+%% End of file `xechangebar.sty'.


Property changes on: trunk/Master/texmf-dist/tex/xelatex/xechangebar/xechangebar.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-08-04 22:08:02 UTC (rev 44953)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-08-04 22:08:43 UTC (rev 44954)
@@ -666,7 +666,7 @@
   xargs xassoccnt xcharter xcite xcjk2uni xcntperchap
     xcolor xcolor-material xcolor-solarized
     xcomment xcookybooky xdoc xduthesis
-    xebaposter xecjk xecolor xecyr xeindex xellipsis
+    xebaposter xechangebar xecjk xecolor xecyr xeindex xellipsis
     xepersian xesearch xespotcolor
     xetex-devanagari xetex-itrans xetex-pstricks xetex-tibetan
     xetexfontinfo xetexko

Modified: trunk/Master/tlpkg/tlpsrc/collection-xetex.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-xetex.tlpsrc	2017-08-04 22:08:02 UTC (rev 44953)
+++ trunk/Master/tlpkg/tlpsrc/collection-xetex.tlpsrc	2017-08-04 22:08:43 UTC (rev 44954)
@@ -27,6 +27,7 @@
 depend unicode-bidi
 depend unisugar
 depend xebaposter
+depend xechangebar
 depend xecjk
 depend xecolor
 depend xecyr

Added: trunk/Master/tlpkg/tlpsrc/xechangebar.tlpsrc
===================================================================


More information about the tex-live-commits mailing list