Annotation of capa/capa51/Manual/multicol.sty, revision 1.1
1.1 ! albertel 1: %%
! 2: %% This is file `multicol.sty', generated
! 3: %% on <1994/6/23> with the docstrip utility (2.2h).
! 4: %%
! 5: %% The original source files were:
! 6: %%
! 7: %% multicol.dtx (with options: `package,badness,check,marktrace')
! 8: %%
! 9: %% IMPORTANT NOTICE:
! 10: %% This file is part of the `tools' bundle
! 11: %% in the LaTeX2e distribution.
! 12: %%
! 13: %% You are not allowed to distribute this file.
! 14: %% For distribution of the original source see
! 15: %% the copyright notice in the source file, and
! 16: %% in the file readme.txt distributed with the
! 17: %% tools bundle.
! 18: %%
! 19: \def\fileversion{v1.5g}
! 20: \def\filedate{1994/06/07}
! 21: \def\docdate {1994/05/28}
! 22: %% \CheckSum{1293}
! 23: %% \CharacterTable
! 24: %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
! 25: %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
! 26: %% Digits \0\1\2\3\4\5\6\7\8\9
! 27: %% Exclamation \! Double quote \" Hash (number) \#
! 28: %% Dollar \$ Percent \% Ampersand \&
! 29: %% Acute accent \' Left paren \( Right paren \)
! 30: %% Asterisk \* Plus \+ Comma \,
! 31: %% Minus \- Point \. Solidus \/
! 32: %% Colon \: Semicolon \; Less than \<
! 33: %% Equals \= Greater than \> Question mark \?
! 34: %% Commercial at \@ Left bracket \[ Backslash \\
! 35: %% Right bracket \] Circumflex \^ Underscore \_
! 36: %% Grave accent \` Left brace \{ Vertical bar \|
! 37: %% Right brace \} Tilde \~}
! 38: %%
! 39: %% Package `multicol' to use with LaTeX2e
! 40: %% Copyright (C) 1989-1994 Frank Mittelbach, all rights reserved.
! 41: %%
! 42: %%
! 43: %% In addition to the general distribution terms for this `tools'
! 44: %% bundle, which are specified in readme.txt, this package, multicol,
! 45: %% is distributed subject to the following condition:
! 46: %%
! 47: %% ** The use of this package as a standard part of a commercial
! 48: %% ** application is not allowed without the explicit permission of the
! 49: %% ** author of this package. Such commercial usage will be subject to
! 50: %% ** the payment of a licence fee. The size of this fee is to be
! 51: %% ** determined, in each instance, by the commercial user, depending on
! 52: %% ** his judgement of the value of the code for his application.
! 53: %%
! 54: %% Note that the above condition does not apply to non-commercial use of
! 55: %% this package, or to the use of this package in a commercial
! 56: %% environment for `individual' tasks rather than as a standard part of
! 57: %% a commercial application. In these cases the General Terms, as
! 58: %% specified in readme.txt, apply.
! 59: %%
! 60: \NeedsTeXFormat{LaTeX2e}
! 61: \ProvidesPackage{multicol}[\filedate\space
! 62: \fileversion\space multicolum formatting]
! 63: \DeclareOption{twocolumn}
! 64: {\PackageWarning{multicol}{May not work
! 65: with a twocolumn layout}}
! 66: \newcount\c@tracingmulticols
! 67: \DeclareOption{errorshow}
! 68: {\c@tracingmulticols\z@}
! 69: \DeclareOption{infoshow}
! 70: {\c@tracingmulticols\@ne}
! 71: \DeclareOption{balancingshow}
! 72: {\c@tracingmulticols\tw@}
! 73: \DeclareOption{markshow}
! 74: {\c@tracingmulticols\thr@@}
! 75: \DeclareOption{debugshow}
! 76: {\c@tracingmulticols5\relax}
! 77: \ProcessOptions
! 78: \def\multicols#1{\col@number#1\relax
! 79: \ifnum\col@number<\tw@
! 80: \PackageWarning{multicol}%
! 81: {Using `\number\col@number'
! 82: columns doesn't seem a good idea.^^J
! 83: I therefore use two columns instead}%
! 84: \col@number\tw@ \fi
! 85: \ifnum\col@number>10
! 86: \PackageError{multicol}%
! 87: {Too many columns}%
! 88: {Current implementation doesn't
! 89: support more than 10 columns.%
! 90: \MessageBreak
! 91: I therefore use 10 columns instead}%
! 92: \col@number10 \fi
! 93: \@ifnextchar[\mult@cols{\mult@cols[]}}
! 94: \def\mult@cols[#1]{\@ifnextchar[%
! 95: {\mult@@cols{#1}}%
! 96: {\mult@@cols{#1}[\premulticols]}}
! 97: \def\mult@@cols#1[#2]{%
! 98: \par
! 99: \ifinner \@boxedmulticolstrue
! 100: \else
! 101: \ifnum \doublecol@number>\z@
! 102: \@boxedmulticolstrue
! 103: \fi
! 104: \fi
! 105: \mult@info\z@
! 106: {Starting environment with
! 107: \the\col@number\space columns%
! 108: \if@boxedmulticols\MessageBreak
! 109: (boxed mode)\fi
! 110: }%
! 111: \enough@room{#2}%
! 112: {#1\par}\addvspace\multicolsep
! 113: \begingroup
! 114: \prepare@multicols
! 115: \if@boxedmulticols
! 116: \setbox\mult@box\vbox\bgroup
! 117: \fi
! 118: \ignorespaces}
! 119: \newif\if@boxedmulticols
! 120: \@boxedmulticolsfalse
! 121: \newbox\mult@box
! 122: \def\enough@room#1{%
! 123: \if@boxedmulticols\else
! 124: \par
! 125: \bgroup\@nobreakfalse\addpenalty\z@\egroup
! 126: \page@free \pagegoal
! 127: \advance \page@free -\pagetotal
! 128: \@tempskipa#1\relax
! 129: \mult@info\z@
! 130: {Current page:\MessageBreak
! 131: height=%
! 132: \the\pagegoal: used \the\pagetotal
! 133: \space -> free=\the\page@free
! 134: \MessageBreak
! 135: needed \the\@tempskipa
! 136: \space(for #1)}%
! 137: \ifdim \page@free <#1\newpage \fi
! 138: \fi}
! 139: \def\prepare@multicols{%
! 140: \multicol@leftmargin\@totalleftmargin
! 141: \@totalleftmargin\z@
! 142: \parshape\z@
! 143: \doublecol@number\col@number
! 144: \multiply\doublecol@number\tw@
! 145: \advance\doublecol@number\mult@rightbox
! 146: \if@boxedmulticols
! 147: \let\l@kept@firstmark\kept@firstmark
! 148: \let\l@kept@botmark\kept@botmark
! 149: \global\let\kept@firstmark\@empty
! 150: \global\let\kept@botmark\@empty
! 151: \else
! 152: \nointerlineskip {\topskip\z@\null}%
! 153: \output{%
! 154: \global\setbox\partial@page\vbox
! 155: {%
! 156: \ifvoid\partial@page\else
! 157: \PackageError{multicol}%
! 158: {Error saving partial page}%
! 159: {The part of the page before
! 160: the multicols environment was
! 161: nearly full with^^Jthe result
! 162: that starting the environment
! 163: will produce an overfull
! 164: page. Some^^Jtext may be lost!
! 165: Please increase \premulticols
! 166: either generally or for this%
! 167: ^^Jenvironment by specifying a
! 168: suitable value in the second
! 169: optional argument to^^Jthe
! 170: multicols environment.}
! 171: \unvbox\partial@page
! 172: \box\last@line
! 173: \fi
! 174: \unvbox\@cclv
! 175: \global\setbox\last@line\lastbox
! 176: }%
! 177: \prep@keptmarks
! 178: \global\let\kept@topmark\firstmark
! 179: }\eject
! 180: \advance\@colroom-\ht\partial@page
! 181: \set@mult@vsize\relax
! 182: \output{\multi@column@out}%
! 183: \init@mult@footins
! 184: \reinsert@footnotes
! 185: \fi
! 186: \vbadness\@Mi \hbadness5000
! 187: \tolerance\multicoltolerance
! 188: \pretolerance\multicolpretolerance
! 189: \setemergencystretch\col@number\hsize
! 190: \set@floatcmds
! 191: \advance\baselineskip\multicolbaselineskip
! 192: \hsize\linewidth \advance\hsize\columnsep
! 193: \advance\hsize-\col@number\columnsep
! 194: \divide\hsize\col@number
! 195: \full@width\linewidth
! 196: \linewidth\hsize
! 197: }
! 198: \def\init@mult@footins{%
! 199: \multiply\count\footins\col@number
! 200: \multiply\skip \footins\col@number
! 201: }
! 202: \def\set@mult@vsize#1{%
! 203: \vsize\@colroom
! 204: \@tempdima\baselineskip
! 205: \advance\@tempdima-\topskip
! 206: \advance\vsize\@tempdima
! 207: \vsize\col@number\vsize
! 208: \advance\vsize-\@tempdima
! 209: #1\advance\vsize
! 210: \c@collectmore\baselineskip}
! 211: \newdimen\multicol@leftmargin
! 212: \def\endmulticols{\par
! 213: \if@boxedmulticols
! 214: \egroup
! 215: \balance@columns
! 216: \return@nonemptymark{first}%
! 217: \kept@firstmark
! 218: \return@nonemptymark{bot}%
! 219: \kept@botmark
! 220: \page@sofar
! 221: \global\let\kept@firstmark
! 222: \l@kept@firstmark
! 223: \global\let\kept@botmark
! 224: \l@kept@botmark
! 225: \mult@info\tw@
! 226: {Restore kept marks to\MessageBreak
! 227: first: \meaning\kept@firstmark
! 228: \MessageBreak bot\space\space:
! 229: \meaning\kept@botmark }%
! 230: \else
! 231: \penalty\z@
! 232: \output{\balance@columns@out}\eject
! 233: \ifvbox\partial@page
! 234: \unvbox\partial@page\fi
! 235: \global\let\kept@firstmark\@empty
! 236: \global\let\kept@botmark\@empty
! 237: \mult@info\tw@
! 238: {Make kept marks empty}%
! 239: \fi
! 240: \@checkend{multicols}%
! 241: \endgroup
! 242: \if@boxedmulticols\else
! 243: \reinsert@footnotes
! 244: \fi
! 245: \global\c@unbalance\z@
! 246: \enough@room\postmulticols
! 247: \addvspace\multicolsep
! 248: \mult@info\z@
! 249: {Ending environment
! 250: \if@boxedmulticols
! 251: \space(boxed mode)\fi
! 252: }}
! 253: \newcount\c@unbalance
! 254: \newcount\c@collectmore
! 255: \newcount\doublecol@number
! 256: \newcount\multicoltolerance
! 257: \newcount\multicolpretolerance
! 258: \newdimen\full@width
! 259: \newdimen\page@free
! 260: \newdimen\premulticols
! 261: \newdimen\postmulticols
! 262: \newskip\multicolsep
! 263: \newskip\multicolbaselineskip
! 264: \newbox\partial@page
! 265: \newbox\last@line
! 266: \c@unbalance = 0
! 267: \c@collectmore = 0
! 268: \col@number = 1
! 269: \multicoltolerance = 9999
! 270: \multicolpretolerance = -1
! 271: \premulticols = 50pt
! 272: \postmulticols= 20pt
! 273: \multicolsep = 12pt plus 4pt minus 3pt
! 274: \multicolbaselineskip=0pt
! 275: \def\process@cols#1#2{\count@#1\relax
! 276: \loop
! 277: #2%
! 278: \advance\count@\tw@
! 279: \ifnum\count@<\doublecol@number
! 280: \repeat}
! 281: \def\page@sofar{%
! 282: \process@cols\mult@rightbox
! 283: {\wd\count@\hsize}%
! 284: \mult@info\z@
! 285: {Column spec:\MessageBreak
! 286: (\the\multicol@leftmargin\space -->
! 287: \the\full@width\space = \the\hsize
! 288: \space x \the\col@number)%
! 289: }%
! 290: \ifvmode\else\errmessage{Multicol Error}\fi
! 291: \moveright\multicol@leftmargin
! 292: \hbox to\full@width{%
! 293: \process@cols\mult@gfirstbox{\box\count@
! 294: \hss\vrule\@width\columnseprule\hss}%
! 295: \box\mult@rightbox
! 296: \rlap{\phantom p}%
! 297: }%
! 298: }
! 299: \def\reinsert@footnotes{\ifvoid\footins\else
! 300: \insert\footins{}\fi}
! 301: \def\multi@column@out{%
! 302: \ifnum\outputpenalty <-\@M
! 303: \speci@ls \else
! 304: \splittopskip\topskip
! 305: \splitmaxdepth\maxdepth
! 306: \dimen@\@colroom
! 307: \divide\skip\footins\col@number
! 308: \ifvoid\footins \else
! 309: \leave@mult@footins
! 310: \fi
! 311: \process@cols\mult@gfirstbox{%
! 312: \setbox\count@
! 313: \vsplit\@cclv to\dimen@
! 314: \set@keptmarks
! 315: \ifshr@nking
! 316: \setbox\count@
! 317: \vbox to\dimen@
! 318: {\unvbox\count@\vfill}%
! 319: \fi
! 320: }%
! 321: \setbox\mult@rightbox
! 322: \vsplit\@cclv to\dimen@
! 323: \set@keptmarks
! 324: \ifshr@nking
! 325: \setbox\mult@rightbox\vbox to\dimen@
! 326: {\unvbox\mult@rightbox\vfill}%
! 327: \fi
! 328: \ifvoid\@cclv \else
! 329: \unvbox\@cclv
! 330: \penalty\outputpenalty
! 331: \ifvoid\footins\else
! 332: \PackageWarning{multicol}%
! 333: {I moved some lines to
! 334: the next page.\MessageBreak
! 335: Footnotes on page
! 336: \thepage\space might be wrong}%
! 337: \fi
! 338: \ifnum \c@tracingmulticols>\thr@@
! 339: \hrule\allowbreak \fi
! 340: \fi
! 341: \ifx\@empty\kept@firstmark
! 342: \let\firstmark\kept@topmark
! 343: \let\botmark\kept@topmark
! 344: \else
! 345: \let\firstmark\kept@firstmark
! 346: \let\botmark\kept@botmark
! 347: \fi
! 348: \let\topmark\kept@topmark
! 349: \mult@info\tw@
! 350: {Use kept top mark:\MessageBreak
! 351: \meaning\kept@topmark
! 352: \MessageBreak
! 353: Use kept first mark:\MessageBreak
! 354: \meaning\kept@firstmark
! 355: \MessageBreak
! 356: Use kept bot mark:\MessageBreak
! 357: \meaning\kept@botmark
! 358: \MessageBreak
! 359: Produce first mark:\MessageBreak
! 360: \meaning\firstmark
! 361: \MessageBreak
! 362: Produce bot mark:\MessageBreak
! 363: \meaning\botmark
! 364: \@gobbletwo}%
! 365: \setbox\@cclv\vbox{\unvbox\partial@page
! 366: \page@sofar}%
! 367: \@makecol\@outputpage
! 368: \global\let\kept@topmark\botmark
! 369: \global\let\kept@firstmark\@empty
! 370: \global\let\kept@botmark\@empty
! 371: \mult@info\tw@
! 372: {(Re)Init top mark:\MessageBreak
! 373: \meaning\kept@topmark
! 374: \@gobbletwo}%
! 375: \global\@colroom\@colht
! 376: \process@deferreds
! 377: \@whilesw\if@fcolmade\fi{\@outputpage
! 378: \global\@colroom\@colht
! 379: \process@deferreds}%
! 380: \mult@info\@ne
! 381: {Colroom:\MessageBreak
! 382: \the\@colht\space
! 383: after float space removed
! 384: = \the\@colroom \@gobble}%
! 385: \set@mult@vsize \global
! 386: \fi}
! 387: \def\leave@mult@footins{%
! 388: \advance\dimen@-\skip\footins
! 389: \advance\dimen@-\ht\footins
! 390: }
! 391: \def\speci@ls{%
! 392: \ifnum\outputpenalty <-\@Mi
! 393: \PackageWarning{multicol}%
! 394: {Floats and marginpars not
! 395: allowed inside `multicols'
! 396: environment!
! 397: \@gobble}%
! 398: \unvbox\@cclv\reinsert@footnotes
! 399: \xdef\@freelist{\@freelist\@currlist}%
! 400: \gdef\@currlist{}%
! 401: \else \@doclearpage \fi
! 402: }
! 403: \def\process@deferreds{%
! 404: \@floatplacement
! 405: \@tryfcolumn\@deferlist
! 406: \if@fcolmade\else
! 407: \begingroup
! 408: \let\@tempb\@deferlist
! 409: \gdef\@deferlist{}%
! 410: \let\@elt\@scolelt
! 411: \@tempb \endgroup
! 412: \fi}
! 413: \newif\ifshr@nking
! 414: \def\raggedcolumns{%
! 415: \@bsphack\shr@nkingtrue\@esphack}
! 416: \def\flushcolumns{%
! 417: \@bsphack\shr@nkingfalse\@esphack}
! 418: \def\balance@columns@out{%
! 419: \setbox\mult@box\vbox{\unvbox\@cclv}%
! 420: \balance@columns
! 421: \global\vsize\@colroom
! 422: \global\advance\vsize\ht\partial@page
! 423: \unvbox\partial@page
! 424: \return@nonemptymark{first}\kept@firstmark
! 425: \return@nonemptymark{bot}\kept@botmark
! 426: \page@sofar
! 427: \penalty\z@
! 428: }
! 429: \def\balance@columns{%
! 430: \setbox\mult@box\vbox{%
! 431: \penalty-\@M
! 432: \unvbox\mult@box
! 433: \remove@discardable@items
! 434: }%
! 435: \get@keptmarks\mult@box
! 436: \@tempdima\topskip
! 437: \splittopskip\@tempdima
! 438: \@plus\multicolundershoot
! 439: \@minus\multicolovershoot
! 440: \splitmaxdepth\maxdepth
! 441: \setbox\@tempboxa\vsplit\mult@box to\z@
! 442: \@tempdima\ht\mult@box
! 443: \advance\@tempdima\dp\mult@box
! 444: \divide\@tempdima\col@number
! 445: \count@\@tempdima
! 446: \divide\count@\baselineskip
! 447: \dimen@\count@\baselineskip
! 448: \advance\dimen@\topskip
! 449: \ifdim \dimen@ >\@tempdima
! 450: \advance\dimen@-\baselineskip
! 451: \fi
! 452: \advance\dimen@\c@unbalance\baselineskip
! 453: \mult@info\@ne
! 454: {Balance columns\on@line:
! 455: \ifnum\c@unbalance=\z@\else
! 456: (off balance=\number\c@unbalance)\fi
! 457: \@gobbletwo}%
! 458: \ifnum\dimen@<\topskip
! 459: \mult@info\@ne
! 460: {Start value
! 461: \the\dimen@ \space ->
! 462: \the\topskip \space (corrected)}%
! 463: \dimen@\topskip
! 464: \fi
! 465: \vbadness\@M
! 466: \vfuzz \col@number\baselineskip
! 467: \last@try-\p@
! 468: \loop
! 469: {\process@cols\mult@grightbox
! 470: {\global\setbox\count@
! 471: \box\voidb@x}}%
! 472: \global\setbox\mult@grightbox
! 473: \copy\mult@box
! 474: \global\too@badfalse
! 475: {\process@cols\mult@firstbox{%
! 476: \global\setbox\count@
! 477: \vsplit\mult@grightbox to\dimen@
! 478: \ifnum\c@tracingmulticols>\@ne
! 479: \@tempcnta\count@
! 480: \advance\@tempcnta-\mult@grightbox
! 481: \divide\@tempcnta \tw@
! 482: \message{^^JColumn
! 483: \number\@tempcnta\space
! 484: badness: \the\badness\space}%
! 485: \fi
! 486: \ifnum\badness>\c@columnbadness
! 487: \ifnum\c@tracingmulticols>\@ne
! 488: \message{too bad
! 489: (>\the\c@columnbadness)}%
! 490: \fi
! 491: \global\too@badtrue
! 492: \fi
! 493: }}%
! 494: \boxmaxdepth\maxdepth
! 495: \global\setbox\mult@grightbox
! 496: \vbox{\unvbox\mult@grightbox}%
! 497: \setbox\mult@nat@firstbox
! 498: \vbox{\unvcopy\mult@firstbox}%
! 499: \ifnum\c@tracingmulticols>\@ne
! 500: \message{^^JFirst column
! 501: = \the\dimen@\space
! 502: (\the\ht\mult@nat@firstbox)}\fi
! 503: \ifshr@nking
! 504: \global\setbox\mult@firstbox
! 505: \copy\mult@nat@firstbox
! 506: \fi
! 507: \ifnum\c@tracingmulticols>\@ne
! 508: \message{<> last column =
! 509: \the\ht\mult@grightbox^^J}%
! 510: \fi
! 511: \ifdim\ht\mult@grightbox >\dimen@
! 512: \too@badtrue
! 513: \else
! 514: \global\setbox\mult@grightbox
! 515: \vbox to\dimen@
! 516: {\unvbox\mult@grightbox}%
! 517: \ifnum\c@tracingmulticols>\@ne
! 518: \message{Final badness:
! 519: \the\badness}%
! 520: \fi
! 521: \ifnum\badness>\c@finalcolumnbadness
! 522: \global\setbox\mult@grightbox
! 523: \vbox to\dimen@
! 524: {\unvbox\mult@grightbox\vfill}%
! 525: \ifnum\c@tracingmulticols>\@ne
! 526: \message{ setting natural
! 527: (> \the\c@finalcolumnbadness)}%
! 528: \fi
! 529: \fi
! 530: \fi
! 531: \ifdim\ht\mult@nat@firstbox<\dimen@
! 532: \ifdim\ht\mult@nat@firstbox>\last@try
! 533: \too@badtrue
! 534: \dimen@\ht\mult@nat@firstbox
! 535: \last@try\dimen@
! 536: \advance\dimen@-\p@
! 537: \fi
! 538: \fi
! 539: \iftoo@bad
! 540: \advance\dimen@\p@
! 541: \repeat
! 542: \dimen@\ht\mult@firstbox
! 543: \ifdim\dimen@>\@colroom
! 544: \dimen@\@colroom
! 545: \fi
! 546: \process@cols\mult@rightbox
! 547: {\@tempcnta\count@
! 548: \advance\@tempcnta\@ne
! 549: \setbox\count@\vbox to\dimen@
! 550: {%
! 551: \vskip \z@
! 552: \@plus-\multicolundershoot
! 553: \@minus-\multicolovershoot
! 554: \unvbox\@tempcnta
! 555: \ifshr@nking\vfill\fi}}%
! 556: }
! 557: \newbox\mult@rightbox
! 558: \newbox\mult@grightbox
! 559: \newbox\mult@gfirstbox
! 560: \newbox\mult@firstbox
! 561: \newbox\@tempa\newbox\@tempa
! 562: \newbox\@tempa\newbox\@tempa
! 563: \newbox\@tempa\newbox\@tempa
! 564: \newbox\@tempa\newbox\@tempa
! 565: \newbox\@tempa\newbox\@tempa
! 566: \newbox\@tempa\newbox\@tempa
! 567: \newbox\@tempa\newbox\@tempa
! 568: \newbox\@tempa\newbox\@tempa
! 569: \newbox\@tempa
! 570: \let\@tempa\relax
! 571: \@ifundefined{emergencystretch}
! 572: {\newdimen\emergencystretch}{}
! 573: \def\setemergencystretch#1#2{%
! 574: \emergencystretch 4pt
! 575: \multiply\emergencystretch#1}
! 576:
! 577: \def\set@floatcmds{%
! 578: \let\@dblfloat\@dbflt
! 579: \def\end@dblfloat{\par
! 580: \vskip\z@
! 581: \color@endgroup
! 582: \outer@nobreak
! 583: \egroup
! 584: \ifnum\@floatpenalty<\z@
! 585: \@cons\@deferlist\@currbox
! 586: \fi
! 587: \ifnum\@floatpenalty=-\@Mii
! 588: \@Esphack
! 589: \fi}}
! 590: \def\kept@topmark{{}{}}
! 591: \let\kept@firstmark\@empty
! 592: \let\kept@botmark\@empty
! 593: \def\return@nonemptymark#1#2{%
! 594: \ifx#2\@empty
! 595: \else
! 596: \mult@info\tw@
! 597: {Returned #1 mark:\MessageBreak
! 598: \meaning#2}%
! 599: \toks@\expandafter{#2}%
! 600: \mark{\the\toks@}%
! 601: \nobreak
! 602: \fi}
! 603: \def\get@keptmarks#1{%
! 604: \begingroup
! 605: \vbadness\@M
! 606: \setbox#1\copy#1%
! 607: \setbox#1\vsplit#1to\maxdimen
! 608: \set@keptmarks
! 609: \endgroup
! 610: }
! 611: \def\set@keptmarks{%
! 612: \ifx\kept@firstmark\@empty
! 613: \expandafter\gdef\expandafter
! 614: \kept@firstmark
! 615: \expandafter{\splitfirstmark}%
! 616: \ifx\kept@firstmark\@empty\else
! 617: \mult@info\tw@
! 618: {Set kept first mark:\MessageBreak
! 619: \meaning\kept@firstmark%
! 620: \@gobbletwo}%
! 621: \fi
! 622: \fi
! 623: \expandafter\def\expandafter\@tempa
! 624: \expandafter{\splitbotmark}%
! 625: \ifx\@tempa\@empty\else
! 626: \global\let\kept@botmark\@tempa
! 627: \mult@info\tw@
! 628: {Set kept bot mark:\MessageBreak
! 629: \meaning\kept@botmark%
! 630: \@gobbletwo}%
! 631: \fi}%
! 632: \def\prep@keptmarks{%
! 633: \if@boxedmulticols \else
! 634: \get@keptmarks\partial@page
! 635: \fi}
! 636: \def\remove@discardable@items{%
! 637: \unskip\unpenalty\unkern
! 638: \unskip\unpenalty\unkern
! 639: \unskip\unpenalty\unkern
! 640: \unskip\unpenalty\unkern
! 641: }
! 642: \newif\iftoo@bad
! 643: \newcount\c@columnbadness
! 644: \c@columnbadness=10000
! 645: \newcount\c@finalcolumnbadness
! 646: \c@finalcolumnbadness=9999
! 647:
! 648: \newdimen\last@try
! 649:
! 650: \newdimen\multicolovershoot
! 651: \multicolovershoot=2pt
! 652: \newdimen\multicolundershoot
! 653: \multicolundershoot=2pt
! 654: \newbox\mult@nat@firstbox
! 655: \def\mult@info#1#2{%
! 656: \ifnum\c@tracingmulticols>#1%
! 657: \GenericWarning
! 658: {(multicol)\@spaces\@spaces}%
! 659: {Package multicol: #2}%
! 660: \fi
! 661: }
! 662:
! 663: %%
! 664: \newwrite\example@out
! 665: \newenvironment{example}%
! 666: {\begingroup% Lets Keep the Changes Local
! 667: \@bsphack
! 668: \immediate\openout \example@out \jobname.exa
! 669: \let\do\@makeother\dospecials\catcode`\^^M\active
! 670: \def\verbatim@processline{%
! 671: \immediate\write\example@out{\the\verbatim@line}}%
! 672: \verbatim@start}%
! 673: {\immediate\closeout\example@out\@esphack\endgroup%
! 674: \par\small\addvspace{3ex plus 1ex}\vskip -\parskip
! 675: \noindent
! 676: \makebox[0.45\linewidth][l]{%
! 677: \begin{minipage}[t]{0.45\linewidth}
! 678: \vspace*{-2ex}
! 679: \setlength{\parindent}{0pt}
! 680: \setlength{\parskip}{1ex plus 0.4ex minus 0.2ex}
! 681: \begin{trivlist}
! 682: \item\input{\jobname.exa}
! 683: \end{trivlist}
! 684: \end{minipage}}%
! 685: \hfill%
! 686: \makebox[0.5\linewidth][l]{%
! 687: \begin{minipage}[t]{0.50\linewidth}
! 688: \vspace*{-1ex}
! 689: \verbatiminput{\jobname.exa}
! 690: \end{minipage}}
! 691: \par\addvspace{3ex plus 1ex}\vskip -\parskip
! 692: }
! 693: %%
! 694: \newwrite\capacode@out
! 695: \newenvironment{capacode}%
! 696: {\begingroup%
! 697: \@bsphack
! 698: \immediate\openout \capacode@out \jobname.exa
! 699: \let\do\@makeother\dospecials\catcode`\^^M\active
! 700: \def\verbatim@processline{%
! 701: \immediate\write\capacode@out{\the\verbatim@line}}%
! 702: \verbatim@start}%
! 703: {\immediate\closeout\capacode@out\@esphack\endgroup%
! 704: \par\small\addvspace{3ex plus 1ex}\vskip -\parskip
! 705: \centerline{\noindent
! 706: \makebox[0.95\linewidth][l]{%
! 707: \fbox{\footnotesize
! 708: \begin{minipage}[t]{.95\linewidth}
! 709: \vspace*{1ex}
! 710: \verbatiminput{\jobname.exa}
! 711: \end{minipage}}
! 712: } }
! 713: \par\addvspace{3ex plus 1ex}\vskip -\parskip
! 714: }
! 715: \endinput
! 716: %%
! 717: %% End of file `multicol.sty'.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>