| 1 |
%% |
| 2 |
%% This is file `edmac.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% edmac.doc |
| 8 |
%% |
| 9 |
%% IMPORTANT NOTICE: |
| 10 |
%% |
| 11 |
%% For the copyright see the source file. |
| 12 |
%% |
| 13 |
%% Any modified versions of this file must be renamed |
| 14 |
%% with new filenames distinct from edmac.tex. |
| 15 |
%% |
| 16 |
%% For distribution of the original source see the terms |
| 17 |
%% for copying and modification in the file edmac.doc. |
| 18 |
%% |
| 19 |
%% This generated file may be distributed as long as the |
| 20 |
%% original source files, as listed above, are part of the |
| 21 |
%% same distribution. (The sources need not necessarily be |
| 22 |
%% in the same archive or directory.) |
| 23 |
{\catcode`\$=9 |
| 24 |
\gdef\fileversion{ $Revision: 3.17 $ } |
| 25 |
\gdef\filedate{ $Date: 12 Jun 1996 17:15:00 $ }} |
| 26 |
\def\docdate{12 June 1996} |
| 27 |
%% \CharacterTable |
| 28 |
%% {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 |
| 29 |
%% 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 |
| 30 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 31 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 32 |
%% Dollar \$ Percent \% Ampersand \& |
| 33 |
%% Acute accent \' Left paren \( Right paren \) |
| 34 |
%% Asterisk \* Plus \+ Comma \, |
| 35 |
%% Minus \- Point \. Solidus \/ |
| 36 |
%% Colon \: Semicolon \; Less than \< |
| 37 |
%% Equals \= Greater than \> Question mark \? |
| 38 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 39 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 40 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 41 |
%% Right brace \} Tilde \~} |
| 42 |
%% |
| 43 |
\ifx\edmacloaded\relax\endinput\else\let\edmacloaded=\relax\fi |
| 44 |
{\newlinechar=`\^^J |
| 45 |
\message{^^J |
| 46 |
********************************************************************^^J |
| 47 |
EDMAC Critical edition macros.^^J |
| 48 |
Copyright (C) 1990--1996 John Lavagnino and Dominik Wujastyk.^^J |
| 49 |
This is free software, and you are welcome to redistribute it under^^J |
| 50 |
certain conditions; see the accompanying file COPYING for details.^^J |
| 51 |
^^J% |
| 52 |
\fileversion\space\space\space <\filedate>.^^J |
| 53 |
********************************************************************^^J^^J }} |
| 54 |
\def\makeatletter{\catcode`\@=11 } |
| 55 |
\def\makeatother{\catcode`\@=12 } |
| 56 |
\makeatletter |
| 57 |
\newcount\@tempcnta \newcount\@tempcntb |
| 58 |
\def\edmac@warning#1{\immediate\write\sixt@@n{EDMAC warning: #1}} |
| 59 |
\newcount\section@num |
| 60 |
\section@num=0 |
| 61 |
\let\extensionchars=\empty |
| 62 |
\newif\ifnumbering |
| 63 |
\def\beginnumbering{% |
| 64 |
\ifnumbering |
| 65 |
\errmessage{Numbering has already been started}% |
| 66 |
\endnumbering |
| 67 |
\fi |
| 68 |
\global\numberingtrue |
| 69 |
\global\advance\section@num by 1 |
| 70 |
\global\absline@num=0 |
| 71 |
\global\line@num=0 |
| 72 |
\global\subline@num=0 |
| 73 |
\global\@lock=0 |
| 74 |
\global\sub@lock=0 |
| 75 |
\global\sublines@false |
| 76 |
\global\let\next@page@num=\relax |
| 77 |
\global\let\sub@change=\relax |
| 78 |
\message{Section \the\section@num }% |
| 79 |
\line@list@stuff{\jobname.\extensionchars\the\section@num}% |
| 80 |
\end@stuff} |
| 81 |
\def\endnumbering{% |
| 82 |
\ifnumbering |
| 83 |
\global\numberingfalse |
| 84 |
\normal@pars |
| 85 |
\ifx\insertlines@list\empty\else |
| 86 |
\global\noteschanged@true |
| 87 |
\fi |
| 88 |
\ifx\line@list\empty\else |
| 89 |
\global\noteschanged@true |
| 90 |
\fi |
| 91 |
\ifnoteschanged@ |
| 92 |
\immediate\write\sixt@@n{EDMAC reminder: }% |
| 93 |
\immediate\write\sixt@@n{ The number of footnotes in this section |
| 94 |
has changed since the last run.}% |
| 95 |
\immediate\write\sixt@@n{ You will need to run TeX two more times |
| 96 |
before the footnote placement}% |
| 97 |
\immediate\write\sixt@@n{ and line numbering in this section are |
| 98 |
correct.}% |
| 99 |
\fi |
| 100 |
\else |
| 101 |
\errmessage{Numbering was not started}% |
| 102 |
\fi} |
| 103 |
\def\pausenumbering{\endnumbering\global\numberingtrue} |
| 104 |
\def\resumenumbering{% |
| 105 |
\ifnumbering |
| 106 |
\global\advance\section@num by 1 |
| 107 |
\message{Section \the\section@num\space |
| 108 |
(continuing the previous section)}% |
| 109 |
\line@list@stuff{\jobname.\extensionchars\the\section@num}% |
| 110 |
\end@stuff |
| 111 |
\else |
| 112 |
\errmessage{Numbering should already have been started.}% |
| 113 |
\endnumbering |
| 114 |
\beginnumbering |
| 115 |
\fi} |
| 116 |
\newif\ifbypage@ |
| 117 |
\def\lineation#1{{% |
| 118 |
\ifnumbering |
| 119 |
\errmessage{You can't use \string\lineation\space |
| 120 |
within a numbered section}% |
| 121 |
\else |
| 122 |
\def\@tempa{#1}\def\@tempb{page}% |
| 123 |
\ifx\@tempa\@tempb |
| 124 |
\global\bypage@true |
| 125 |
\else |
| 126 |
\def\@tempb{section}% |
| 127 |
\ifx\@tempa\@tempb |
| 128 |
\global\bypage@false |
| 129 |
\else |
| 130 |
\edmac@warning{Bad \string\lineation\space argument.}% |
| 131 |
\fi |
| 132 |
\fi |
| 133 |
\fi}} |
| 134 |
\newcount\line@margin |
| 135 |
\def\linenummargin#1{{% |
| 136 |
\def\@tempa{#1}\def\@tempb{left}% |
| 137 |
\ifx\@tempa\@tempb |
| 138 |
\global\line@margin=0 |
| 139 |
\else |
| 140 |
\def\@tempb{right}% |
| 141 |
\ifx\@tempa\@tempb |
| 142 |
\global\line@margin=1 |
| 143 |
\else |
| 144 |
\def\@tempb{outer}% |
| 145 |
\ifx\@tempa\@tempb |
| 146 |
\global\line@margin=2 |
| 147 |
\else |
| 148 |
\def\@tempb{inner}% |
| 149 |
\ifx\@tempa\@tempb |
| 150 |
\global\line@margin=3 |
| 151 |
\else |
| 152 |
\edmac@warning{Bad \string\linenummargin\space argument.}% |
| 153 |
\fi |
| 154 |
\fi |
| 155 |
\fi |
| 156 |
\fi}} |
| 157 |
\newcount\firstlinenum |
| 158 |
\newcount\linenumincrement |
| 159 |
\firstlinenum=5 |
| 160 |
\linenumincrement=5 |
| 161 |
\newcount\firstsublinenum |
| 162 |
\newcount\sublinenumincrement |
| 163 |
\firstsublinenum=5 |
| 164 |
\sublinenumincrement=5 |
| 165 |
\newcount\lock@disp |
| 166 |
\def\lockdisp#1{{% |
| 167 |
\def\@tempa{#1}\def\@tempb{first}% |
| 168 |
\ifx\@tempa\@tempb |
| 169 |
\global\lock@disp=0 |
| 170 |
\else |
| 171 |
\def\@tempb{last}% |
| 172 |
\ifx\@tempa\@tempb |
| 173 |
\global\lock@disp=1 |
| 174 |
\else |
| 175 |
\def\@tempb{all}% |
| 176 |
\ifx\@tempa\@tempb |
| 177 |
\global\lock@disp=2 |
| 178 |
\else |
| 179 |
\edmac@warning{Bad \string\lockdisp\space argument.}% |
| 180 |
\fi |
| 181 |
\fi |
| 182 |
\fi}} |
| 183 |
\newcount\sublock@disp |
| 184 |
\def\sublockdisp#1{{% |
| 185 |
\def\@tempa{#1}\def\@tempb{first}% |
| 186 |
\ifx\@tempa\@tempb |
| 187 |
\global\sublock@disp=0 |
| 188 |
\else |
| 189 |
\def\@tempb{last}% |
| 190 |
\ifx\@tempa\@tempb |
| 191 |
\global\sublock@disp=1 |
| 192 |
\else |
| 193 |
\def\@tempb{all}% |
| 194 |
\ifx\@tempa\@tempb |
| 195 |
\global\sublock@disp=2 |
| 196 |
\else |
| 197 |
\edmac@warning{Bad \string\sublockdisp\space argument.}% |
| 198 |
\fi |
| 199 |
\fi |
| 200 |
\fi}} |
| 201 |
\newdimen\linenumsep |
| 202 |
\linenumsep=1pc |
| 203 |
\ifx\selectfont\undefined |
| 204 |
\let\numlabfont=\sevenrm |
| 205 |
\else |
| 206 |
\def\numlabfont{\fontsize{7}{8pt}\rm} |
| 207 |
\fi |
| 208 |
\def\leftlinenum{\numlabfont\the\line@num |
| 209 |
\ifsublines@ |
| 210 |
\ifnum\subline@num>0 |
| 211 |
\unskip\fullstop\the\subline@num |
| 212 |
\fi |
| 213 |
\fi |
| 214 |
\kern\linenumsep} |
| 215 |
\def\rightlinenum{\kern\linenumsep \numlabfont\the\line@num |
| 216 |
\ifsublines@ |
| 217 |
\ifnum\subline@num>0 |
| 218 |
\unskip\fullstop\the\subline@num |
| 219 |
\fi |
| 220 |
\fi} |
| 221 |
\def\list@create#1{\global\let#1=\empty} |
| 222 |
\def\list@clear#1{\global\let#1=\empty} |
| 223 |
\newtoks\@toksa \newtoks\@toksb |
| 224 |
\global\@toksa={\\} |
| 225 |
\long\def\xright@appenditem#1\to#2{% |
| 226 |
\global\@toksb=\expandafter{#2}% |
| 227 |
\xdef#2{\the\@toksb\the\@toksa\expandafter{#1}}% |
| 228 |
\global\@toksb={}} |
| 229 |
\long\def\xleft@appenditem#1\to#2{% |
| 230 |
\global\@toksb=\expandafter{#2}% |
| 231 |
\xdef#2{\the\@toksa\expandafter{#1}\the\@toksb}% |
| 232 |
\global\@toksb={}} |
| 233 |
\def\gl@p#1\to#2{\expandafter\gl@poff#1\gl@poff#1#2} |
| 234 |
\long\def\gl@poff\\#1#2\gl@poff#3#4{\gdef#4{#1}\gdef#3{#2}} |
| 235 |
\newcount\line@num |
| 236 |
\newcount\subline@num |
| 237 |
\newif\ifsublines@ |
| 238 |
\newcount\absline@num |
| 239 |
\newcount\@lock |
| 240 |
\newcount\sub@lock |
| 241 |
\list@create{\line@list} |
| 242 |
\list@create{\insertlines@list} |
| 243 |
\list@create{\actionlines@list} |
| 244 |
\list@create{\actions@list} |
| 245 |
\newcount\page@num |
| 246 |
\newcount\endpage@num |
| 247 |
\newcount\endline@num |
| 248 |
\newcount\endsubline@num |
| 249 |
\newif\ifnoteschanged@ |
| 250 |
\newread\@inputcheck |
| 251 |
\def\read@linelist#1{% |
| 252 |
\list@clear{\line@list}% |
| 253 |
\list@clear{\insertlines@list}% |
| 254 |
\list@clear{\actionlines@list}% |
| 255 |
\list@clear{\actions@list}% |
| 256 |
\openin\@inputcheck=#1 |
| 257 |
\ifeof\@inputcheck |
| 258 |
\edmac@warning{Can't find line-list file #1}% |
| 259 |
\global\noteschanged@true |
| 260 |
\else |
| 261 |
\global\noteschanged@false |
| 262 |
\closein\@inputcheck |
| 263 |
\begingroup |
| 264 |
\catcode`\[=1 \catcode`\]=2 |
| 265 |
\makeatletter \catcode`\^^M=9 |
| 266 |
\input #1 |
| 267 |
\endgroup |
| 268 |
\fi |
| 269 |
\global\page@num=-1 |
| 270 |
\ifx\actionlines@list\empty |
| 271 |
\gdef\next@actionline{1000000}% |
| 272 |
\else |
| 273 |
\gl@p\actionlines@list\to\next@actionline |
| 274 |
\gl@p\actions@list\to\next@action |
| 275 |
\fi} |
| 276 |
\def\@l{\advance\absline@num by 1 |
| 277 |
\ifx\next@page@num\relax \else |
| 278 |
\page@action |
| 279 |
\let\next@page@num=\relax |
| 280 |
\fi |
| 281 |
\ifx\sub@change\relax \else |
| 282 |
\ifnum\sub@change>0 |
| 283 |
\sublines@true |
| 284 |
\else |
| 285 |
\sublines@false |
| 286 |
\fi |
| 287 |
\sub@action |
| 288 |
\let\sub@change=\relax |
| 289 |
\fi |
| 290 |
\ifcase\@lock |
| 291 |
\or |
| 292 |
\@lock=2 |
| 293 |
\or \or |
| 294 |
\@lock=0 |
| 295 |
\fi |
| 296 |
\ifcase\sub@lock |
| 297 |
\or |
| 298 |
\sub@lock=2 |
| 299 |
\or \or |
| 300 |
\sub@lock=0 |
| 301 |
\fi |
| 302 |
\ifsublines@ |
| 303 |
\ifnum\sub@lock<2 |
| 304 |
\advance\subline@num by 1 |
| 305 |
\fi |
| 306 |
\else |
| 307 |
\ifnum\@lock<2 |
| 308 |
\advance\line@num by 1 \subline@num=0 |
| 309 |
\fi |
| 310 |
\fi} |
| 311 |
\def\@page#1{\ifbypage@ |
| 312 |
\line@num=0 \subline@num=0 |
| 313 |
\fi |
| 314 |
\page@num=#1 |
| 315 |
\def\next@page@num{#1}} |
| 316 |
\def\sub@on{\ifsublines@ |
| 317 |
\let\sub@change=\relax |
| 318 |
\else |
| 319 |
\def\sub@change{1}% |
| 320 |
\fi} |
| 321 |
\def\sub@off{\ifsublines@ |
| 322 |
\def\sub@change{-1}% |
| 323 |
\else |
| 324 |
\let\sub@change=\relax |
| 325 |
\fi} |
| 326 |
\def\@adv#1{\ifsublines@ |
| 327 |
\advance\subline@num by #1 |
| 328 |
\ifnum\subline@num<0 |
| 329 |
\edmac@warning{\string\advanceline\space produced |
| 330 |
a sub-line number less than zero.}% |
| 331 |
\subline@num=0 |
| 332 |
\fi |
| 333 |
\else |
| 334 |
\advance\line@num by #1 |
| 335 |
\ifnum\line@num<0 |
| 336 |
\edmac@warning{\string\advanceline\space produced |
| 337 |
a line number less than zero.}% |
| 338 |
\line@num=0 |
| 339 |
\fi |
| 340 |
\fi |
| 341 |
\set@line@action} |
| 342 |
\def\@set#1{\ifsublines@ |
| 343 |
\subline@num=#1 |
| 344 |
\else |
| 345 |
\line@num=#1 |
| 346 |
\fi |
| 347 |
\set@line@action} |
| 348 |
\def\page@action{% |
| 349 |
\xright@appenditem{\the\absline@num}\to\actionlines@list |
| 350 |
\xright@appenditem{\next@page@num}\to\actions@list} |
| 351 |
\def\set@line@action{% |
| 352 |
\xright@appenditem{\the\absline@num}\to\actionlines@list |
| 353 |
\ifsublines@ |
| 354 |
\@tempcnta=-\subline@num |
| 355 |
\else |
| 356 |
\@tempcnta=-\line@num |
| 357 |
\fi |
| 358 |
\advance\@tempcnta by -5000 |
| 359 |
\xright@appenditem{\the\@tempcnta}\to\actions@list} |
| 360 |
\def\sub@action{% |
| 361 |
\xright@appenditem{\the\absline@num}\to\actionlines@list |
| 362 |
\ifsublines@ |
| 363 |
\xright@appenditem{-1001}\to\actions@list |
| 364 |
\else |
| 365 |
\xright@appenditem{-1002}\to\actions@list |
| 366 |
\fi} |
| 367 |
\def\lock@on{\futurelet\next\do@lockon} |
| 368 |
\def\do@lockon{% |
| 369 |
\ifx\next\lock@off |
| 370 |
\global\let\lock@off=\skip@lockoff |
| 371 |
\else |
| 372 |
\xright@appenditem{\the\absline@num}\to\actionlines@list |
| 373 |
\ifsublines@ |
| 374 |
\xright@appenditem{-1005}\to\actions@list |
| 375 |
\ifcase\sub@lock |
| 376 |
\sub@lock=1 |
| 377 |
\else |
| 378 |
\sub@lock=0 |
| 379 |
\fi |
| 380 |
\else |
| 381 |
\xright@appenditem{-1003}\to\actions@list |
| 382 |
\ifcase\@lock |
| 383 |
\@lock=1 |
| 384 |
\else |
| 385 |
\@lock=0 |
| 386 |
\fi |
| 387 |
\fi |
| 388 |
\fi} |
| 389 |
\def\do@lockoff{% |
| 390 |
\xright@appenditem{\the\absline@num}\to\actionlines@list |
| 391 |
\ifsublines@ |
| 392 |
\xright@appenditem{-1006}\to\actions@list |
| 393 |
\ifnum\sub@lock=2 |
| 394 |
\sub@lock=3 |
| 395 |
\else |
| 396 |
\sub@lock=0 |
| 397 |
\fi |
| 398 |
\else |
| 399 |
\xright@appenditem{-1004}\to\actions@list |
| 400 |
\ifnum\@lock=2 |
| 401 |
\@lock=3 |
| 402 |
\else |
| 403 |
\@lock=0 |
| 404 |
\fi |
| 405 |
\fi} |
| 406 |
\def\skip@lockoff{\global\let\lock@off=\do@lockoff} |
| 407 |
\global\let\lock@off=\do@lockoff |
| 408 |
\newcount\insert@count |
| 409 |
\def\dummy@ref#1#2{#2} |
| 410 |
\def\@ref#1#2{% |
| 411 |
\global\insert@count=#1 |
| 412 |
\loop\ifnum\insert@count>0 |
| 413 |
\xright@appenditem{\the\absline@num}\to\insertlines@list |
| 414 |
\global\advance\insert@count by -1 |
| 415 |
\repeat |
| 416 |
\begingroup |
| 417 |
\let\@ref=\dummy@ref |
| 418 |
\let\page@action=\relax |
| 419 |
\let\sub@action=\relax |
| 420 |
\let\set@line@action=\relax |
| 421 |
\let\@lab=\relax |
| 422 |
#2 |
| 423 |
\global\endpage@num=\page@num |
| 424 |
\global\endline@num=\line@num |
| 425 |
\global\endsubline@num=\subline@num |
| 426 |
\endgroup |
| 427 |
\xright@appenditem% |
| 428 |
{\the\page@num|\the\line@num|% |
| 429 |
\ifsublines@ \the\subline@num \else 0\fi|% |
| 430 |
\the\endpage@num|\the\endline@num|% |
| 431 |
\ifsublines@ \the\endsubline@num \else 0\fi}\to\line@list |
| 432 |
#2} |
| 433 |
\newwrite\linenum@out |
| 434 |
\newif\iffirst@linenum@out@ |
| 435 |
\first@linenum@out@true |
| 436 |
\def\line@list@stuff#1{% |
| 437 |
\read@linelist{#1}% |
| 438 |
\iffirst@linenum@out@ |
| 439 |
\immediate\closeout\linenum@out |
| 440 |
\global\first@linenum@out@false |
| 441 |
\immediate\openout\linenum@out=#1 |
| 442 |
\else |
| 443 |
\closeout\linenum@out |
| 444 |
\openout\linenum@out=#1 |
| 445 |
\page@start |
| 446 |
\fi} |
| 447 |
\def\new@line{\write\linenum@out{\string\@l}} |
| 448 |
\def\flag@start{% |
| 449 |
\edef\next{\write\linenum@out{% |
| 450 |
\string\@ref[\the\insert@count][}}% |
| 451 |
\next} |
| 452 |
\def\flag@end{\write\linenum@out{]}} |
| 453 |
\def\page@start{% |
| 454 |
\iffirst@linenum@out@ \else |
| 455 |
\write\linenum@out{\string\@page[\the\pageno]}% |
| 456 |
\fi} |
| 457 |
\def\startsub{\dimen0\lastskip |
| 458 |
\ifdim\dimen0>0pt \unskip \fi |
| 459 |
\write\linenum@out{\string\sub@on}% |
| 460 |
\ifdim\dimen0>0pt \hskip\dimen0 \fi} |
| 461 |
\def\endsub{\dimen0\lastskip |
| 462 |
\ifdim\dimen0>0pt \unskip \fi |
| 463 |
\write\linenum@out{\string\sub@off}% |
| 464 |
\ifdim\dimen0>0pt \hskip\dimen0 \fi} |
| 465 |
\def\advanceline#1{\write\linenum@out{\string\@adv[#1]}} |
| 466 |
\def\setline#1{% |
| 467 |
\ifnum#1<0 |
| 468 |
\edmac@warning{Bad setline argument.}% |
| 469 |
\else |
| 470 |
\write\linenum@out{\string\@set[#1]}% |
| 471 |
\fi} |
| 472 |
\def\startlock{\write\linenum@out{\string\lock@on}} |
| 473 |
\def\endlock{\write\linenum@out{\string\lock@off}} |
| 474 |
\list@create{\end@lemmas} |
| 475 |
\long\def\dummy@text#1#2/{#1} |
| 476 |
\def\@gobble#1{} |
| 477 |
\def\no@expands{\let\rm=0\let\it=0\let\sl=0\let\bf=0\let\tt=0% |
| 478 |
\let\b=0\let\c=0\let\d=0\let\t=0% |
| 479 |
\let\select@@lemmafont=0% |
| 480 |
\def\protect{\noexpand\protect\noexpand}% |
| 481 |
\let\startsub=\relax \let\endsub=\relax |
| 482 |
\let\startlock=\relax \let\endlock=\relax |
| 483 |
\let\label=\@gobble \let\pageref=\@gobble |
| 484 |
\let\lineref=\@gobble \let\sublineref=\@gobble |
| 485 |
\let\setline=\@gobble \let\advanceline=\@gobble |
| 486 |
\let\text=\dummy@text |
| 487 |
\morenoexpands} |
| 488 |
\let\morenoexpands=\relax |
| 489 |
\long\def\text#1#2/{\leavevmode |
| 490 |
\begingroup |
| 491 |
\no@expands |
| 492 |
\xdef\@tag{#1}% |
| 493 |
\set@line |
| 494 |
\global\insert@count=0 |
| 495 |
\ignorespaces #2\relax |
| 496 |
\flag@start |
| 497 |
\endgroup |
| 498 |
#1% |
| 499 |
\ifx\end@lemmas\empty \else |
| 500 |
\gl@p\end@lemmas\to\x@lemma |
| 501 |
\x@lemma |
| 502 |
\global\let\x@lemma=\relax |
| 503 |
\fi |
| 504 |
\flag@end} |
| 505 |
\def\set@line{% |
| 506 |
\ifx\line@list\empty |
| 507 |
\global\noteschanged@true |
| 508 |
\xdef\@nums{000|000|000|000|000|000|\edfont@info}% |
| 509 |
\else |
| 510 |
\gl@p\line@list\to\@tempb |
| 511 |
\xdef\@nums{\@tempb|\edfont@info}% |
| 512 |
\global\let\@tempb=\undefined |
| 513 |
\fi} |
| 514 |
\ifx\selectfont\undefined % we're using Plain fonts |
| 515 |
\def\edfont@info{\the\fam} |
| 516 |
\else % we're using NFSS |
| 517 |
\def\edfont@info{\f@encoding/\f@family/\f@series/\f@shape} |
| 518 |
\fi |
| 519 |
\def\lemma#1{\xdef\@tag{#1}\ignorespaces} |
| 520 |
\def\linenum#1{% |
| 521 |
\xdef\@tempa{#1|||||||\noexpand\\\@nums}% |
| 522 |
\global\let\@nums=\empty |
| 523 |
\expandafter\line@set\@tempa|\\\ignorespaces} |
| 524 |
\def\line@set#1|#2\\#3|#4\\{% |
| 525 |
\gdef\@tempb{#1}% |
| 526 |
\ifx\@tempb\empty |
| 527 |
\@add{#3}% |
| 528 |
\else |
| 529 |
\@add{#1}% |
| 530 |
\fi |
| 531 |
\gdef\@tempb{#4}% |
| 532 |
\ifx\@tempb\empty\else |
| 533 |
\@add{|}\line@set#2\\#4\\% |
| 534 |
\fi} |
| 535 |
\def\@add#1{\xdef\@nums{\@nums#1}} |
| 536 |
\newbox\raw@text |
| 537 |
\newif\ifnumberedpar@ |
| 538 |
\newcount\num@lines |
| 539 |
\newbox\one@line |
| 540 |
\newcount\par@line |
| 541 |
\def\pstart{\ifnumbering \else |
| 542 |
\errmessage{\string\pstart\space must be used |
| 543 |
within a numbered section}% |
| 544 |
\beginnumbering |
| 545 |
\fi |
| 546 |
\ifnumberedpar@ |
| 547 |
\errmessage{\string\pstart\space encountered while another |
| 548 |
\string\pstart\space was in effect}% |
| 549 |
\pend |
| 550 |
\fi |
| 551 |
\list@clear{\inserts@list}% |
| 552 |
\global\let\next@insert=\empty |
| 553 |
\begingroup\normal@pars |
| 554 |
\global\setbox\raw@text=\vbox\bgroup |
| 555 |
\numberedpar@true} |
| 556 |
\def\pend{\ifnumbering \else |
| 557 |
\errmessage{\string\pend\space must be used |
| 558 |
within a numbered section}% |
| 559 |
\fi |
| 560 |
\ifnumberedpar@ \else |
| 561 |
\errmessage{\string\pend\space must follow a \string\pstart}% |
| 562 |
\fi |
| 563 |
\brokenpenalty=0 \clubpenalty=0 |
| 564 |
\displaywidowpenalty=0 \interlinepenalty=0 \predisplaypenalty=0 |
| 565 |
\postdisplaypenalty=0 \widowpenalty=0 |
| 566 |
\endgraf\global\num@lines=\prevgraf\egroup |
| 567 |
\global\par@line=0 |
| 568 |
\loop\ifvbox\raw@text |
| 569 |
\do@line |
| 570 |
\repeat |
| 571 |
\flush@notes |
| 572 |
\endgroup |
| 573 |
\ignorespaces} |
| 574 |
\def\autopar{\ifnumbering \else |
| 575 |
\errmessage{\string\autopar\space must be used |
| 576 |
within a numbered section}% |
| 577 |
\beginnumbering |
| 578 |
\fi |
| 579 |
\everypar={\setbox0=\lastbox |
| 580 |
\endgraf \vskip-\parskip |
| 581 |
\pstart \noindent \kern\wd0 |
| 582 |
\let\par=\pend}% |
| 583 |
\ignorespaces} |
| 584 |
\def\normal@pars{\everypar={}\let\par\endgraf} |
| 585 |
\def\do@line{% |
| 586 |
{\vbadness=10000 \splittopskip=0pt |
| 587 |
\global\setbox\one@line=\vsplit\raw@text to\baselineskip}% |
| 588 |
\unvbox\one@line \global\setbox\one@line=\lastbox |
| 589 |
\getline@num |
| 590 |
\hbox to \hsize{\affixline@num{% |
| 591 |
\hfil\hbox to \wd\one@line{\new@line\unhbox\one@line}}}% |
| 592 |
\add@inserts |
| 593 |
\add@penalties} |
| 594 |
\def\getline@num{% |
| 595 |
\global\advance\absline@num by 1 |
| 596 |
\do@actions |
| 597 |
\do@ballast |
| 598 |
\ifsublines@ |
| 599 |
\ifnum\sub@lock<2 |
| 600 |
\global\advance\subline@num by 1 |
| 601 |
\fi |
| 602 |
\else |
| 603 |
\ifnum\@lock<2 |
| 604 |
\global\advance\line@num by 1 |
| 605 |
\global\subline@num=0 |
| 606 |
\fi |
| 607 |
\fi} |
| 608 |
\newcount\ballast@count |
| 609 |
\newcount\ballast |
| 610 |
\def\do@ballast{\global\ballast@count=0 |
| 611 |
\begingroup |
| 612 |
\advance\absline@num by 1 |
| 613 |
\ifnum\next@actionline=\absline@num |
| 614 |
\ifnum\next@action>-1001 |
| 615 |
\global\advance\ballast@count by -\ballast |
| 616 |
\fi |
| 617 |
\fi |
| 618 |
\endgroup} |
| 619 |
\def\do@actions{% |
| 620 |
\global\let\do@actions@next=\relax |
| 621 |
\ifnum\absline@num<\next@actionline\else |
| 622 |
\ifnum\next@action>-1001 |
| 623 |
\global\page@num=\next@action |
| 624 |
\ifbypage@ |
| 625 |
\global\line@num=0 \global\subline@num=0 |
| 626 |
\fi |
| 627 |
\else |
| 628 |
\ifnum\next@action<-4999 |
| 629 |
\@tempcnta=-\next@action |
| 630 |
\advance\@tempcnta by -5001 |
| 631 |
\ifsublines@ |
| 632 |
\global\subline@num=\@tempcnta |
| 633 |
\else |
| 634 |
\global\line@num=\@tempcnta |
| 635 |
\fi |
| 636 |
\else |
| 637 |
\@tempcnta=-\next@action |
| 638 |
\advance\@tempcnta by -1000 |
| 639 |
\ifcase\@tempcnta |
| 640 |
\or |
| 641 |
\global\sublines@true |
| 642 |
\or |
| 643 |
\global\sublines@false |
| 644 |
\or |
| 645 |
\ifcase\@lock |
| 646 |
\global\@lock=1 |
| 647 |
\else |
| 648 |
\global\@lock=0 |
| 649 |
\fi |
| 650 |
\or |
| 651 |
\ifnum\@lock=2 |
| 652 |
\global\@lock=3 |
| 653 |
\else |
| 654 |
\global\@lock=0 |
| 655 |
\fi |
| 656 |
\or |
| 657 |
\ifcase\sub@lock |
| 658 |
\global\sub@lock=1 |
| 659 |
\else |
| 660 |
\global\sub@lock=0 |
| 661 |
\fi |
| 662 |
\or |
| 663 |
\ifnum\sub@lock=2 |
| 664 |
\global\sub@lock=3 |
| 665 |
\else |
| 666 |
\global\sub@lock=0 |
| 667 |
\fi |
| 668 |
\else |
| 669 |
\edmac@warning{Bad action code, |
| 670 |
value \next@action.}% |
| 671 |
\fi |
| 672 |
\fi |
| 673 |
\fi |
| 674 |
\ifx\actionlines@list\empty |
| 675 |
\gdef\next@actionline{1000000}% |
| 676 |
\else |
| 677 |
\gl@p\actionlines@list\to\next@actionline |
| 678 |
\gl@p\actions@list\to\next@action |
| 679 |
\global\let\do@actions@next=\do@actions |
| 680 |
\fi |
| 681 |
\fi |
| 682 |
\do@actions@next} |
| 683 |
\def\affixline@num#1{% |
| 684 |
\ifsublines@ |
| 685 |
\@tempcntb=\subline@num |
| 686 |
\ifnum\subline@num>\firstsublinenum |
| 687 |
\@tempcnta=\subline@num |
| 688 |
\advance\@tempcnta by-\firstsublinenum |
| 689 |
\divide\@tempcnta by\sublinenumincrement |
| 690 |
\multiply\@tempcnta by\sublinenumincrement |
| 691 |
\advance\@tempcnta by\firstsublinenum |
| 692 |
\else |
| 693 |
\@tempcnta=\firstsublinenum |
| 694 |
\fi |
| 695 |
\ifcase\sub@lock |
| 696 |
\or |
| 697 |
\ifnum\sublock@disp=1 |
| 698 |
\@tempcntb=0 \@tempcnta=1 |
| 699 |
\fi |
| 700 |
\or |
| 701 |
\ifnum\sublock@disp=2 \else |
| 702 |
\@tempcntb=0 \@tempcnta=1 |
| 703 |
\fi |
| 704 |
\or |
| 705 |
\ifnum\sublock@disp=0 |
| 706 |
\@tempcntb=0 \@tempcnta=1 |
| 707 |
\fi |
| 708 |
\fi |
| 709 |
\else |
| 710 |
\@tempcntb=\line@num |
| 711 |
\ifnum\line@num>\firstlinenum |
| 712 |
\@tempcnta=\line@num |
| 713 |
\advance\@tempcnta by-\firstlinenum |
| 714 |
\divide\@tempcnta by\linenumincrement |
| 715 |
\multiply\@tempcnta by\linenumincrement |
| 716 |
\advance\@tempcnta by\firstlinenum |
| 717 |
\else |
| 718 |
\@tempcnta=\firstlinenum |
| 719 |
\fi |
| 720 |
\ifcase\@lock |
| 721 |
\or |
| 722 |
\ifnum\lock@disp=1 |
| 723 |
\@tempcntb=0 \@tempcnta=1 |
| 724 |
\fi |
| 725 |
\or |
| 726 |
\ifnum\lock@disp=2 \else |
| 727 |
\@tempcntb=0 \@tempcnta=1 |
| 728 |
\fi |
| 729 |
\or |
| 730 |
\ifnum\lock@disp=0 |
| 731 |
\@tempcntb=0 \@tempcnta=1 |
| 732 |
\fi |
| 733 |
\fi |
| 734 |
\fi |
| 735 |
\ifnum\@tempcnta=\@tempcntb |
| 736 |
\@tempcntb=\line@margin |
| 737 |
\ifnum\@tempcntb>1 |
| 738 |
\advance\@tempcntb by\page@num |
| 739 |
\fi |
| 740 |
\ifodd\@tempcntb |
| 741 |
#1\rlap{{\rightlinenum}}% |
| 742 |
\else |
| 743 |
\llap{{\leftlinenum}}#1% |
| 744 |
\fi |
| 745 |
\else |
| 746 |
#1% |
| 747 |
\fi |
| 748 |
\ifcase\@lock |
| 749 |
\or |
| 750 |
\global\@lock=2 |
| 751 |
\or \or |
| 752 |
\global\@lock=0 |
| 753 |
\fi |
| 754 |
\ifcase\sub@lock |
| 755 |
\or |
| 756 |
\global\sub@lock=2 |
| 757 |
\or \or |
| 758 |
\global\sub@lock=0 |
| 759 |
\fi} |
| 760 |
\list@create{\inserts@list} |
| 761 |
\def\add@inserts{% |
| 762 |
\global\let\add@inserts@next=\relax |
| 763 |
\ifx\inserts@list\empty \else |
| 764 |
\ifx\next@insert\empty |
| 765 |
\ifx\insertlines@list\empty |
| 766 |
\global\noteschanged@true |
| 767 |
\gdef\next@insert{100000}% |
| 768 |
\else |
| 769 |
\gl@p\insertlines@list\to\next@insert |
| 770 |
\fi |
| 771 |
\fi |
| 772 |
\ifnum\next@insert=\absline@num |
| 773 |
\gl@p\inserts@list\to\@insert |
| 774 |
\@insert |
| 775 |
\global\let\@insert=\undefined |
| 776 |
\global\let\next@insert=\empty |
| 777 |
\global\let\add@inserts@next=\add@inserts |
| 778 |
\fi |
| 779 |
\fi |
| 780 |
\add@inserts@next} |
| 781 |
\def\add@penalties{\@tempcnta=\ballast@count |
| 782 |
\ifnum\num@lines>1 |
| 783 |
\global\advance\par@line by 1 |
| 784 |
\ifnum\par@line=1 |
| 785 |
\advance\@tempcnta by \clubpenalty |
| 786 |
\fi |
| 787 |
\@tempcntb=\par@line \advance\@tempcntb by 1 |
| 788 |
\ifnum\@tempcntb=\num@lines |
| 789 |
\advance\@tempcnta by \widowpenalty |
| 790 |
\fi |
| 791 |
\ifnum\par@line<\num@lines |
| 792 |
\advance\@tempcnta by \interlinepenalty |
| 793 |
\fi |
| 794 |
\fi |
| 795 |
\ifnum\@tempcnta=0 |
| 796 |
\relax |
| 797 |
\else |
| 798 |
\ifnum\@tempcnta>-10000 |
| 799 |
\penalty\@tempcnta |
| 800 |
\else |
| 801 |
\penalty -10000 |
| 802 |
\fi |
| 803 |
\fi} |
| 804 |
\def\flush@notes{% |
| 805 |
\@xloop |
| 806 |
\ifx\inserts@list\empty \else |
| 807 |
\gl@p\inserts@list\to\@insert |
| 808 |
\@insert |
| 809 |
\global\let\@insert=\undefined |
| 810 |
\repeat} |
| 811 |
\def\@xloop#1\repeat{% |
| 812 |
\def\body{#1\expandafter\body\fi}% |
| 813 |
\body} |
| 814 |
\ifx\selectfont\undefined |
| 815 |
\font\eightrm=cmr8 \font\eighti=cmmi8 \skewchar\eighti='177 |
| 816 |
\font\eightsy=cmsy8 \skewchar\eightsy='60 \font\eightbf=cmbx8 |
| 817 |
\font\eighttt=cmtt8 \hyphenchar\eighttt=-1 % inhibit hyphenation |
| 818 |
\font\eightsl=cmsl8 \font\eightit=cmti8 |
| 819 |
\font\sixrm=cmr8 \font\sixi=cmmi8 \skewchar\sixi='177 |
| 820 |
\font\sixsy=cmsy8 \skewchar\sixsy='60 \font\sixbf=cmbx8 |
| 821 |
\font\sixtt=cmtt8 \hyphenchar\sixtt=-1 % inhibit hyphenation |
| 822 |
\font\sixsl=cmsl8 \font\sixit=cmti8 |
| 823 |
\def\eightpoint{\def\rm{\fam0\eightrm}% |
| 824 |
\textfont0=\eightrm \scriptfont0=\sixrm |
| 825 |
\scriptscriptfont0=\fiverm |
| 826 |
\textfont1=\eighti \scriptfont1=\sixi |
| 827 |
\scriptscriptfont1=\fivei |
| 828 |
\textfont2=\eightsy \scriptfont2=\sixsy |
| 829 |
\scriptscriptfont2=\fivesy |
| 830 |
\textfont3=\tenex \scriptfont3=\tenex |
| 831 |
\scriptscriptfont3=\tenex |
| 832 |
\def\it{\fam\itfam\eightit}\textfont\itfam=\eightit |
| 833 |
\def\sl{\fam\slfam\eightsl}\textfont\slfam=\eightsl |
| 834 |
\def\bf{\fam\bffam\eightbf}\textfont\bffam=\eightbf |
| 835 |
\scriptfont\bffam=\sixbf \scriptscriptfont\bffam=\fivebf |
| 836 |
\def\tt{\fam\ttfam\eighttt}\textfont\ttfam=\eighttt |
| 837 |
\normalbaselineskip=9pt |
| 838 |
\setbox\strutbox=\hbox{\vrule height7pt depth2pt width0pt}% |
| 839 |
\normalbaselines\rm} |
| 840 |
\let\notefontsetup=\eightpoint |
| 841 |
\let\notenumfont=\sevenrm |
| 842 |
\def\select@lemmafont#1|#2|#3|#4|#5|#6|#7|{% |
| 843 |
\ifcase#7 |
| 844 |
\rm \or \rm \or \rm \or \rm % families 0--3 |
| 845 |
\or \it \or \sl \or \bf \or \tt % families 4--7 |
| 846 |
\else \rm |
| 847 |
\fi} |
| 848 |
\else |
| 849 |
\def\notefontsetup{\fontsize{8}{9pt}\selectfont} |
| 850 |
\def\notenumfont{\fontsize{7}{8pt}\rm} |
| 851 |
\def\select@lemmafont#1|#2|#3|#4|#5|#6|#7|{\select@@lemmafont#7|} |
| 852 |
\def\select@@lemmafont#1/#2/#3/#4|% |
| 853 |
{\fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}% |
| 854 |
\selectfont} |
| 855 |
\fi |
| 856 |
\def\Afootnote#1{% |
| 857 |
\ifnumberedpar@ |
| 858 |
\xright@appenditem{\noexpand\vAfootnote{A}% |
| 859 |
{{\@nums}{\@tag}{#1}}}\to\inserts@list |
| 860 |
\global\advance\insert@count by 1 |
| 861 |
\else |
| 862 |
\vAfootnote{A}{{0|0|0|0|0|0|0}{}{#1}}% |
| 863 |
\fi\ignorespaces} |
| 864 |
\def\Bfootnote#1{% |
| 865 |
\ifnumberedpar@ |
| 866 |
\xright@appenditem{\noexpand\vBfootnote{B}% |
| 867 |
{{\@nums}{\@tag}{#1}}}\to\inserts@list |
| 868 |
\global\advance\insert@count by 1 |
| 869 |
\else |
| 870 |
\vBfootnote{B}{{0|0|0|0|0|0|0}{}{#1}}% |
| 871 |
\fi\ignorespaces} |
| 872 |
\def\Cfootnote#1{% |
| 873 |
\ifnumberedpar@ |
| 874 |
\xright@appenditem{\noexpand\vCfootnote{C}% |
| 875 |
{{\@nums}{\@tag}{#1}}}\to\inserts@list |
| 876 |
\global\advance\insert@count by 1 |
| 877 |
\else |
| 878 |
\vCfootnote{C}{{0|0|0|0|0|0|0}{}{#1}}% |
| 879 |
\fi\ignorespaces} |
| 880 |
\def\Dfootnote#1{% |
| 881 |
\ifnumberedpar@ |
| 882 |
\xright@appenditem{\noexpand\vDfootnote{D}% |
| 883 |
{{\@nums}{\@tag}{#1}}}\to\inserts@list |
| 884 |
\global\advance\insert@count by 1 |
| 885 |
\else |
| 886 |
\vDfootnote{D}{{0|0|0|0|0|0|0}{}{#1}}% |
| 887 |
\fi\ignorespaces} |
| 888 |
\def\Efootnote#1{% |
| 889 |
\ifnumberedpar@ |
| 890 |
\xright@appenditem{\noexpand\vEfootnote{E}% |
| 891 |
{{\@nums}{\@tag}{#1}}}\to\inserts@list |
| 892 |
\global\advance\insert@count by 1 |
| 893 |
\else |
| 894 |
\vEfootnote{E}{{0|0|0|0|0|0|0}{}{#1}}% |
| 895 |
\fi\ignorespaces} |
| 896 |
\def\normalvfootnote#1#2{\insert\csname #1footins\endcsname\bgroup |
| 897 |
\notefontsetup |
| 898 |
\interlinepenalty\csname inter#1footnotelinepenalty\endcsname |
| 899 |
\splittopskip\ht\strutbox |
| 900 |
\splitmaxdepth\dp\strutbox \floatingpenalty\@MM |
| 901 |
\leftskip\z@skip \rightskip\z@skip |
| 902 |
\spaceskip\z@skip \xspaceskip\z@skip |
| 903 |
\csname #1footfmt\endcsname #2\egroup} |
| 904 |
\def\normalfootfmt#1#2#3{% |
| 905 |
\normal@pars |
| 906 |
\parindent=0pt \parfillskip=0pt plus 1fil |
| 907 |
{\notenumfont\printlines#1|}\strut\enspace |
| 908 |
{\select@lemmafont#1|#2}\rbracket\enskip#3\strut\par} |
| 909 |
\def\endashchar{{\rm--}} |
| 910 |
\def\fullstop{{\rm.}} |
| 911 |
\def\rbracket{{\rm\thinspace]}} |
| 912 |
\newcount\@pnum \newcount\@ssub \newcount\@elin |
| 913 |
\newcount\@esl \newcount\@dash |
| 914 |
\def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup |
| 915 |
\@pnum=0 \@dash=0 |
| 916 |
\ifbypage@ |
| 917 |
\ifnum#4=#1 \else |
| 918 |
\@pnum=1 |
| 919 |
\@dash=1 |
| 920 |
\fi |
| 921 |
\fi |
| 922 |
\@elin=\@pnum |
| 923 |
\ifnum#2=#5 \else |
| 924 |
\@elin=1 |
| 925 |
\@dash=1 |
| 926 |
\fi |
| 927 |
\@ssub=0 |
| 928 |
\ifnum#3=0 \else |
| 929 |
\@ssub=1 |
| 930 |
\fi |
| 931 |
\@esl=0 |
| 932 |
\ifnum#6=0 \else |
| 933 |
\ifnum#6=#3 |
| 934 |
\@esl=\@elin |
| 935 |
\else |
| 936 |
\@esl=1 |
| 937 |
\@dash=1 |
| 938 |
\fi |
| 939 |
\fi |
| 940 |
\ifodd\@pnum #1\fullstop\fi |
| 941 |
#2% |
| 942 |
\ifodd\@ssub \fullstop #3\fi |
| 943 |
\ifodd\@dash \endashchar\fi |
| 944 |
\ifodd\@pnum #4\fullstop\fi |
| 945 |
\ifodd\@elin #5\fi |
| 946 |
\ifodd\@esl \ifodd\@elin\fullstop\fi #6\fi |
| 947 |
\endgroup} |
| 948 |
\def\normalfootstart#1{% |
| 949 |
\vskip\skip\csname #1footins\endcsname |
| 950 |
\leftskip0pt \rightskip0pt |
| 951 |
\csname #1footnoterule\endcsname} |
| 952 |
\let\normalfootnoterule=\footnoterule |
| 953 |
\def\normalfootgroup#1{\unvbox\csname #1footins\endcsname} |
| 954 |
\newinsert\Afootins \newinsert\Bfootins |
| 955 |
\newinsert\Cfootins \newinsert\Dfootins |
| 956 |
\newinsert\Efootins |
| 957 |
\newcount\interAfootnotelinepenalty |
| 958 |
\newcount\interBfootnotelinepenalty |
| 959 |
\newcount\interCfootnotelinepenalty |
| 960 |
\newcount\interDfootnotelinepenalty |
| 961 |
\newcount\interEfootnotelinepenalty |
| 962 |
\def\footnormal#1{% |
| 963 |
\csname inter#1footnotelinepenalty\endcsname=100 |
| 964 |
\expandafter\let\csname #1footstart\endcsname=\normalfootstart |
| 965 |
\expandafter\let\csname v#1footnote\endcsname=\normalvfootnote |
| 966 |
\expandafter\let\csname #1footfmt\endcsname=\normalfootfmt |
| 967 |
\expandafter\let\csname #1footgroup\endcsname=\normalfootgroup |
| 968 |
\expandafter\let\csname #1footnoterule\endcsname=% |
| 969 |
\normalfootnoterule |
| 970 |
\count\csname #1footins\endcsname=1000 |
| 971 |
\dimen\csname #1footins\endcsname=0.8\vsize |
| 972 |
\skip\csname #1footins\endcsname=12pt plus6pt minus6pt} |
| 973 |
\footnormal{A} |
| 974 |
\footnormal{B} |
| 975 |
\footnormal{C} |
| 976 |
\footnormal{D} |
| 977 |
\footnormal{E} |
| 978 |
\def\footparagraph#1{% |
| 979 |
\expandafter\let\csname #1footstart\endcsname=\parafootstart |
| 980 |
\expandafter\let\csname v#1footnote\endcsname=\para@vfootnote |
| 981 |
\expandafter\let\csname #1footfmt\endcsname=\parafootfmt |
| 982 |
\expandafter\let\csname #1footgroup\endcsname=\para@footgroup |
| 983 |
\count\csname #1footins\endcsname=1000 |
| 984 |
\para@footsetup{#1}} |
| 985 |
\def\para@footsetup#1{{\notefontsetup |
| 986 |
\dimen0=\baselineskip |
| 987 |
\multiply\dimen0 by 1024 |
| 988 |
\divide \dimen0 by \hsize \multiply\dimen0 by 64 |
| 989 |
\expandafter |
| 990 |
\xdef\csname #1footfudgefactor\endcsname{% |
| 991 |
\expandafter\en@number\the\dimen0 }}} |
| 992 |
{\catcode`p=12 \catcode`t=12 \gdef\en@number#1pt{#1}} |
| 993 |
\def\parafootstart#1{% |
| 994 |
\rightskip=0pt \leftskip=0pt \parindent=0pt |
| 995 |
\vskip\skip\csname #1footins\endcsname |
| 996 |
\csname #1footnoterule\endcsname} |
| 997 |
\def\para@vfootnote#1#2{\insert\csname #1footins\endcsname |
| 998 |
\bgroup |
| 999 |
\notefontsetup |
| 1000 |
\interlinepenalty=\csname inter#1footnotelinepenalty\endcsname |
| 1001 |
\splittopskip=\ht\strutbox |
| 1002 |
\splitmaxdepth=\dp\strutbox \floatingpenalty=\@MM |
| 1003 |
\leftskip0pt \rightskip0pt |
| 1004 |
\setbox0=\vbox{\hsize=\maxdimen |
| 1005 |
\noindent\csname #1footfmt\endcsname#2}% |
| 1006 |
\setbox0=\hbox{\unvxh0}% |
| 1007 |
\dp0=0pt |
| 1008 |
\ht0=\csname #1footfudgefactor\endcsname\wd0 |
| 1009 |
\box0 |
| 1010 |
\penalty0 |
| 1011 |
\egroup} |
| 1012 |
\def\unvxh#1{% |
| 1013 |
\setbox0=\vbox{\unvbox#1% |
| 1014 |
\global\setbox1=\lastbox}% |
| 1015 |
\unhbox1 |
| 1016 |
\unskip % remove \rightskip, |
| 1017 |
\unskip % remove \parfillskip, |
| 1018 |
\unpenalty % remove \penalty of 10000, |
| 1019 |
\hskip\ipn@skip} % but add the glue to go between the notes |
| 1020 |
\newskip\ipn@skip |
| 1021 |
\def\interparanoteglue#1{% |
| 1022 |
{\notefontsetup\global\ipn@skip=#1 \relax}} |
| 1023 |
\interparanoteglue{1em plus.4em minus.4em} |
| 1024 |
\def\parafootfmt#1#2#3{% |
| 1025 |
\normal@pars |
| 1026 |
\parindent=0pt \parfillskip=0pt plus1fil |
| 1027 |
{\notenumfont\printlines#1|}\enspace |
| 1028 |
{\select@lemmafont#1|#2}\rbracket\enskip |
| 1029 |
#3\penalty-10 } |
| 1030 |
\def\para@footgroup#1{% |
| 1031 |
\unvbox\csname #1footins\endcsname \makehboxofhboxes |
| 1032 |
\setbox0=\hbox{\unhbox0 \removehboxes}% |
| 1033 |
\notefontsetup |
| 1034 |
\noindent\unhbox0\par} |
| 1035 |
\def\makehboxofhboxes{\setbox0=\hbox{}% |
| 1036 |
\loop |
| 1037 |
\unpenalty |
| 1038 |
\setbox2=\lastbox |
| 1039 |
\ifhbox2 |
| 1040 |
\setbox0=\hbox{\box2\unhbox0} |
| 1041 |
\repeat} |
| 1042 |
\def\removehboxes{\setbox0=\lastbox |
| 1043 |
\ifhbox0{\removehboxes}\unhbox0 \fi} |
| 1044 |
\newcount\@k \newdimen\@h |
| 1045 |
\def\rigidbalance#1#2#3{\setbox0=\box#1 \@k=#2 \@h=#3 |
| 1046 |
\line{\splittopskip=\@h \vbadness=\@M \hfilneg |
| 1047 |
\valign{##\vfil\cr\dosplits}}} |
| 1048 |
\def\dosplits{\ifnum\@k>0 \noalign{\hfil}\splitoff |
| 1049 |
\global\advance\@k-1\cr\dosplits\fi} |
| 1050 |
\def\splitoff{\dimen0=\ht0 |
| 1051 |
\divide\dimen0 by\@k \advance\dimen0 by\@h |
| 1052 |
\setbox2 \vsplit0 to \dimen0 |
| 1053 |
\unvbox2 } |
| 1054 |
\def\footthreecol#1{% |
| 1055 |
\expandafter\let\csname v#1footnote\endcsname=\threecolvfootnote |
| 1056 |
\expandafter\let\csname #1footfmt\endcsname=\threecolfootfmt |
| 1057 |
\expandafter\let\csname #1footgroup\endcsname=\threecolfootgroup |
| 1058 |
\threecolfootsetup{#1}} |
| 1059 |
\def\threecolfootsetup#1{% |
| 1060 |
\count\csname #1footins\endcsname 333 |
| 1061 |
\multiply\dimen\csname #1footins\endcsname by 3 } |
| 1062 |
\def\threecolvfootnote#1#2{% |
| 1063 |
\insert\csname #1footins\endcsname\bgroup |
| 1064 |
\notefontsetup |
| 1065 |
\interlinepenalty=\csname inter#1footnotelinepenalty\endcsname |
| 1066 |
\floatingpenalty=20000 |
| 1067 |
\splittopskip=\ht\strutbox \splitmaxdepth=\dp\strutbox |
| 1068 |
\rightskip=0pt \leftskip=0pt |
| 1069 |
\csname #1footfmt\endcsname #2\egroup} |
| 1070 |
\def\threecolfootfmt#1#2#3{% |
| 1071 |
\normal@pars |
| 1072 |
\hsize .3\hsize |
| 1073 |
\parindent=0pt |
| 1074 |
\tolerance=5000 |
| 1075 |
\raggedright |
| 1076 |
\leavevmode |
| 1077 |
\strut{\notenumfont\printlines#1|}\enspace |
| 1078 |
{\select@lemmafont#1|#2}\rbracket\enskip |
| 1079 |
#3\strut\par\allowbreak} |
| 1080 |
\def\threecolfootgroup#1{{\notefontsetup |
| 1081 |
\splittopskip=\ht\strutbox |
| 1082 |
\expandafter |
| 1083 |
\rigidbalance\csname #1footins\endcsname 3 \splittopskip }} |
| 1084 |
\def\foottwocol#1{% |
| 1085 |
\expandafter\let\csname v#1footnote\endcsname=\twocolvfootnote |
| 1086 |
\expandafter\let\csname #1footfmt\endcsname=\twocolfootfmt |
| 1087 |
\expandafter\let\csname #1footgroup\endcsname=\twocolfootgroup |
| 1088 |
\twocolfootsetup{#1}} |
| 1089 |
\def\twocolfootsetup#1{% |
| 1090 |
\count\csname #1footins\endcsname 500 |
| 1091 |
\multiply\dimen\csname #1footins\endcsname by 2 } |
| 1092 |
\def\twocolvfootnote#1#2{\insert\csname #1footins\endcsname\bgroup |
| 1093 |
\notefontsetup |
| 1094 |
\interlinepenalty=\csname inter#1footnotelinepenalty\endcsname |
| 1095 |
\floatingpenalty=20000 |
| 1096 |
\splittopskip=\ht\strutbox \splitmaxdepth=\dp\strutbox |
| 1097 |
\rightskip=0pt \leftskip=0pt |
| 1098 |
\csname #1footfmt\endcsname #2\egroup} |
| 1099 |
\def\twocolfootfmt#1#2#3{% |
| 1100 |
\normal@pars |
| 1101 |
\hsize .45\hsize |
| 1102 |
\parindent=0pt |
| 1103 |
\tolerance=5000 |
| 1104 |
\raggedright |
| 1105 |
\leavevmode |
| 1106 |
\strut{\notenumfont\printlines#1|}\enspace |
| 1107 |
{\select@lemmafont#1|#2}\rbracket\enskip |
| 1108 |
#3\strut\par\allowbreak} |
| 1109 |
\def\twocolfootgroup#1{{\notefontsetup |
| 1110 |
\splittopskip=\ht\strutbox |
| 1111 |
\expandafter |
| 1112 |
\rigidbalance\csname #1footins\endcsname 2 \splittopskip}} |
| 1113 |
\newdimen\crop@vsize \crop@vsize=0pt |
| 1114 |
\newdimen\crop@hsize \crop@hsize=0pt |
| 1115 |
\newdimen\head@margin \head@margin=0pt |
| 1116 |
\newdimen\back@margin \back@margin=0pt |
| 1117 |
\newdimen\odd@back \odd@back=0pt |
| 1118 |
\newdimen\even@back \even@back=0pt |
| 1119 |
\newtoks\@back |
| 1120 |
\@back={\ifodd\pageno \odd@back \else \even@back\fi} |
| 1121 |
\newbox\registration@marks |
| 1122 |
\def\vertical@rules{% |
| 1123 |
\hbox to\crop@hsize{% |
| 1124 |
\vrule height1pc width\cropwidth depth0pt |
| 1125 |
\hfil |
| 1126 |
\vrule width\cropwidth depth0pt}} |
| 1127 |
\def\horizontal@rules{% |
| 1128 |
\hbox to\crop@hsize{% |
| 1129 |
\llap{\vrule width1pc height\cropwidth \kern\cropgap}% |
| 1130 |
\hfil |
| 1131 |
\rlap{\kern\cropgap \vrule width1pc height\cropwidth}}} |
| 1132 |
\newdimen\cropwidth \cropwidth=.4pt |
| 1133 |
\newdimen\cropgap \cropgap=5pt |
| 1134 |
\newdimen\magicvskip \magicvskip=\topskip |
| 1135 |
\let\headlinefont=\rm |
| 1136 |
\newif\ifcropmarks@ |
| 1137 |
\def\cropsetup#1#2#3#4{\cropmarks@true |
| 1138 |
\global\crop@vsize=#1 |
| 1139 |
\global\crop@hsize=#2 |
| 1140 |
\global\head@margin=#3 |
| 1141 |
\global\back@margin=#4 |
| 1142 |
\global\odd@back=\back@margin |
| 1143 |
\global\even@back=\crop@hsize |
| 1144 |
\global\advance\even@back by -\hsize |
| 1145 |
\global\advance\even@back by -\back@margin |
| 1146 |
\setbox\registration@marks= |
| 1147 |
\vbox to \crop@vsize{% |
| 1148 |
\offinterlineskip |
| 1149 |
\vbox to0pt{\vss |
| 1150 |
\vertical@rules |
| 1151 |
\kern\cropgap |
| 1152 |
\horizontal@rules}% |
| 1153 |
\vfil |
| 1154 |
\vbox to0pt{% |
| 1155 |
\horizontal@rules |
| 1156 |
\kern\cropgap |
| 1157 |
\vertical@rules\vss}}% |
| 1158 |
\ht\registration@marks=0pt |
| 1159 |
\wd\registration@marks=0pt |
| 1160 |
\global\magicvskip=\topskip |
| 1161 |
{\headlinefont \global\advance\magicvskip by -\ht\strutbox}% |
| 1162 |
\global\advance\magicvskip by -2\baselineskip} |
| 1163 |
\output{\edmac@output} |
| 1164 |
\def\edmac@output{\shipout\vbox{\normal@pars |
| 1165 |
\ifcropmarks@ |
| 1166 |
\do@cropmarks |
| 1167 |
\else |
| 1168 |
\vbox{\makeheadline\pagebody\makefootline}% |
| 1169 |
\fi}% |
| 1170 |
\advancepageno |
| 1171 |
\ifnum\outputpenalty>-\@MM\else\dosupereject\fi} |
| 1172 |
\def\pagecontents{\page@start |
| 1173 |
\ifvoid\topins\else\unvbox\topins\fi |
| 1174 |
\dimen@=\dp\@cclv \unvbox\@cclv % open up \box255 |
| 1175 |
\do@feet |
| 1176 |
\ifr@ggedbottom \kern-\dimen@ \vfil \fi} |
| 1177 |
\def\do@cropmarks{% |
| 1178 |
\vbox{\offinterlineskip |
| 1179 |
\kern\magicvskip |
| 1180 |
\copy\registration@marks |
| 1181 |
\kern-\magicvskip}% |
| 1182 |
\nointerlineskip |
| 1183 |
\kern\head@margin |
| 1184 |
\moveright\the\@back\vbox{\makeheadline\pagebody\makefootline}} |
| 1185 |
\def\do@feet{% |
| 1186 |
\ifvoid\footins\else |
| 1187 |
\vskip\skip\footins |
| 1188 |
\footnoterule |
| 1189 |
\unvbox\footins |
| 1190 |
\fi |
| 1191 |
\ifvoid\Afootins\else |
| 1192 |
\Afootstart{A}\Afootgroup{A}% |
| 1193 |
\fi |
| 1194 |
\ifvoid\Bfootins\else |
| 1195 |
\Bfootstart{B}\Bfootgroup{B}% |
| 1196 |
\fi |
| 1197 |
\ifvoid\Cfootins\else |
| 1198 |
\Cfootstart{C}\Cfootgroup{C}% |
| 1199 |
\fi |
| 1200 |
\ifvoid\Dfootins\else |
| 1201 |
\Dfootstart{D}\Dfootgroup{D}% |
| 1202 |
\fi |
| 1203 |
\ifvoid\Efootins\else |
| 1204 |
\Efootstart{E}\Efootgroup{E}% |
| 1205 |
\fi} |
| 1206 |
\list@create{\labelref@list} |
| 1207 |
\newwrite\@aux |
| 1208 |
\def\do@labelsfile{% |
| 1209 |
\openin\@inputcheck=\jobname.aux |
| 1210 |
\ifeof\@inputcheck \else |
| 1211 |
\closein\@inputcheck |
| 1212 |
\begingroup |
| 1213 |
\makeatletter \catcode`\^^M=9 |
| 1214 |
\input\jobname.aux |
| 1215 |
\endgroup |
| 1216 |
\fi |
| 1217 |
\immediate\openout\@aux=\jobname.aux |
| 1218 |
\global\let\do@labelsfile=\relax} |
| 1219 |
\def\zz@@@{000|000|000} % set three counters to zero in one go |
| 1220 |
\def\label#1{\do@labelsfile |
| 1221 |
\write\linenum@out{\string\@lab}% |
| 1222 |
\ifx\labelref@list\empty |
| 1223 |
\xdef\label@refs{\zz@@@}% |
| 1224 |
\else |
| 1225 |
\gl@p\labelref@list\to\label@refs |
| 1226 |
\fi |
| 1227 |
\edef\next{\write\@aux{\string\make@labels\label@refs|{#1}}}% |
| 1228 |
\next} |
| 1229 |
\def\make@labels#1|#2|#3|#4{% |
| 1230 |
\expandafter\ifx\csname the@label#4\endcsname \relax\else |
| 1231 |
\edmac@warning{Duplicate definition of label `#4' |
| 1232 |
on page \number\pageno.}% |
| 1233 |
\fi |
| 1234 |
\expandafter\gdef\csname the@label#4\endcsname{#1|#2|#3}% |
| 1235 |
\ignorespaces} |
| 1236 |
\def\@lab{\xright@appenditem |
| 1237 |
{\the\page@num|\the\line@num|% |
| 1238 |
\ifsublines@ \the\subline@num \else 0\fi}\to\labelref@list} |
| 1239 |
\def\pageref#1{\ref@undefined{#1}\getref@num{1}{#1}} |
| 1240 |
\def\xpageref#1{\getref@num{1}{#1}} |
| 1241 |
\def\lineref#1{\ref@undefined{#1}\getref@num{2}{#1}} |
| 1242 |
\def\xlineref#1{\getref@num{2}{#1}} |
| 1243 |
\def\sublineref#1{\ref@undefined{#1}\getref@num{3}{#1}} |
| 1244 |
\def\xsublineref#1{\getref@num{3}{#1}} |
| 1245 |
\def\ref@undefined#1{\do@labelsfile |
| 1246 |
\expandafter\ifx\csname the@label#1\endcsname\relax |
| 1247 |
\edmac@warning{Reference `#1' |
| 1248 |
on page \the\pageno\space undefined. Using `000'.}% |
| 1249 |
\fi} |
| 1250 |
\def\getref@num#1#2{% |
| 1251 |
\expandafter |
| 1252 |
\ifx\csname the@label#2\endcsname \relax |
| 1253 |
000% |
| 1254 |
\else |
| 1255 |
\expandafter\expandafter\expandafter |
| 1256 |
\label@parse\csname the@label#2\endcsname|#1% |
| 1257 |
\fi} |
| 1258 |
\def\label@parse#1|#2|#3|#4{% |
| 1259 |
\ifcase #4\relax |
| 1260 |
\or #1% |
| 1261 |
\or #2% |
| 1262 |
\or #3% |
| 1263 |
\fi} |
| 1264 |
\def\xxref#1#2{% |
| 1265 |
{\expandafter\ifx\csname the@label#1\endcsname |
| 1266 |
\relax \expandafter\let\csname the@label#1\endcsname\zz@@@\fi |
| 1267 |
\expandafter\ifx\csname the@label#2\endcsname \relax |
| 1268 |
\expandafter\let\csname the@label#2\endcsname\zz@@@\fi |
| 1269 |
\linenum{\csname the@label#1\endcsname|% |
| 1270 |
\csname the@label#2\endcsname}}} |
| 1271 |
\def\makelabel#1#2{\expandafter\xdef\csname the@label#1\endcsname{#2}} |
| 1272 |
\newwrite\@end |
| 1273 |
\newif\ifend@ |
| 1274 |
\def\end@open#1{\end@true\immediate\openout\@end=#1\relax} |
| 1275 |
\def\end@close{\end@false\immediate\closeout\@end} |
| 1276 |
\def\end@stuff{% |
| 1277 |
\ifend@\relax\else |
| 1278 |
\end@open{\jobname.end}% |
| 1279 |
\fi |
| 1280 |
\immediate\write\@end{\string\@section{\the\section@num}}} |
| 1281 |
\def\Aendnote#1{{\newlinechar='40 |
| 1282 |
\immediate\write\@end{\string\Aend% |
| 1283 |
{\ifnumberedpar@\@nums\fi}% |
| 1284 |
{\ifnumberedpar@\@tag\fi}{#1}}}\ignorespaces} |
| 1285 |
\def\Bendnote#1{{\newlinechar='40 |
| 1286 |
\immediate\write\@end{\string\Bend% |
| 1287 |
{\ifnumberedpar@\@nums\fi}% |
| 1288 |
{\ifnumberedpar@\@tag\fi}{#1}}}\ignorespaces} |
| 1289 |
\def\Cendnote#1{{\newlinechar='40 |
| 1290 |
\immediate\write\@end{\string\Cend% |
| 1291 |
{\ifnumberedpar@\@nums\fi}% |
| 1292 |
{\ifnumberedpar@\@tag\fi}{#1}}}\ignorespaces} |
| 1293 |
\def\Dendnote#1{{\newlinechar='40 |
| 1294 |
\immediate\write\@end{\string\Dend% |
| 1295 |
{\ifnumberedpar@\@nums\fi}% |
| 1296 |
{\ifnumberedpar@\@tag\fi}{#1}}}\ignorespaces} |
| 1297 |
\def\Eendnote#1{{\newlinechar='40 |
| 1298 |
\immediate\write\@end{\string\Eend% |
| 1299 |
{\ifnumberedpar@\@nums\fi}% |
| 1300 |
{\ifnumberedpar@\@tag\fi}{#1}}}\ignorespaces} |
| 1301 |
\def\endprint#1#2#3{{\notefontsetup{\notenumfont\printlines#1|}% |
| 1302 |
\enspace{\select@lemmafont#1|#2}\enskip#3\par}} |
| 1303 |
\def\@gobblethree#1#2#3{} |
| 1304 |
\let\Aend=\@gobblethree |
| 1305 |
\let\Bend=\@gobblethree |
| 1306 |
\let\Cend=\@gobblethree |
| 1307 |
\let\Dend=\@gobblethree |
| 1308 |
\let\Eend=\@gobblethree |
| 1309 |
\let\@section=\@gobble |
| 1310 |
\def\doendnotes#1{\end@close |
| 1311 |
\begingroup |
| 1312 |
\makeatletter |
| 1313 |
\expandafter\let\csname #1end\endcsname=\endprint |
| 1314 |
\input\jobname.end |
| 1315 |
\endgroup} |
| 1316 |
\def\noendnotes{\global\let\end@stuff=\relax |
| 1317 |
\global\chardef\@end=16 } |
| 1318 |
\makeatother |
| 1319 |
\endinput |
| 1320 |
%% |
| 1321 |
%% End of file `edmac.tex'. |