| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% File: pdfcolparallel.dtx |
| 4 |
% Version: 2019/12/29 v1.5 |
| 5 |
% Info: Color stacks support for parallel |
| 6 |
% |
| 7 |
% Copyright (C) |
| 8 |
% 2007, 2008, 2010 Heiko Oberdiek |
| 9 |
% 2016-2019 Oberdiek Package Support Group |
| 10 |
% https://github.com/ho-tex/oberdiek/issues |
| 11 |
% |
| 12 |
% This work may be distributed and/or modified under the |
| 13 |
% conditions of the LaTeX Project Public License, either |
| 14 |
% version 1.3c of this license or (at your option) any later |
| 15 |
% version. This version of this license is in |
| 16 |
% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 17 |
% and the latest version of this license is in |
| 18 |
% https://www.latex-project.org/lppl.txt |
| 19 |
% and version 1.3 or later is part of all distributions of |
| 20 |
% LaTeX version 2005/12/01 or later. |
| 21 |
% |
| 22 |
% This work has the LPPL maintenance status "maintained". |
| 23 |
% |
| 24 |
% The Current Maintainers of this work are |
| 25 |
% Heiko Oberdiek and the Oberdiek Package Support Group |
| 26 |
% https://github.com/ho-tex/oberdiek/issues |
| 27 |
% |
| 28 |
% This work consists of the main source file pdfcolparallel.dtx |
| 29 |
% and the derived files |
| 30 |
% pdfcolparallel.sty, pdfcolparallel.pdf, pdfcolparallel.ins, |
| 31 |
% pdfcolparallel.drv, pdfcolparallel-test1.tex. |
| 32 |
% |
| 33 |
% Distribution: |
| 34 |
% CTAN:macros/latex/contrib/oberdiek/pdfcolparallel.dtx |
| 35 |
% CTAN:macros/latex/contrib/oberdiek/pdfcolparallel.pdf |
| 36 |
% |
| 37 |
% Unpacking: |
| 38 |
% (a) If pdfcolparallel.ins is present: |
| 39 |
% tex pdfcolparallel.ins |
| 40 |
% (b) Without pdfcolparallel.ins: |
| 41 |
% tex pdfcolparallel.dtx |
| 42 |
% (c) If you insist on using LaTeX |
| 43 |
% latex \let\install=y\input{pdfcolparallel.dtx} |
| 44 |
% (quote the arguments according to the demands of your shell) |
| 45 |
% |
| 46 |
% Documentation: |
| 47 |
% (a) If pdfcolparallel.drv is present: |
| 48 |
% latex pdfcolparallel.drv |
| 49 |
% (b) Without pdfcolparallel.drv: |
| 50 |
% latex pdfcolparallel.dtx; ... |
| 51 |
% The class ltxdoc loads the configuration file ltxdoc.cfg |
| 52 |
% if available. Here you can specify further options, e.g. |
| 53 |
% use A4 as paper format: |
| 54 |
% \PassOptionsToClass{a4paper}{article} |
| 55 |
% |
| 56 |
% Program calls to get the documentation (example): |
| 57 |
% pdflatex pdfcolparallel.dtx |
| 58 |
% makeindex -s gind.ist pdfcolparallel.idx |
| 59 |
% pdflatex pdfcolparallel.dtx |
| 60 |
% makeindex -s gind.ist pdfcolparallel.idx |
| 61 |
% pdflatex pdfcolparallel.dtx |
| 62 |
% |
| 63 |
% Installation: |
| 64 |
% TDS:tex/latex/oberdiek/pdfcolparallel.sty |
| 65 |
% TDS:doc/latex/oberdiek/pdfcolparallel.pdf |
| 66 |
% TDS:source/latex/oberdiek/pdfcolparallel.dtx |
| 67 |
% |
| 68 |
%<*ignore> |
| 69 |
\begingroup |
| 70 |
\catcode123=1 % |
| 71 |
\catcode125=2 % |
| 72 |
\def\x{LaTeX2e}% |
| 73 |
\expandafter\endgroup |
| 74 |
\ifcase 0\ifx\install y1\fi\expandafter |
| 75 |
\ifx\csname processbatchFile\endcsname\relax\else1\fi |
| 76 |
\ifx\fmtname\x\else 1\fi\relax |
| 77 |
\else\csname fi\endcsname |
| 78 |
%</ignore> |
| 79 |
%<*install> |
| 80 |
\input docstrip.tex |
| 81 |
\Msg{************************************************************************} |
| 82 |
\Msg{* Installation} |
| 83 |
\Msg{* Package: pdfcolparallel 2019/12/29 v1.5 Color stacks support for parallel (HO)} |
| 84 |
\Msg{************************************************************************} |
| 85 |
|
| 86 |
\keepsilent |
| 87 |
\askforoverwritefalse |
| 88 |
|
| 89 |
\let\MetaPrefix\relax |
| 90 |
\preamble |
| 91 |
|
| 92 |
This is a generated file. |
| 93 |
|
| 94 |
Project: pdfcolparallel |
| 95 |
Version: 2019/12/29 v1.5 |
| 96 |
|
| 97 |
Copyright (C) |
| 98 |
2007, 2008, 2010 Heiko Oberdiek |
| 99 |
2016-2019 Oberdiek Package Support Group |
| 100 |
|
| 101 |
This work may be distributed and/or modified under the |
| 102 |
conditions of the LaTeX Project Public License, either |
| 103 |
version 1.3c of this license or (at your option) any later |
| 104 |
version. This version of this license is in |
| 105 |
https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 106 |
and the latest version of this license is in |
| 107 |
https://www.latex-project.org/lppl.txt |
| 108 |
and version 1.3 or later is part of all distributions of |
| 109 |
LaTeX version 2005/12/01 or later. |
| 110 |
|
| 111 |
This work has the LPPL maintenance status "maintained". |
| 112 |
|
| 113 |
The Current Maintainers of this work are |
| 114 |
Heiko Oberdiek and the Oberdiek Package Support Group |
| 115 |
https://github.com/ho-tex/oberdiek/issues |
| 116 |
|
| 117 |
|
| 118 |
This work consists of the main source file pdfcolparallel.dtx |
| 119 |
and the derived files |
| 120 |
pdfcolparallel.sty, pdfcolparallel.pdf, pdfcolparallel.ins, |
| 121 |
pdfcolparallel.drv, pdfcolparallel-test1.tex. |
| 122 |
|
| 123 |
\endpreamble |
| 124 |
\let\MetaPrefix\DoubleperCent |
| 125 |
|
| 126 |
\generate{% |
| 127 |
\file{pdfcolparallel.ins}{\from{pdfcolparallel.dtx}{install}}% |
| 128 |
\file{pdfcolparallel.drv}{\from{pdfcolparallel.dtx}{driver}}% |
| 129 |
\usedir{tex/latex/oberdiek}% |
| 130 |
\file{pdfcolparallel.sty}{\from{pdfcolparallel.dtx}{package}}% |
| 131 |
% \usedir{doc/latex/oberdiek/test}% |
| 132 |
% \file{pdfcolparallel-test1.tex}{\from{pdfcolparallel.dtx}{test1}}% |
| 133 |
} |
| 134 |
|
| 135 |
\catcode32=13\relax% active space |
| 136 |
\let =\space% |
| 137 |
\Msg{************************************************************************} |
| 138 |
\Msg{*} |
| 139 |
\Msg{* To finish the installation you have to move the following} |
| 140 |
\Msg{* file into a directory searched by TeX:} |
| 141 |
\Msg{*} |
| 142 |
\Msg{* pdfcolparallel.sty} |
| 143 |
\Msg{*} |
| 144 |
\Msg{* To produce the documentation run the file `pdfcolparallel.drv'} |
| 145 |
\Msg{* through LaTeX.} |
| 146 |
\Msg{*} |
| 147 |
\Msg{* Happy TeXing!} |
| 148 |
\Msg{*} |
| 149 |
\Msg{************************************************************************} |
| 150 |
|
| 151 |
\endbatchfile |
| 152 |
%</install> |
| 153 |
%<*ignore> |
| 154 |
\fi |
| 155 |
%</ignore> |
| 156 |
%<*driver> |
| 157 |
\NeedsTeXFormat{LaTeX2e} |
| 158 |
\ProvidesFile{pdfcolparallel.drv}% |
| 159 |
[2019/12/29 v1.5 Color stacks support for parallel (HO)]% |
| 160 |
\documentclass{ltxdoc} |
| 161 |
\usepackage{holtxdoc}[2011/11/22] |
| 162 |
\begin{document} |
| 163 |
\DocInput{pdfcolparallel.dtx}% |
| 164 |
\end{document} |
| 165 |
%</driver> |
| 166 |
% \fi |
| 167 |
% |
| 168 |
% |
| 169 |
% |
| 170 |
% \GetFileInfo{pdfcolparallel.drv} |
| 171 |
% |
| 172 |
% \title{The \xpackage{pdfcolparallel} package} |
| 173 |
% \date{2019/12/29 v1.5} |
| 174 |
% \author{Heiko Oberdiek\thanks |
| 175 |
% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}} |
| 176 |
% |
| 177 |
% \maketitle |
| 178 |
% |
| 179 |
% \begin{abstract} |
| 180 |
% This packages fixes bugs in \xpackage{parallel} and |
| 181 |
% improves color support by using several color stacks |
| 182 |
% that are provided by \pdfTeX\ since version 1.40. |
| 183 |
% \end{abstract} |
| 184 |
% |
| 185 |
% \tableofcontents |
| 186 |
% |
| 187 |
% \section{Usage} |
| 188 |
% |
| 189 |
% \begin{quote} |
| 190 |
% |\usepackage{pdfcolparallel}| |
| 191 |
% \end{quote} |
| 192 |
% The package \xpackage{pdfcolparallel} loads package \xpackage{parallel} |
| 193 |
% \cite{parallel} and redefines some macros to fix bugs. |
| 194 |
% |
| 195 |
% If color stacks are available then package \xpackage{parallel} |
| 196 |
% is further patched to support them. |
| 197 |
% |
| 198 |
% \subsection{Option \xoption{rulebetweencolor}} |
| 199 |
% |
| 200 |
% Package \xpackage{pdfcolparallel} also fixes the color for the |
| 201 |
% rule between columns. |
| 202 |
% Default color is \cs{normalcolor}. But this can be changed by using |
| 203 |
% option \xoption{rulebetweencolor} for |\setkeys{parallel}| |
| 204 |
% (see package \xpackage{keyval}). The option takes a color specification |
| 205 |
% as value. If the value is empty, then the default (\cs{normalcolor}) |
| 206 |
% is used. |
| 207 |
% Examples: |
| 208 |
% \begin{quote} |
| 209 |
% |\setkeys{parallel}{rulebetweencolor=blue}|,\\ |
| 210 |
% |\setkeys{parallel}{rulebetweencolor={red}}|,\\ |
| 211 |
% |\setkeys{parallel}{rulebetweencolor={}}|, |
| 212 |
% \textit{\% \cs{normalcolor} is used}\\ |
| 213 |
% |\setkeys{parallel}{rulebetweencolor=[rgb]{1,0,.5}}| |
| 214 |
% \end{quote} |
| 215 |
% |
| 216 |
% \subsection{Future} |
| 217 |
% |
| 218 |
% If there will be a new version of package \xpackage{parallel} |
| 219 |
% that adds support for color stacks, then this package may become |
| 220 |
% obsolete. |
| 221 |
% |
| 222 |
% \StopEventually{ |
| 223 |
% } |
| 224 |
% |
| 225 |
% \section{Implementation} |
| 226 |
% |
| 227 |
% \subsection{Identification} |
| 228 |
% |
| 229 |
% \begin{macrocode} |
| 230 |
%<*package> |
| 231 |
\NeedsTeXFormat{LaTeX2e} |
| 232 |
\ProvidesPackage{pdfcolparallel}% |
| 233 |
[2019/12/29 v1.5 Color stacks support for parallel (HO)]% |
| 234 |
% \end{macrocode} |
| 235 |
% |
| 236 |
% \subsection{Load and fix package \xpackage{parallel}} |
| 237 |
% |
| 238 |
% Package \xpackage{parallel} is loaded. Before options of package |
| 239 |
% \xpackage{pdfcolparallel} are passed to package \xpackage{parallel}. |
| 240 |
% \begin{macrocode} |
| 241 |
\DeclareOption*{% |
| 242 |
\PassOptionsToPackage{\CurrentOption}{parallel}% |
| 243 |
} |
| 244 |
\ProcessOptions\relax |
| 245 |
\RequirePackage{parallel}[2003/04/13] |
| 246 |
% \end{macrocode} |
| 247 |
% |
| 248 |
% \begin{macrocode} |
| 249 |
\RequirePackage{infwarerr}[2007/09/09] |
| 250 |
% \end{macrocode} |
| 251 |
% |
| 252 |
% \begin{macro}{\pcp@ColorPatch} |
| 253 |
% \begin{macrocode} |
| 254 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 255 |
\expandafter\ifx\csname currentgrouplevel\endcsname\relax |
| 256 |
\def\pcp@ColorPatch{}% |
| 257 |
\else |
| 258 |
\def\pcp@ColorPatch{% |
| 259 |
\@ifundefined{set@color}{% |
| 260 |
\gdef\pcp@ColorPatch{}% |
| 261 |
}{% |
| 262 |
\gdef\pcp@ColorPatch{% |
| 263 |
\gdef\pcp@ColorResets{}% |
| 264 |
\bgroup |
| 265 |
\aftergroup\pcp@ColorResets |
| 266 |
\aftergroup\egroup |
| 267 |
\let\pcp@OrgSetColor\set@color |
| 268 |
\let\set@color\pcp@SetColor |
| 269 |
\edef\pcp@GroupLevel{\the\currentgrouplevel}% |
| 270 |
}% |
| 271 |
}% |
| 272 |
\pcp@ColorPatch |
| 273 |
}% |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |
| 276 |
% \begin{macro}{\pcp@SetColor} |
| 277 |
% \begin{macrocode} |
| 278 |
\def\pcp@SetColor{% |
| 279 |
\ifnum\pcp@GroupLevel=\currentgrouplevel |
| 280 |
\let\pcp@OrgAfterGroup\aftergroup |
| 281 |
\def\aftergroup{% |
| 282 |
\g@addto@macro\pcp@ColorResets |
| 283 |
}% |
| 284 |
\pcp@OrgSetColor |
| 285 |
\let\aftergroup\pcp@OrgAfterGroup |
| 286 |
\else |
| 287 |
\pcp@OrgSetColor |
| 288 |
\fi |
| 289 |
}% |
| 290 |
\fi |
| 291 |
% \end{macrocode} |
| 292 |
% \end{macro} |
| 293 |
% |
| 294 |
% \begin{macro}{\pcp@CmdCheckRedef} |
| 295 |
% \begin{macrocode} |
| 296 |
\def\pcp@CmdCheckRedef#1{% |
| 297 |
\begingroup |
| 298 |
\def\pcp@cmd{#1}% |
| 299 |
\afterassignment\pcp@CmdDo |
| 300 |
\long\def\reserved@a |
| 301 |
} |
| 302 |
\def\pcp@CmdDo{% |
| 303 |
\expandafter\ifx\pcp@cmd\reserved@a |
| 304 |
\else |
| 305 |
\edef\x*{\expandafter\string\pcp@cmd}% |
| 306 |
\@PackageWarningNoLine{pdfcolparallel}{% |
| 307 |
Command \x* has changed.\MessageBreak |
| 308 |
Supported versions of package `parallel':\MessageBreak |
| 309 |
\space\space 2003/04/13\MessageBreak |
| 310 |
The redefinition of \x* may\MessageBreak |
| 311 |
not behave correctly depending on the changes% |
| 312 |
}% |
| 313 |
\fi |
| 314 |
\expandafter\endgroup |
| 315 |
\expandafter\def\pcp@cmd |
| 316 |
} |
| 317 |
% \end{macrocode} |
| 318 |
% \end{macro} |
| 319 |
% |
| 320 |
% \begin{macrocode} |
| 321 |
\def\pcp@SwitchStack#1#2{} |
| 322 |
% \end{macrocode} |
| 323 |
% \begin{macrocode} |
| 324 |
\def\pcp@SetCurrent#1{} |
| 325 |
% \end{macrocode} |
| 326 |
% |
| 327 |
% \begin{macro}{\ParallelLText} |
| 328 |
% \begin{macrocode} |
| 329 |
\pcp@CmdCheckRedef\ParallelLText{% |
| 330 |
\everypar{}% |
| 331 |
\@restorepar |
| 332 |
\begingroup |
| 333 |
\hbadness=3000 % |
| 334 |
\let\footnote=\ParallelLFootnote |
| 335 |
\ParallelWhichBox=0 % |
| 336 |
\global\setbox\ParallelLBox=\vbox\bgroup |
| 337 |
\hsize=\ParallelLWidth |
| 338 |
\aftergroup\ParallelAfterText |
| 339 |
\begingroup |
| 340 |
\afterassignment\ParallelCheckOpenBrace |
| 341 |
\let\x=% |
| 342 |
}{% |
| 343 |
\everypar{}% |
| 344 |
\@restorepar |
| 345 |
\@nobreakfalse |
| 346 |
\begingroup |
| 347 |
\hbadness=3000 % |
| 348 |
\let\footnote=\ParallelLFootnote |
| 349 |
\ParallelWhichBox=0 % |
| 350 |
\global\setbox\ParallelLBox=\vbox\bgroup |
| 351 |
\hsize=\ParallelLWidth |
| 352 |
\linewidth=\ParallelLWidth |
| 353 |
\pcp@SwitchStack{Left}\ParallelLBox |
| 354 |
\aftergroup\ParallelAfterText |
| 355 |
\pcp@ColorPatch |
| 356 |
\begingroup |
| 357 |
\afterassignment\ParallelCheckOpenBrace |
| 358 |
\let\x=% |
| 359 |
} |
| 360 |
% \end{macrocode} |
| 361 |
% \end{macro} |
| 362 |
% |
| 363 |
% \begin{macro}{\ParallelRText} |
| 364 |
% \begin{macrocode} |
| 365 |
\pcp@CmdCheckRedef\ParallelRText{% |
| 366 |
\everypar{}% |
| 367 |
\@restorepar |
| 368 |
\begingroup |
| 369 |
\hbadness=3000 % |
| 370 |
\ifnum\ParallelFNMode=\@ne |
| 371 |
\let\footnote=\ParallelRFootnote |
| 372 |
\else |
| 373 |
\let\footnote=\ParallelLFootnote |
| 374 |
\fi |
| 375 |
\ParallelWhichBox=\@ne |
| 376 |
\global\setbox\ParallelRBox=\vbox\bgroup |
| 377 |
\hsize=\ParallelRWidth |
| 378 |
\aftergroup\ParallelAfterText |
| 379 |
\begingroup |
| 380 |
\afterassignment\ParallelCheckOpenBrace |
| 381 |
\let\x=% |
| 382 |
}{% |
| 383 |
\everypar{}% |
| 384 |
\@restorepar |
| 385 |
\@nobreakfalse |
| 386 |
\begingroup |
| 387 |
\hbadness=3000 % |
| 388 |
\ifnum\ParallelFNMode=\@ne |
| 389 |
\let\footnote=\ParallelRFootnote |
| 390 |
\else |
| 391 |
\let\footnote=\ParallelLFootnote |
| 392 |
\fi |
| 393 |
\ParallelWhichBox=\@ne |
| 394 |
\global\setbox\ParallelRBox=\vbox\bgroup |
| 395 |
\hsize=\ParallelRWidth |
| 396 |
\linewidth=\ParallelRWidth |
| 397 |
\pcp@SwitchStack{Right}\ParallelRBox |
| 398 |
\aftergroup\ParallelAfterText |
| 399 |
\pcp@ColorPatch |
| 400 |
\begingroup |
| 401 |
\afterassignment\ParallelCheckOpenBrace |
| 402 |
\let\x=% |
| 403 |
} |
| 404 |
% \end{macrocode} |
| 405 |
% \end{macro} |
| 406 |
% |
| 407 |
% \begin{macro}{\ParallelParTwoPages} |
| 408 |
% \begin{macrocode} |
| 409 |
\pcp@CmdCheckRedef\ParallelParTwoPages{% |
| 410 |
\ifnum\ParallelBoolVar=\@ne |
| 411 |
\par |
| 412 |
\begingroup |
| 413 |
\global\ParallelWhichBox=\@ne |
| 414 |
\newpage |
| 415 |
\vbadness=10000 % |
| 416 |
\vfuzz=3ex % |
| 417 |
\splittopskip=\z@skip |
| 418 |
\loop% |
| 419 |
\ifnum\ParallelBoolVar=\@ne% |
| 420 |
\ifnum\ParallelWhichBox=\@ne |
| 421 |
\ifvoid\ParallelLBox |
| 422 |
\mbox{} % |
| 423 |
\newpage |
| 424 |
\else |
| 425 |
\global\ParallelWhichBox=\z@ |
| 426 |
\fi |
| 427 |
\else |
| 428 |
\ifvoid\ParallelRBox |
| 429 |
\mbox{} % |
| 430 |
\newpage |
| 431 |
\else |
| 432 |
\global\ParallelWhichBox=\@ne |
| 433 |
\fi |
| 434 |
\fi |
| 435 |
\ifnum\ParallelWhichBox=\z@ |
| 436 |
\ifodd\thepage |
| 437 |
\mbox{} % |
| 438 |
\newpage |
| 439 |
\fi |
| 440 |
\hbox to\textwidth{% |
| 441 |
\vbox{\vsplit\ParallelLBox to.98\textheight}% |
| 442 |
}% |
| 443 |
\else |
| 444 |
\ifodd\thepage\relax |
| 445 |
\else |
| 446 |
\mbox{} % |
| 447 |
\newpage |
| 448 |
\fi |
| 449 |
\hbox to\textwidth{% |
| 450 |
\vbox{\vsplit\ParallelRBox to.98\textheight}% |
| 451 |
}% |
| 452 |
\fi |
| 453 |
\vspace*{\fill}% |
| 454 |
\newpage |
| 455 |
\fi |
| 456 |
\ifvoid\ParallelLBox |
| 457 |
\ifvoid\ParallelRBox |
| 458 |
\global\ParallelBoolVar=\z@ |
| 459 |
\fi |
| 460 |
\fi |
| 461 |
\ifnum\ParallelBoolVar=\@ne |
| 462 |
\repeat |
| 463 |
\par |
| 464 |
\endgroup |
| 465 |
\fi |
| 466 |
}{% |
| 467 |
% \end{macrocode} |
| 468 |
% Additional fixes: |
| 469 |
% \begin{itemize} |
| 470 |
% \item Unnecessary white space removed. |
| 471 |
% \item |\ifodd\thepage| changed to |\ifodd\value{page}|. |
| 472 |
% \end{itemize} |
| 473 |
% \begin{macrocode} |
| 474 |
\ifnum\ParallelBoolVar=\@ne |
| 475 |
\par |
| 476 |
\begingroup |
| 477 |
\global\ParallelWhichBox=\@ne |
| 478 |
\newpage |
| 479 |
\vbadness=10000 % |
| 480 |
\vfuzz=3ex % |
| 481 |
\splittopskip=\z@skip |
| 482 |
\loop% |
| 483 |
\ifnum\ParallelBoolVar=\@ne% |
| 484 |
\ifnum\ParallelWhichBox=\@ne |
| 485 |
\ifvoid\ParallelLBox |
| 486 |
\mbox{}% |
| 487 |
\newpage |
| 488 |
\else |
| 489 |
\global\ParallelWhichBox=\z@ |
| 490 |
\fi |
| 491 |
\else |
| 492 |
\ifvoid\ParallelRBox |
| 493 |
\null |
| 494 |
\newpage |
| 495 |
\else |
| 496 |
\global\ParallelWhichBox=\@ne |
| 497 |
\fi |
| 498 |
\fi |
| 499 |
\ifnum\ParallelWhichBox=\z@ |
| 500 |
\ifodd\value{page}% |
| 501 |
\null |
| 502 |
\newpage |
| 503 |
\fi |
| 504 |
\hbox to\textwidth{% |
| 505 |
\pcp@SetCurrent{Left}% |
| 506 |
\setbox\z@=\vsplit\ParallelLBox to.98\textheight |
| 507 |
\vbox to.98\textheight{% |
| 508 |
\@texttop |
| 509 |
\unvbox\z@ |
| 510 |
\@textbottom |
| 511 |
}% |
| 512 |
}% |
| 513 |
\else |
| 514 |
\ifodd\value{page}% |
| 515 |
\else |
| 516 |
\mbox{}% |
| 517 |
\newpage |
| 518 |
\fi |
| 519 |
\hbox to\textwidth{% |
| 520 |
\pcp@SetCurrent{Right}% |
| 521 |
\setbox\z@=\vsplit\ParallelRBox to.98\textheight |
| 522 |
\vbox to.98\textheight{% |
| 523 |
\@texttop |
| 524 |
\unvbox\z@ |
| 525 |
\@textbottom |
| 526 |
}% |
| 527 |
}% |
| 528 |
\fi |
| 529 |
\vspace*{\fill}% |
| 530 |
\newpage |
| 531 |
\fi |
| 532 |
\ifvoid\ParallelLBox |
| 533 |
\ifvoid\ParallelRBox |
| 534 |
\global\ParallelBoolVar=\z@ |
| 535 |
\fi |
| 536 |
\fi |
| 537 |
\ifnum\ParallelBoolVar=\@ne |
| 538 |
\repeat |
| 539 |
\par |
| 540 |
\endgroup |
| 541 |
\pcp@SetCurrent{}% |
| 542 |
\fi |
| 543 |
} |
| 544 |
% \end{macrocode} |
| 545 |
% \end{macro} |
| 546 |
% |
| 547 |
% \subsection{Color stack support} |
| 548 |
% |
| 549 |
% \begin{macrocode} |
| 550 |
\RequirePackage{pdfcol}[2007/12/12] |
| 551 |
\ifpdfcolAvailable |
| 552 |
\else |
| 553 |
\PackageInfo{pdfcolparallel}{% |
| 554 |
Loading aborted, because color stacks are not available% |
| 555 |
}% |
| 556 |
\expandafter\endinput |
| 557 |
\fi |
| 558 |
% \end{macrocode} |
| 559 |
% |
| 560 |
% \begin{macrocode} |
| 561 |
\pdfcolInitStack{pcp@Left} |
| 562 |
\pdfcolInitStack{pcp@Right} |
| 563 |
% \end{macrocode} |
| 564 |
% \begin{macro}{\pcp@Box} |
| 565 |
% \begin{macrocode} |
| 566 |
\newbox\pcp@Box |
| 567 |
% \end{macrocode} |
| 568 |
% \end{macro} |
| 569 |
% \begin{macro}{\pcp@SwitchStack} |
| 570 |
% \begin{macrocode} |
| 571 |
\def\pcp@SwitchStack#1#2{% |
| 572 |
\pdfcolSwitchStack{pcp@#1}% |
| 573 |
\global\setbox\pcp@Box=\vbox to 0pt{% |
| 574 |
\pdfcolSetCurrentColor |
| 575 |
}% |
| 576 |
\aftergroup\pcp@FixBox |
| 577 |
\aftergroup#2% |
| 578 |
} |
| 579 |
% \end{macrocode} |
| 580 |
% \end{macro} |
| 581 |
% \begin{macro}{\pcp@FixBox} |
| 582 |
% \begin{macrocode} |
| 583 |
\def\pcp@FixBox#1{% |
| 584 |
\global\setbox#1=\vbox{% |
| 585 |
\unvbox\pcp@Box |
| 586 |
\unvbox#1% |
| 587 |
}% |
| 588 |
} |
| 589 |
% \end{macrocode} |
| 590 |
% \end{macro} |
| 591 |
% \begin{macro}{\pcp@SetCurrent} |
| 592 |
% \begin{macrocode} |
| 593 |
\def\pcp@SetCurrent#1{% |
| 594 |
\ifx\\#1\\% |
| 595 |
\pdfcolSetCurrent{}% |
| 596 |
\else |
| 597 |
\pdfcolSetCurrent{pcp@#1}% |
| 598 |
\fi |
| 599 |
} |
| 600 |
% \end{macrocode} |
| 601 |
% \end{macro} |
| 602 |
% |
| 603 |
% \subsection{Redefinitions} |
| 604 |
% |
| 605 |
% \begin{macro}{\ParallelParOnePage} |
| 606 |
% \begin{macrocode} |
| 607 |
\pcp@CmdCheckRedef\ParallelParOnePage{% |
| 608 |
\ifnum\ParallelBoolVar=\@ne |
| 609 |
\par |
| 610 |
\begingroup |
| 611 |
\leftmargin=\z@ |
| 612 |
\rightmargin=\z@ |
| 613 |
\parskip=\z@skip |
| 614 |
\parindent=\z@ |
| 615 |
\vbadness=10000 % |
| 616 |
\vfuzz=3ex % |
| 617 |
\splittopskip=\z@skip |
| 618 |
\loop |
| 619 |
\ifnum\ParallelBoolVar=\@ne |
| 620 |
\noindent |
| 621 |
\hbox to\textwidth{% |
| 622 |
\hskip\ParallelLeftMargin |
| 623 |
\hbox to\ParallelTextWidth{% |
| 624 |
\ifvoid\ParallelLBox |
| 625 |
\hskip\ParallelLWidth |
| 626 |
\else |
| 627 |
\ParallelWhichBox=\z@ |
| 628 |
\vbox{% |
| 629 |
\setbox\ParallelBoxVar |
| 630 |
=\vsplit\ParallelLBox to\dp\strutbox |
| 631 |
\unvbox\ParallelBoxVar |
| 632 |
}% |
| 633 |
\fi |
| 634 |
\strut |
| 635 |
\ifnum\ParallelBoolMid=\@ne |
| 636 |
\hskip\ParallelMainMidSkip |
| 637 |
\vrule |
| 638 |
\else |
| 639 |
\hss |
| 640 |
\fi |
| 641 |
\hss |
| 642 |
\ifvoid\ParallelRBox |
| 643 |
\hskip\ParallelRWidth |
| 644 |
\else |
| 645 |
\ParallelWhichBox=\@ne |
| 646 |
\vbox{% |
| 647 |
\setbox\ParallelBoxVar |
| 648 |
=\vsplit\ParallelRBox to\dp\strutbox |
| 649 |
\unvbox\ParallelBoxVar |
| 650 |
}% |
| 651 |
\fi |
| 652 |
}% |
| 653 |
}% |
| 654 |
\ifvoid\ParallelLBox |
| 655 |
\ifvoid\ParallelRBox |
| 656 |
\global\ParallelBoolVar=\z@ |
| 657 |
\fi |
| 658 |
\fi% |
| 659 |
\fi% |
| 660 |
\ifnum\ParallelBoolVar=\@ne |
| 661 |
\penalty\interlinepenalty |
| 662 |
\repeat |
| 663 |
\par |
| 664 |
\endgroup |
| 665 |
\fi |
| 666 |
}{% |
| 667 |
\ifnum\ParallelBoolVar=\@ne |
| 668 |
\par |
| 669 |
\begingroup |
| 670 |
\leftmargin=\z@ |
| 671 |
\rightmargin=\z@ |
| 672 |
\parskip=\z@skip |
| 673 |
\parindent=\z@ |
| 674 |
\vbadness=10000 % |
| 675 |
\vfuzz=3ex % |
| 676 |
\splittopskip=\z@skip |
| 677 |
\loop |
| 678 |
\ifnum\ParallelBoolVar=\@ne |
| 679 |
\noindent |
| 680 |
\hbox to\textwidth{% |
| 681 |
\hskip\ParallelLeftMargin |
| 682 |
\hbox to\ParallelTextWidth{% |
| 683 |
\ifvoid\ParallelLBox |
| 684 |
\hskip\ParallelLWidth |
| 685 |
\else |
| 686 |
\pcp@SetCurrent{Left}% |
| 687 |
\ParallelWhichBox=\z@ |
| 688 |
\vbox{% |
| 689 |
\setbox\ParallelBoxVar |
| 690 |
=\vsplit\ParallelLBox to\dp\strutbox |
| 691 |
\unvbox\ParallelBoxVar |
| 692 |
}% |
| 693 |
\fi |
| 694 |
\strut |
| 695 |
\ifnum\ParallelBoolMid=\@ne |
| 696 |
\hskip\ParallelMainMidSkip |
| 697 |
\begingroup |
| 698 |
\pcp@RuleBetweenColor |
| 699 |
\vrule |
| 700 |
\endgroup |
| 701 |
\else |
| 702 |
\hss |
| 703 |
\fi |
| 704 |
\hss |
| 705 |
\ifvoid\ParallelRBox |
| 706 |
\hskip\ParallelRWidth |
| 707 |
\else |
| 708 |
\pcp@SetCurrent{Right}% |
| 709 |
\ParallelWhichBox=\@ne |
| 710 |
\vbox{% |
| 711 |
\setbox\ParallelBoxVar |
| 712 |
=\vsplit\ParallelRBox to\dp\strutbox |
| 713 |
\unvbox\ParallelBoxVar |
| 714 |
}% |
| 715 |
\fi |
| 716 |
}% |
| 717 |
}% |
| 718 |
\ifvoid\ParallelLBox |
| 719 |
\ifvoid\ParallelRBox |
| 720 |
\global\ParallelBoolVar=\z@ |
| 721 |
\fi |
| 722 |
\fi% |
| 723 |
\fi% |
| 724 |
\ifnum\ParallelBoolVar=\@ne |
| 725 |
\penalty\interlinepenalty |
| 726 |
\repeat |
| 727 |
\par |
| 728 |
\endgroup |
| 729 |
\pcp@SetCurrent{}% |
| 730 |
\fi |
| 731 |
} |
| 732 |
% \end{macrocode} |
| 733 |
% \end{macro} |
| 734 |
% \begin{macro}{\pcp@RuleBetweenColorDefault} |
| 735 |
% \begin{macrocode} |
| 736 |
\def\pcp@RuleBetweenColorDefault{% |
| 737 |
\normalcolor |
| 738 |
} |
| 739 |
% \end{macrocode} |
| 740 |
% \end{macro} |
| 741 |
% \begin{macro}{\pcp@RuleBetweenColor} |
| 742 |
% \begin{macrocode} |
| 743 |
\let\pcp@RuleBetweenColor\pcp@RuleBetweenColorDefault |
| 744 |
% \end{macrocode} |
| 745 |
% \end{macro} |
| 746 |
% \begin{macrocode} |
| 747 |
\RequirePackage{keyval} |
| 748 |
\define@key{parallel}{rulebetweencolor}{% |
| 749 |
\edef\pcp@temp{#1}% |
| 750 |
\ifx\pcp@temp\@empty |
| 751 |
\let\pcp@RuleBetweenColor\pcp@RuleBetweenColorDefault |
| 752 |
\else |
| 753 |
\edef\pcp@temp{% |
| 754 |
\noexpand\@ifnextchar[{% |
| 755 |
\def\noexpand\pcp@RuleBetweenColor{% |
| 756 |
\noexpand\color\pcp@temp |
| 757 |
}% |
| 758 |
\noexpand\pcp@GobbleNil |
| 759 |
}{% |
| 760 |
\def\noexpand\pcp@RuleBetweenColor{% |
| 761 |
\noexpand\color{\pcp@temp}% |
| 762 |
}% |
| 763 |
\noexpand\pcp@GobbleNil |
| 764 |
}% |
| 765 |
\pcp@temp\noexpand\@nil |
| 766 |
}% |
| 767 |
\pcp@temp |
| 768 |
\fi |
| 769 |
} |
| 770 |
% \end{macrocode} |
| 771 |
% \begin{macro}{\pcp@GobbleNil} |
| 772 |
% \begin{macrocode} |
| 773 |
\long\def\pcp@GobbleNil#1\@nil{} |
| 774 |
% \end{macrocode} |
| 775 |
% \end{macro} |
| 776 |
% |
| 777 |
% \begin{macrocode} |
| 778 |
%</package> |
| 779 |
% \end{macrocode} |
| 780 |
%% \section{Installation} |
| 781 |
% |
| 782 |
% \subsection{Download} |
| 783 |
% |
| 784 |
% \paragraph{Package.} This package is available on |
| 785 |
% CTAN\footnote{\CTANpkg{pdfcolparallel}}: |
| 786 |
% \begin{description} |
| 787 |
% \item[\CTAN{macros/latex/contrib/oberdiek/pdfcolparallel.dtx}] The source file. |
| 788 |
% \item[\CTAN{macros/latex/contrib/oberdiek/pdfcolparallel.pdf}] Documentation. |
| 789 |
% \end{description} |
| 790 |
% |
| 791 |
% |
| 792 |
% \paragraph{Bundle.} All the packages of the bundle `oberdiek' |
| 793 |
% are also available in a TDS compliant ZIP archive. There |
| 794 |
% the packages are already unpacked and the documentation files |
| 795 |
% are generated. The files and directories obey the TDS standard. |
| 796 |
% \begin{description} |
| 797 |
% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}] |
| 798 |
% \end{description} |
| 799 |
% \emph{TDS} refers to the standard ``A Directory Structure |
| 800 |
% for \TeX\ Files'' (\CTANpkg{tds}). Directories |
| 801 |
% with \xfile{texmf} in their name are usually organized this way. |
| 802 |
% |
| 803 |
% \subsection{Bundle installation} |
| 804 |
% |
| 805 |
% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the |
| 806 |
% TDS tree (also known as \xfile{texmf} tree) of your choice. |
| 807 |
% Example (linux): |
| 808 |
% \begin{quote} |
| 809 |
% |unzip oberdiek.tds.zip -d ~/texmf| |
| 810 |
% \end{quote} |
| 811 |
% |
| 812 |
% \subsection{Package installation} |
| 813 |
% |
| 814 |
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting |
| 815 |
% \docstrip\ archive. The files are extracted by running the |
| 816 |
% \xfile{.dtx} through \plainTeX: |
| 817 |
% \begin{quote} |
| 818 |
% \verb|tex pdfcolparallel.dtx| |
| 819 |
% \end{quote} |
| 820 |
% |
| 821 |
% \paragraph{TDS.} Now the different files must be moved into |
| 822 |
% the different directories in your installation TDS tree |
| 823 |
% (also known as \xfile{texmf} tree): |
| 824 |
% \begin{quote} |
| 825 |
% \def\t{^^A |
| 826 |
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} |
| 827 |
% pdfcolparallel.sty & tex/latex/oberdiek/pdfcolparallel.sty\\ |
| 828 |
% pdfcolparallel.pdf & doc/latex/oberdiek/pdfcolparallel.pdf\\ |
| 829 |
% pdfcolparallel.dtx & source/latex/oberdiek/pdfcolparallel.dtx\\ |
| 830 |
% \end{tabular}^^A |
| 831 |
% }^^A |
| 832 |
% \sbox0{\t}^^A |
| 833 |
% \ifdim\wd0>\linewidth |
| 834 |
% \begingroup |
| 835 |
% \advance\linewidth by\leftmargin |
| 836 |
% \advance\linewidth by\rightmargin |
| 837 |
% \edef\x{\endgroup |
| 838 |
% \def\noexpand\lw{\the\linewidth}^^A |
| 839 |
% }\x |
| 840 |
% \def\lwbox{^^A |
| 841 |
% \leavevmode |
| 842 |
% \hbox to \linewidth{^^A |
| 843 |
% \kern-\leftmargin\relax |
| 844 |
% \hss |
| 845 |
% \usebox0 |
| 846 |
% \hss |
| 847 |
% \kern-\rightmargin\relax |
| 848 |
% }^^A |
| 849 |
% }^^A |
| 850 |
% \ifdim\wd0>\lw |
| 851 |
% \sbox0{\small\t}^^A |
| 852 |
% \ifdim\wd0>\linewidth |
| 853 |
% \ifdim\wd0>\lw |
| 854 |
% \sbox0{\footnotesize\t}^^A |
| 855 |
% \ifdim\wd0>\linewidth |
| 856 |
% \ifdim\wd0>\lw |
| 857 |
% \sbox0{\scriptsize\t}^^A |
| 858 |
% \ifdim\wd0>\linewidth |
| 859 |
% \ifdim\wd0>\lw |
| 860 |
% \sbox0{\tiny\t}^^A |
| 861 |
% \ifdim\wd0>\linewidth |
| 862 |
% \lwbox |
| 863 |
% \else |
| 864 |
% \usebox0 |
| 865 |
% \fi |
| 866 |
% \else |
| 867 |
% \lwbox |
| 868 |
% \fi |
| 869 |
% \else |
| 870 |
% \usebox0 |
| 871 |
% \fi |
| 872 |
% \else |
| 873 |
% \lwbox |
| 874 |
% \fi |
| 875 |
% \else |
| 876 |
% \usebox0 |
| 877 |
% \fi |
| 878 |
% \else |
| 879 |
% \lwbox |
| 880 |
% \fi |
| 881 |
% \else |
| 882 |
% \usebox0 |
| 883 |
% \fi |
| 884 |
% \else |
| 885 |
% \lwbox |
| 886 |
% \fi |
| 887 |
% \else |
| 888 |
% \usebox0 |
| 889 |
% \fi |
| 890 |
% \end{quote} |
| 891 |
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's |
| 892 |
% TDS installing feature, then some files can already be in the right |
| 893 |
% place, see the documentation of \docstrip. |
| 894 |
% |
| 895 |
% \subsection{Refresh file name databases} |
| 896 |
% |
| 897 |
% If your \TeX~distribution |
| 898 |
% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh |
| 899 |
% these. For example, \TeX\,Live\ users run \verb|texhash| or |
| 900 |
% \verb|mktexlsr|. |
| 901 |
% |
| 902 |
% \subsection{Some details for the interested} |
| 903 |
% |
| 904 |
% \paragraph{Unpacking with \LaTeX.} |
| 905 |
% The \xfile{.dtx} chooses its action depending on the format: |
| 906 |
% \begin{description} |
| 907 |
% \item[\plainTeX:] Run \docstrip\ and extract the files. |
| 908 |
% \item[\LaTeX:] Generate the documentation. |
| 909 |
% \end{description} |
| 910 |
% If you insist on using \LaTeX\ for \docstrip\ (really, |
| 911 |
% \docstrip\ does not need \LaTeX), then inform the autodetect routine |
| 912 |
% about your intention: |
| 913 |
% \begin{quote} |
| 914 |
% \verb|latex \let\install=y\input{pdfcolparallel.dtx}| |
| 915 |
% \end{quote} |
| 916 |
% Do not forget to quote the argument according to the demands |
| 917 |
% of your shell. |
| 918 |
% |
| 919 |
% \paragraph{Generating the documentation.} |
| 920 |
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate |
| 921 |
% the documentation. The process can be configured by the |
| 922 |
% configuration file \xfile{ltxdoc.cfg}. For instance, put this |
| 923 |
% line into this file, if you want to have A4 as paper format: |
| 924 |
% \begin{quote} |
| 925 |
% \verb|\PassOptionsToClass{a4paper}{article}| |
| 926 |
% \end{quote} |
| 927 |
% An example follows how to generate the |
| 928 |
% documentation with pdf\LaTeX: |
| 929 |
% \begin{quote} |
| 930 |
%\begin{verbatim} |
| 931 |
%pdflatex pdfcolparallel.dtx |
| 932 |
%makeindex -s gind.ist pdfcolparallel.idx |
| 933 |
%pdflatex pdfcolparallel.dtx |
| 934 |
%makeindex -s gind.ist pdfcolparallel.idx |
| 935 |
%pdflatex pdfcolparallel.dtx |
| 936 |
%\end{verbatim} |
| 937 |
% \end{quote} |
| 938 |
% |
| 939 |
% \begin{thebibliography}{9} |
| 940 |
% |
| 941 |
% \bibitem{parallel} |
| 942 |
% Matthias Eckermann: \textit{The \xpackage{parallel}-package}; |
| 943 |
% 2003/04/13;\\ |
| 944 |
% \CTANpkg{parallel}. |
| 945 |
% |
| 946 |
% \bibitem{pdfcol} |
| 947 |
% Heiko Oberdiek: \textit{The \xpackage{pdfcol} package}; |
| 948 |
% 2007/09/09;\\ |
| 949 |
% \CTANpkg{pdfcol}. |
| 950 |
% |
| 951 |
% \end{thebibliography} |
| 952 |
% |
| 953 |
% \begin{History} |
| 954 |
% \begin{Version}{2007/09/09 v1.0} |
| 955 |
% \item |
| 956 |
% First version. |
| 957 |
% \end{Version} |
| 958 |
% \begin{Version}{2007/12/12 v1.1} |
| 959 |
% \item |
| 960 |
% Adds patch for setting \cs{linewidth} to fix bug |
| 961 |
% in package \xpackage{parallel}. |
| 962 |
% \item |
| 963 |
% Package \xpackage{parallel} is also fixed if color |
| 964 |
% stacks are not available. |
| 965 |
% \item |
| 966 |
% Bug fix, switched stacks now initialized with current color. |
| 967 |
% \item |
| 968 |
% Fix for package \xpackage{parallel}: \cs{raggedbottom} is respected. |
| 969 |
% \end{Version} |
| 970 |
% \begin{Version}{2008/08/11 v1.2} |
| 971 |
% \item |
| 972 |
% Code is not changed. |
| 973 |
% \item |
| 974 |
% URLs updated. |
| 975 |
% \end{Version} |
| 976 |
% \begin{Version}{2010/01/11 v1.3} |
| 977 |
% \item |
| 978 |
% Option `rulebetweencolor' added. |
| 979 |
% \end{Version} |
| 980 |
% \begin{Version}{2016/05/16 v1.4} |
| 981 |
% \item |
| 982 |
% Documentation updates. |
| 983 |
% \end{Version} |
| 984 |
% \begin{Version}{2019/12/29 v1.5} |
| 985 |
% \item |
| 986 |
% \cs{PassOptionsToPackage} not \cs{PassoptionsToPackage} |
| 987 |
% \end{Version} |
| 988 |
% \end{History} |
| 989 |
% |
| 990 |
% \PrintIndex |
| 991 |
% |
| 992 |
% \Finale |
| 993 |
\endinput |