Backup of today's work. Still awaiting a couple more editorial inputs.
[dwarf-doc.git] / dwarf5 / latexdoc / dwarfchangebarpatch.tex
1 %%%
2 % PROBLEM: The changebar package creates a page or two full of \93spsp\94 
3 % groups at the end of the document.
4 %
5 % SOLUTION: The following must be invoked in the preamble prior to the
6 % \usepackage command for changebar.
7 %
8 % For further information, see http://tex.stackexchange.com/questions/162332,
9 % also known as http://tex.stackexchange.com/questions/162332/why-does-the-changebar-package-create-a-page-full-of-spsp-and-how-can-this-be
10 % (or do a web search for "latex spsp").
11 %%%
12 \makeatletter
13 \AtEndDocument{%
14 \def\cb@checkPdfxy#1#2#3#4#5{%
15 \cb@@findpdfpoint{#1}{#2}%
16 \ifdim#3sp=\cb@pdfx\relax      % <<-- original has \ifnum#3=\cb@pdfx
17 \ifdim#4sp=\cb@pdfy\relax      % <<-- original has \ifnum#4=\cb@pdfy
18 \ifdim#5=\cb@pdfz\relax
19 \else
20 \cb@error
21 \fi
22 \else
23 \cb@error
24 \fi
25 \else
26 \cb@error
27 \fi
28 }}
29 \makeatother