| 1 |
% Supported drivers sofar: |
| 2 |
% dvitops (James Clark) |
| 3 |
% dvips (Tom Rokicki) |
| 4 |
% dvitoln03 (Brian {Hamilton Kelly}) |
| 5 |
% emTeX (dvidrv) (Eberhard Mattes) |
| 6 |
% VTeX (Michael Vulis) |
| 7 |
% PDFTeX (Piet van Oostrum) |
| 8 |
% XeTeX (Apostolos Syropoulos) |
| 9 |
% luaTeX |
| 10 |
% |
| 11 |
% change history |
| 12 |
% |
| 13 |
% Revisions: |
| 14 |
% Support for twosided.sty added. January, 1987. |
| 15 |
% |
| 16 |
% Warning message added to indicate that another pass is |
| 17 |
% required. May, 1987. |
| 18 |
% |
| 19 |
% Converted to work with dvitops. March 1990. |
| 20 |
% Neil Winton ([email protected]) |
| 21 |
% |
| 22 |
% Usage by several drivers SPQR [email protected] |
| 23 |
% |
| 24 |
% v2.0 22-11-90 JLB merged the original file with Niel Winton's mods |
| 25 |
% now supports both DVI2LN3 and DVItoPS specials. This introduces |
| 26 |
% one extra user-command, \device{<device>}. If he says \device{PS} |
| 27 |
% the PostScript \specials (DVItoPS by James Clark) will be used, |
| 28 |
% anything else gives the original LN03 \specials. |
| 29 |
% |
| 30 |
% v2.1 06-04-91 SPQR changed the \ifPS statements to be case |
| 31 |
% statements which check the value of a counter called \driver@setup, |
| 32 |
% and issue specials accordingly. dvitops, dvips and LN03 are only |
| 33 |
% drivers supported. |
| 34 |
% v2.2 07-03-91 JLB Located all \specials in one place by defining |
| 35 |
% the use of three new macros. Supplied a user command to select |
| 36 |
% the driver and added code to \document for initializing the |
| 37 |
% \special-macros. |
| 38 |
% v2.2a 08-03-91 JLB \ps@scale needs a different value for DVItoPS and DVIPS |
| 39 |
% so moved initialization of it inside \setup@specials |
| 40 |
% v2.2b 08-03-91 JLB The definitions of the \connect macro needed extra |
| 41 |
% \space commands, because its arguments can be control sequences. |
| 42 |
% v2.2c 08-04-91 JLB Removed use of \cb@beginSaves and \cb@saveBeginPoint |
| 43 |
% because - it didn't work as specified |
| 44 |
% - seemed unnecessary |
| 45 |
% - broke PostScript support because of use of \xdef |
| 46 |
% \cb@processActive now calls \cb@setBeginPoint instead of |
| 47 |
% \cb@saveBeginPoint. Left the code and comment in for now |
| 48 |
% until I'm sure this change doesn't break anything else... |
| 49 |
% v2.2d 30-4-91 EN changed resolution dependent parameters in dvips |
| 50 |
% specials so it will work on any device using the device's resolution. |
| 51 |
% Additionally added \newif\ifouterbars. \outerbarstrue will put |
| 52 |
% the bars to the outside of the pages. |
| 53 |
% Without the twoside option this will give right hand side bars. |
| 54 |
% The positioning of right edge changebars was off by \changebarsep, |
| 55 |
% this has been corrected also. |
| 56 |
% I do not know if there are changes needed in other than Tom Rokicki's |
| 57 |
% drivers since this is the only one I can test. |
| 58 |
% v2.2e 13-6-91 JB The documentation stated that the greylevel of the |
| 59 |
% changebar could be modified with the command |
| 60 |
% \setcounter{\changebargrey}{percentage}. |
| 61 |
% This was a mistake, \changebargrey was allocated using \newcount |
| 62 |
% (always). Now modified to use \newcount for plain TeX and |
| 63 |
% \newcounter for LaTeX. |
| 64 |
% v2.2f 15-10-91 JB Added support for the emTeX drivers, based on |
| 65 |
% information from Eberhard Mattes about version 1.4j of the dvidrv |
| 66 |
% program. Also started updating the documentation towards doc.sty |
| 67 |
% standards. |
| 68 |
% v2.3 15-10-91 JB Started merging this version of changebar.sty with |
| 69 |
% version, dated 1988, distributed with DVItoLN03. This will eventually |
| 70 |
% result in version 3.0, hopefully documented using doc.sty. |
| 71 |
% Removed vain attempt to make file compatile with plain. |
| 72 |
% v2.4 16-10-91 JB Reduced the number of points defined to two per |
| 73 |
% bar, removed the need for \cb@tempcnt while removing the problem |
| 74 |
% with incorrect changebars across pageboundaries in PostScript |
| 75 |
% mode. Also \ps@scale has been removed. |
| 76 |
% v3.0 14-nov-91 JB Completed converting the documentation to doc.sty |
| 77 |
% format. Also solved the problem with bars appearing on the wrong |
| 78 |
% side. |
| 79 |
% |
| 80 |
% v3.1 02-07-93 JB Finally got round to include Erich Neuwirth's comments |
| 81 |
% and made a new distribution. Erich corrected the placement of the |
| 82 |
% bars and the conversion of the coordinates when DVIps (Rokicki) |
| 83 |
% is used. Also included Hal Peterson's comments about spaces |
| 84 |
% creeping into the output. |
| 85 |
% |
| 86 |
% v3.1b 11-10-93 Spurious white space crept into footnotes because of |
| 87 |
% a missing %-sign. Found by Norm Walsh <[email protected]>. |
| 88 |
% Fixed. |
| 89 |
% |
| 90 |
% v3.2b 30-06-95 Finally got the LaTeX2e version working; see \changes |
| 91 |
% entries in the .dtx file to see what changed. |
| 92 |
% Changebar now uses the LaTeX option mechanism; so \driver |
| 93 |
% disappeared. |
| 94 |
% New options are leftbars and rightbars, tracon and traceoff. |
| 95 |
% |
| 96 |
% v3.2c 26-03-96 Reintroduced the \driver command in compatibility |
| 97 |
% mode. Fixed the checksum. |
| 98 |
% Juergen Vollmer <[email protected]> enhanced |
| 99 |
% the shell script which automatically adds changebar commands |
| 100 |
% to your document. |
| 101 |
% |
| 102 |
% v3.3a 26-09-97 Finally fixed the diagonal bars by (re-)introducing |
| 103 |
% four points for each bar (instead of two). Made it work with |
| 104 |
% LaTeX's twocolumn option. Fixed positioning problems. |
| 105 |
% |
| 106 |
% v3.3b 30-09-97 It turns out that the emTeX driver and dvips have |
| 107 |
% different ideas about their origin. Had to subtract 1 inch |
| 108 |
% from horizontal positions for emTeX drivers. |
| 109 |
% |
| 110 |
% v3.3d 28-10-97 It now turns out that Xdvi shows the changebars with |
| 111 |
% an offset of 1 inch; removed inappropriate pieces of code. |
| 112 |
% |
| 113 |
% v3.3e Added support for Textures (1.7.7), provided by James Ashton |
| 114 |
% <[email protected]> |
| 115 |
% Added chbar.1 to the distribution. The file was provided by |
| 116 |
% John A. Murdie <[email protected]> |
| 117 |
% |
| 118 |
% v3.3i Changebar didn't pay enough attention to the setting of |
| 119 |
% twoside. In onesided documents the value of \evensidemargin |
| 120 |
% should be ignored. |
| 121 |
% \cb@startSpanBars no longer pushes points on the current stack |
| 122 |
% as this confused the algorithm and was wrong anyway. |
| 123 |
% Introduced a tracing facility for the stack mechanisms |
| 124 |
% Now use the history stack to determine the final page on which |
| 125 |
% the beginning and ending of the changebars appear. This fixes |
| 126 |
% most problems with floating objects and diagonal bars at page |
| 127 |
% boundaries. |
| 128 |
% Redefined \cbstart and \cbend in terms of the LaTeX |
| 129 |
% environment. This catches wrong use of \cbstart ...\cbend with |
| 130 |
% respect to TeX's grouping levels. |
| 131 |
% |
| 132 |
% v3.3j The rightbars option was broken; |
| 133 |
% found by Richard Stanton" <[email protected]> |
| 134 |
% In the oneside mode \cb@even@right received no value instead |
| 135 |
% \cb@even@left was set equal to \cb@odd@left and reset |
| 136 |
% afterwards. |
| 137 |
% |
| 138 |
% v3.4a Michael Vulis submitted the code for VTeX support |
| 139 |
% |
| 140 |
% v3.4b Changebar and the color package clash; |
| 141 |
% found by Erwin Achermann <[email protected]> |
| 142 |
% Because of the extra group and box level for floating objects. |
| 143 |
% The redefinition in this package of \@endfloat didn't take |
| 144 |
% that into account. |
| 145 |
% repaired a few typos in the documentation. |
| 146 |
% Introduced support for coloured changebars with the dvips |
| 147 |
% driver. |
| 148 |
% |
| 149 |
% v3.4c small typo repaired |
| 150 |
% |
| 151 |
% v3.4d Autodetect VTeX and provide the right default driver; |
| 152 |
% added possibility of having changebar.cfg to specify a default |
| 153 |
% driver. |
| 154 |
% Issue an error when \cbcolor is used when the color option |
| 155 |
% isn't specified. |
| 156 |
% |
| 157 |
% v3.4e Double column floats didn't carry a change bar because the |
| 158 |
% LaTeX macro \end@dblfloat wasn't adapted for changebar |
| 159 |
% Changebars in the first column appeared twice because of |
| 160 |
% an error in the conditional which decides where to put the |
| 161 |
% bar. |
| 162 |
% The color error is now a warning. |
| 163 |
% Fixed a few typos. |
| 164 |
% Reverted the change in the definition of \cbstart and \cbend |
| 165 |
% as it prevented changebars starting inside an environment and |
| 166 |
% ending outside of it. |
| 167 |
% |
| 168 |
% v3.4f Fixed a problem with \changebarwidth; it seemed to become |
| 169 |
% hardwired due to a bug in the stack handling. \cb@checkpage |
| 170 |
% effectively changed the value of \cb@curbarwd. |
| 171 |
% |
| 172 |
% v3.4g When the preamble of the document changes the value of the |
| 173 |
% page counter the code gets confused when the new page number |
| 174 |
% is even. Now initialize \cb@pagecount to \c@page - 1. |
| 175 |
% The mechanism with \cb@pagecount and \cb@page may need a |
| 176 |
% redesign to make it robust. |
| 177 |
% |
| 178 |
% v3.4h Herbert Voss (Herbert dot Voss at alumni dot TU-Berlin dot DE> |
| 179 |
% suggested to support the xcolor package as well as the color |
| 180 |
% package. |
| 181 |
% |
| 182 |
% v3.5a Piet van Oostrum: Resolved bugs in twocolumn mode, mid-document |
| 183 |
% changes to page number, covering parts with large depth (like |
| 184 |
% formulas and parboxes), added pdflatex support. |
| 185 |
% |
| 186 |
% v3.5b JLB: added an extra check (after the call to \ProcessOptions |
| 187 |
% to ensure that pdftex.def is used when in pdf producing mode, |
| 188 |
% even when the document still contains the option "dvips" |
| 189 |
% |
| 190 |
% v3.5c JLB: Add a small change in the TeXtures specific code that |
| 191 |
% was submitted by Blue Sky Systems; made it work with both the |
| 192 |
% color and xcolor packages. |
| 193 |
% |
| 194 |
% v3.6a Apostolos Syropoulus submitted support for XeTeX |
| 195 |
% |
| 196 |
% v3.6a JLB: a small change in the XeTeX macros |
| 197 |
% |
| 198 |
% v3.6b JLB: set changebarsep to 0.5\marginparsewp instead of 30pt |
| 199 |
% in order to prevent the changebar crossing a marginal paragraph. |
| 200 |
% |
| 201 |
% v3.6c JLB: changed the definition of \cb@checkPDF in order to prevent |
| 202 |
% an extra page at the end of the document, filled with "spsp" |
| 203 |
% |
| 204 |
% v3.6d JLB: Added \relax at the end of \openin statements in order to |
| 205 |
% prevent TeX from looking too far ahead. |
| 206 |
% |
| 207 |
% v3.7a JLB: Added support for LuaTeX based on the pdfTEX and XeTeX code |
| 208 |
% |
| 209 |
% v3.7b JLB: In creating the support for luaTeX a XeTeX error message got |
| 210 |
% inadvertantly remove, reinserted. |
| 211 |
% After adding those four lines the production of changebar.dtx |
| 212 |
% led to a runaway argument error. It turned out that the comma's, |
| 213 |
% used in were in one instance replaced by \TeX-code. Replaced |
| 214 |
% the comma's with ";" to solve this. |
| 215 |
% |
| 216 |
% v3.7c JLB: Arash Esbati reported inconsistent spacing whit or without the |
| 217 |
% optional argumenty to \cbstart or \begin{changebar}. |
| 218 |
% |
| 219 |
% v3.7d JLB: Arash Esbati reported a simlar phenomenon when \nochangebars |
| 220 |
% is used. Similar solution was needed. |
| 221 |
% |
| 222 |
% v3.7e JLB: Daniel Flipo and Bruno Winckler reported that changebar no longer |
| 223 |
% works when \usepackage[french]{babel} is used. This was caused by the |
| 224 |
% solution implemented in v3.7b. This time use "/" is chosen as separator. |
| 225 |
% |
| 226 |
% Known problems |
| 227 |
% - changebars for marginal paragraphs collide with changebars |
| 228 |
% for the main body of text |
| 229 |
% - With PostScript a dictstack overflow seems to occur with |
| 230 |
% many changebars. cb@maxpoint=20 seems to help |
| 231 |
% - I have received the file chgbar.sty, which was written by |
| 232 |
% David B. Johnson ([email protected]) back in 1990. It uses |
| 233 |
% LaTeX marginpar mechanism to implement change bars. I Haven't |
| 234 |
% yet dared to see if I can merge these two packages into one |
| 235 |
% - When using \cbstart with an optional parameter that is different |
| 236 |
% from \changebarwidth the distance between the text margin and |
| 237 |
% the changebar will not be \changebarsep. Instead, the center of |
| 238 |
% the changebar will be aligned with the other changebars. The |
| 239 |
% solution to this would be to give an additional parameter to the |
| 240 |
% \cb@connect macro to indicate if the bar is on the left or on the |
| 241 |
% right. \cb@connect can then do the proper positioning. In that |
| 242 |
% case it is easier not to include the 0.5\changebarwidth |
| 243 |
% correction in the calculations in \cb@positions. |
| 244 |
% - The syntax \cbcolor[rgb]{1,0,0} doesn't work with the xcolor option. |