| 1 |
%% |
| 2 |
%% This is file `mdwtab.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% mdwtab.dtx (with options: `mdwtab') |
| 8 |
%% footnote.dtx (with options: `macro') |
| 9 |
%% doafter.dtx (with options: `macro') |
| 10 |
%% |
| 11 |
%% IMPORTANT NOTICE |
| 12 |
%% |
| 13 |
%% mdwtab package -- another rewrite of the tabular environment, etc. |
| 14 |
%% Copyright (c) 1996 Mark Wooding |
| 15 |
%% |
| 16 |
%% This program is free software; you can redistribute it and/or modify |
| 17 |
%% it under the terms of the GNU General Public License as published by |
| 18 |
%% the Free Software Foundation; either version 2 of the License, or |
| 19 |
%% (at your option) any later version. |
| 20 |
%% |
| 21 |
%% This program is distributed in the hope that it will be useful, |
| 22 |
%% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 |
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 |
%% GNU General Public License for more details. |
| 25 |
%% |
| 26 |
%% You should have received a copy of the GNU General Public License |
| 27 |
%% along with this program; if not, write to the Free Software |
| 28 |
%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 29 |
%% |
| 30 |
\NeedsTeXFormat{LaTeX2e} |
| 31 |
\ProvidesPackage{mdwtab} |
| 32 |
[1998/04/28 1.9 Table typesetting with style] |
| 33 |
%% \CharacterTable |
| 34 |
%% {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 |
| 35 |
%% 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 |
| 36 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 37 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 38 |
%% Dollar \$ Percent \% Ampersand \& |
| 39 |
%% Acute accent \' Left paren \( Right paren \) |
| 40 |
%% Asterisk \* Plus \+ Comma \, |
| 41 |
%% Minus \- Point \. Solidus \/ |
| 42 |
%% Colon \: Semicolon \; Less than \< |
| 43 |
%% Equals \= Greater than \> Question mark \? |
| 44 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 45 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 46 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 47 |
%% Right brace \} Tilde \~} |
| 48 |
%% |
| 49 |
%% |
| 50 |
\newcount\tab@state |
| 51 |
\newcount\tab@columns |
| 52 |
\newtoks\tab@preamble |
| 53 |
\newtoks\tab@shortline |
| 54 |
\toksdef\tab@pretext 4 |
| 55 |
\toksdef\tab@posttext 6 |
| 56 |
\toksdef\tab@userpretext 8 |
| 57 |
\newdimen\extrarowheight |
| 58 |
\newdimen\tabextrasep |
| 59 |
\newdimen\arrayextrasep |
| 60 |
\newdimen\smarraycolsep |
| 61 |
\newdimen\smarrayextrasep |
| 62 |
\newdimen\tab@width |
| 63 |
\newdimen\col@sep |
| 64 |
\newdimen\tab@endheight |
| 65 |
\newskip\tab@leftskip |
| 66 |
\newskip\tab@rightskip |
| 67 |
\newif\iftab@firstcol |
| 68 |
\newif\iftab@initrule |
| 69 |
\newif\iftab@rule |
| 70 |
\newif\iftab@vgap |
| 71 |
\tabextrasep\z@ |
| 72 |
\arrayextrasep\jot |
| 73 |
\smarraycolsep\thr@@\p@ |
| 74 |
\smarrayextrasep\z@ |
| 75 |
\let\tab@extrasep\tabextrasep |
| 76 |
\let\tab@penalty\relax |
| 77 |
\def\@maybe@unskip{\ifhmode\hskip\m@ne\lastskip\relax\fi} |
| 78 |
\def\q@delim{\q@delim} |
| 79 |
\chardef\tab@startstate 0 |
| 80 |
\chardef\tab@loopstate 1 |
| 81 |
\chardef\tab@rulestate 1 |
| 82 |
\chardef\tab@prespcstate 2 |
| 83 |
\chardef\tab@prestate 3 |
| 84 |
\chardef\tab@colstate 4 |
| 85 |
\chardef\tab@poststate 5 |
| 86 |
\chardef\tab@postspcstate 6 |
| 87 |
\chardef\tab@limitstate 7 |
| 88 |
\def\tab@append#1#2{#1\expandafter{\the#1#2}} |
| 89 |
\def\tab@prepend#1#2{% |
| 90 |
\toks@{#2}#1\expandafter{\the\expandafter\toks@\the#1}% |
| 91 |
} |
| 92 |
\def\tab@commit{% |
| 93 |
\iftab@firstcol\else% |
| 94 |
\expandafter\tab@append\expandafter\tab@preamble% |
| 95 |
\expandafter{\tab@tabtext}% |
| 96 |
\fi% |
| 97 |
\toks@\expandafter{\tab@midtext}% |
| 98 |
\tab@preamble\expandafter{% |
| 99 |
\the\expandafter\tab@preamble% |
| 100 |
\the\expandafter\tab@pretext% |
| 101 |
\the\expandafter\tab@userpretext% |
| 102 |
\the\expandafter\toks@% |
| 103 |
\the\tab@posttext% |
| 104 |
}% |
| 105 |
\tab@firstcolfalse% |
| 106 |
\tab@pretext{}% |
| 107 |
\tab@userpretext{}% |
| 108 |
\tab@posttext{}% |
| 109 |
} |
| 110 |
\def\tab@setstate#1{% |
| 111 |
\ifnum#1=\tab@state\else% |
| 112 |
\def\@tempa{\tab@setstate@i{#1}}% |
| 113 |
\@tempa% |
| 114 |
\fi% |
| 115 |
} |
| 116 |
\def\tab@setstate@i#1{% |
| 117 |
\global\advance\tab@state\@ne% |
| 118 |
\ifnum\tab@state>\tab@limitstate% |
| 119 |
\global\tab@state\tab@loopstate% |
| 120 |
\fi% |
| 121 |
\ifnum\tab@state=\tab@prespcstate% |
| 122 |
\iftab@initrule% |
| 123 |
\tab@initrulefalse% |
| 124 |
\else% |
| 125 |
\tab@looped% |
| 126 |
\tab@commit% |
| 127 |
\tab@append\tab@shortline{&\omit}% |
| 128 |
\fi% |
| 129 |
\fi% |
| 130 |
\ifnum#1=\tab@state% |
| 131 |
\let\@tempa\relax% |
| 132 |
\else% |
| 133 |
\csname tab@default@\number\tab@state\endcsname% |
| 134 |
\fi% |
| 135 |
\@tempa% |
| 136 |
} |
| 137 |
\@namedef{tab@default@2}{% |
| 138 |
\iftab@rule% |
| 139 |
\tab@append\tab@pretext{\hskip\col@sep}% |
| 140 |
\fi% |
| 141 |
} |
| 142 |
\@namedef{tab@default@4}{% |
| 143 |
\tab@err@misscol% |
| 144 |
\tab@append\tab@pretext{\tab@bgroup\relax}% |
| 145 |
\tab@append\tab@posttext{\relax\tab@egroup\hfil}% |
| 146 |
\tab@append\tab@shortline{\hfil}% |
| 147 |
\advance\tab@columns\@ne% |
| 148 |
} |
| 149 |
\@namedef{tab@default@6}{% |
| 150 |
\tab@append\tab@posttext{\hskip\col@sep}% |
| 151 |
\tab@ruletrue% |
| 152 |
} |
| 153 |
\def\tab@extracol#1#2{\tab@extracol@i#1#2\extracolsep{}\extracolsep\end} |
| 154 |
\def\tab@extracol@i#1#2\extracolsep#3#4\extracolsep#5\end{% |
| 155 |
\ifx @#3@% |
| 156 |
\def\@tempa{#1{#2}}% |
| 157 |
\else% |
| 158 |
\def\@tempa{#1{#2\tabskip#3\relax#4}}% |
| 159 |
\fi% |
| 160 |
\@tempa% |
| 161 |
} |
| 162 |
\def\tabruletype#1{\tab@extracol\tabruletype@i{#1}}% |
| 163 |
\def\tabruletype@i#1{% |
| 164 |
\iftab@initrule% |
| 165 |
\let\tab@tok\tab@pretext% |
| 166 |
\else% |
| 167 |
\let\tab@tok\tab@posttext% |
| 168 |
\fi% |
| 169 |
\ifnum\tab@state=\tab@rulestate% |
| 170 |
\tab@append\tab@tok{\hskip\doublerulesep\begingroup#1\endgroup}% |
| 171 |
\expandafter\tab@append\expandafter\tab@shortline\expandafter{% |
| 172 |
\expandafter\hskip\expandafter\doublerulesep% |
| 173 |
\expandafter\tab@ckr\expandafter{\the\tab@columns}% |
| 174 |
{\begingroup#1\endgroup}% |
| 175 |
}% |
| 176 |
\else% |
| 177 |
\tab@setstate\tab@rulestate% |
| 178 |
\tab@append\tab@tok{\begingroup#1\endgroup}% |
| 179 |
\expandafter\tab@append\expandafter\tab@shortline\expandafter{% |
| 180 |
\expandafter\tab@ckr\expandafter{\the\tab@columns}% |
| 181 |
{\begingroup#1\endgroup}% |
| 182 |
}% |
| 183 |
\fi% |
| 184 |
\tab@ruletrue% |
| 185 |
} |
| 186 |
\def\tabspctype#1{\tab@extracol\tabspctype@i{#1}}% |
| 187 |
\def\tabspctype@i#1{% |
| 188 |
\tab@rulefalse% |
| 189 |
\ifnum\tab@state>\tab@prespcstate% |
| 190 |
\tab@setstate\tab@postspcstate% |
| 191 |
\let\tab@tok\tab@posttext% |
| 192 |
\else% |
| 193 |
\tab@setstate\tab@prespcstate% |
| 194 |
\let\tab@tok\tab@pretext% |
| 195 |
\fi% |
| 196 |
\tab@append\tab@tok{\begingroup#1\endgroup}% |
| 197 |
} |
| 198 |
\def\tabcoltype#1#2{% |
| 199 |
\ifnum\tab@state=\tab@colstate% |
| 200 |
\global\advance\tab@state\@ne% |
| 201 |
\fi% |
| 202 |
\advance\tab@columns\@ne% |
| 203 |
\tab@setstate\tab@colstate% |
| 204 |
\tab@append\tab@pretext{#1}% |
| 205 |
\tab@append\tab@posttext{#2}% |
| 206 |
\tab@append\tab@shortline{\hfil}% |
| 207 |
} |
| 208 |
\def\tabuserpretype#1{% |
| 209 |
\tab@setstate\tab@prestate% |
| 210 |
\tab@prepend\tab@userpretext{#1}% |
| 211 |
} |
| 212 |
\def\tabuserposttype#1{% |
| 213 |
\tab@setstate\tab@poststate% |
| 214 |
\tab@prepend\tab@posttext{#1}% |
| 215 |
} |
| 216 |
\def\tab@push#1#2{% |
| 217 |
\toks@{{#2}}% |
| 218 |
\expandafter\def\expandafter#1\expandafter{\the\expandafter\toks@#1}% |
| 219 |
} |
| 220 |
\def\tab@pop#1{\expandafter\def\expandafter#1\expandafter{\@gobble#1}} |
| 221 |
\def\tab@head#1{\expandafter\tab@head@i#1\relax} |
| 222 |
\def\tab@head@i#1#2\relax{#1} |
| 223 |
\def\tab@colstack{{tabular}} |
| 224 |
\def\colset{\colpop\colpush} |
| 225 |
\def\colpush{\tab@push\tab@colstack} |
| 226 |
\def\colpop{\tab@pop\tab@colstack} |
| 227 |
\def\tab@colset{\tab@head\tab@colstack} |
| 228 |
\def\tab@initread{% |
| 229 |
\global\tab@state\tab@startstate% |
| 230 |
\tab@preamble{}% |
| 231 |
\tab@shortline{}% |
| 232 |
\def\tab@tabtext{&}% |
| 233 |
\def\tab@midtext{\ignorespaces####\@maybe@unskip}% |
| 234 |
\tab@pretext{}% |
| 235 |
\tab@userpretext{}% |
| 236 |
\tab@posttext{}% |
| 237 |
\let\tab@multicol\@empty% |
| 238 |
\def\tab@startpause{\penalty\postdisplaypenalty\medskip}% |
| 239 |
\def\tab@endpause{\penalty\predisplaypenalty\medskip}% |
| 240 |
\tab@columns\z@% |
| 241 |
\let\tab@looped\relax% |
| 242 |
\tab@ruletrue% |
| 243 |
\tab@initruletrue% |
| 244 |
\tab@firstcoltrue% |
| 245 |
} |
| 246 |
\def\tab@readpreamble#1{% |
| 247 |
\tab@doreadpream{#1}% |
| 248 |
\iftab@initrule\global\tab@state\tab@prespcstate\fi% |
| 249 |
\tab@setstate\tab@rulestate% |
| 250 |
\tab@commit% |
| 251 |
} |
| 252 |
\def\tab@doreadpream#1{\tab@mkpreamble#1\q@delim} |
| 253 |
\def\tab@mkpreamble{\futurelet\@let@token\tab@mkpreamble@i} |
| 254 |
\def\tab@mkpreamble@i{% |
| 255 |
\ifx\@let@token\@sptoken% |
| 256 |
\expandafter\tab@mkpreamble@spc% |
| 257 |
\else% |
| 258 |
\expandafter\tab@mkpreamble@ii% |
| 259 |
\fi% |
| 260 |
} |
| 261 |
\def\tab@mkpreamble@ii{% |
| 262 |
\ifx\@let@token\q@delim% |
| 263 |
\def\@tempa{\let\@let@token}% |
| 264 |
\else% |
| 265 |
\ifcat\bgroup\noexpand\@let@token% |
| 266 |
\tab@err@oddgroup% |
| 267 |
\def\@tempa##1{\tab@mkpreamble}% |
| 268 |
\else% |
| 269 |
\let\@tempa\tab@mkpreamble@iii% |
| 270 |
\fi% |
| 271 |
\fi% |
| 272 |
\@tempa% |
| 273 |
} |
| 274 |
\def\tab@mkpreamble@iii#1{% |
| 275 |
\@ifundefined{\tab@colset!col.\string#1}{% |
| 276 |
\tab@err@undef{#1}\tab@mkpreamble% |
| 277 |
}{% |
| 278 |
\@nameuse{\tab@colset!col.\string#1}% |
| 279 |
}% |
| 280 |
} |
| 281 |
\@namedef{tab@mkpreamble@spc} {% |
| 282 |
\@ifundefined{\tab@colset!col. }{% |
| 283 |
\tab@mkpreamble% |
| 284 |
}{% |
| 285 |
\@nameuse{\tab@colset!col. }% |
| 286 |
}% |
| 287 |
} |
| 288 |
\def\coldef{\@ifnextchar[\coldef@i{\coldef@i[\tab@colset]}} |
| 289 |
\def\coldef@i[#1]#2#3#{\coldef@ii[#1]{#2}{#3}} |
| 290 |
\def\coldef@ii[#1]#2#3#4{% |
| 291 |
\expandafter\def\csname#1!col.\string#2\endcsname#3{% |
| 292 |
#4\tab@mkpreamble% |
| 293 |
}% |
| 294 |
} |
| 295 |
\def\collet{\@ifnextchar[\collet@i{\collet@i[\tab@colset]}} |
| 296 |
\def\collet@i[#1]#2{% |
| 297 |
\@ifnextchar=% |
| 298 |
{\collet@ii[#1]{#2}}% |
| 299 |
{\collet@ii[#1]{#2}=}% |
| 300 |
} |
| 301 |
\def\collet@ii[#1]#2={% |
| 302 |
\@ifnextchar[% |
| 303 |
{\collet@iii[#1]{#2}}% |
| 304 |
{\collet@iii[#1]{#2}[\tab@colset]}% |
| 305 |
} |
| 306 |
\def\collet@iii[#1]#2[#3]#4{% |
| 307 |
\expandafter\let\csname#1!col.\string#2\expandafter\endcsname% |
| 308 |
\csname#3!col.\string#4\endcsname% |
| 309 |
} |
| 310 |
\def\newcolumntype#1{\@ifnextchar[{\nct@i{#1}}{\nct@i#1[0]}} |
| 311 |
\def\nct@i#1[#2]{\@ifnextchar[{\nct@ii{#1}[#2]}{\nct@iii{#1}{[#2]}}} |
| 312 |
\def\nct@ii#1[#2][#3]{\nct@iii{#1}{[#2][#3]}} |
| 313 |
\def\nct@iii#1#2#3{% |
| 314 |
\expandafter\let\csname\tab@colset!col.\string#1\endcsname\relax% |
| 315 |
\expandafter\newcommand\csname\tab@colset!col.\string#1\endcsname#2{% |
| 316 |
\tab@deepmagic{#1}% |
| 317 |
\tab@mkpreamble% |
| 318 |
#3% |
| 319 |
}% |
| 320 |
} |
| 321 |
\def\newcol@#1[#2]{\nct@iii{#1}{[#2]}} |
| 322 |
\def\tab@deepmagic#1{% |
| 323 |
\csname NC@rewrite@\string#1\endcsname\NC@find\tab@@magic@@% |
| 324 |
} |
| 325 |
\def\NC@find#1\tab@@magic@@{} |
| 326 |
\colset{tabular} |
| 327 |
\coldef l{\tabcoltype{\kern\z@\tab@bgroup}{\tab@egroup\hfil}} |
| 328 |
\coldef c{\tabcoltype{\hfil\tab@bgroup}{\tab@egroup\hfil}} |
| 329 |
\coldef r{\tabcoltype{\hfil\tab@bgroup}{\tab@egroup}} |
| 330 |
\coldef T#1{\tab@aligncol{#1}{\tab@btext}{\tab@etext}} |
| 331 |
\coldef M#1{\tab@aligncol{#1}{\tab@bmaths}{\tab@emaths}} |
| 332 |
\def\tab@aligncol#1#2#3{% |
| 333 |
\if#1l\tabcoltype{\kern\z@#2}{#3\hfil}\fi% |
| 334 |
\if#1c\tabcoltype{\hfil#2}{#3\hfil}\fi% |
| 335 |
\if#1r\tabcoltype{\hfil#2}{#3}\fi% |
| 336 |
} |
| 337 |
\coldef |{\tabruletype{\vrule\@width\arrayrulewidth}} |
| 338 |
\coldef !#1{\tabruletype{#1}} |
| 339 |
\coldef @#1{\tabspctype{#1}} |
| 340 |
\coldef p#1{\tabcoltype% |
| 341 |
{\savenotes\vtop\tab@bpar{#1}}% |
| 342 |
{\tab@epar\spewnotes\hfil}} |
| 343 |
\coldef m#1{\tabcoltype% |
| 344 |
{\savenotes$\vcenter\tab@bpar{#1}}% |
| 345 |
{\tab@epar$\spewnotes\hfil}} |
| 346 |
\coldef b#1{\tabcoltype% |
| 347 |
{\savenotes\vbox\tab@bpar{#1}}% |
| 348 |
{\tab@epar\spewnotes\hfil}} |
| 349 |
\coldef >#1{\tabuserpretype{#1}} |
| 350 |
\coldef <#1{\tabuserposttype{#1}} |
| 351 |
\coldef ##1#2{\tabcoltype{#1}{#2}} |
| 352 |
\coldef *#1#2{% |
| 353 |
\count@#1% |
| 354 |
\loop\ifnum\count@>0\relax% |
| 355 |
\tab@doreadpream{#2}% |
| 356 |
\advance\count@\m@ne% |
| 357 |
\repeat% |
| 358 |
} |
| 359 |
\def\tab@bpar#1{% |
| 360 |
\bgroup% |
| 361 |
\hsize#1\relax% |
| 362 |
\@arrayparboxrestore% |
| 363 |
\setbox\z@\vtop\bgroup |
| 364 |
\global\@minipagetrue% |
| 365 |
\everypar{% |
| 366 |
\global\@minipagefalse% |
| 367 |
\everypar{}% |
| 368 |
}% |
| 369 |
} |
| 370 |
\def\tab@epar{% |
| 371 |
\ifhmode\@maybe@unskip\par\fi% |
| 372 |
\unskip% |
| 373 |
\ifdim\prevdepth>-\@m\p@\ifdim\prevdepth<\dp\@arstrutbox% |
| 374 |
\kern-\prevdepth% |
| 375 |
\nointerlineskip% |
| 376 |
\vtop to\dp\@arstrutbox{}% |
| 377 |
\fi\fi% |
| 378 |
\egroup% |
| 379 |
\ifdim\ht\z@<\ht\@arstrutbox% |
| 380 |
\vbox to\ht\@arstrutbox{}% |
| 381 |
\kern-\ht\z@% |
| 382 |
\fi% |
| 383 |
\unvbox\z@% |
| 384 |
\egroup% |
| 385 |
} |
| 386 |
\def\@mkpream#1{% |
| 387 |
\endgroup% |
| 388 |
\colset{tabular}% |
| 389 |
\tab@initread% |
| 390 |
\def\tab@multicol{\@arstrut}% |
| 391 |
\tab@preamble{\tab@multicol}% |
| 392 |
\def\tab@midtext{\ignorespaces\@sharp\@sharp\@maybe@unskip}% |
| 393 |
\tab@readpreamble{#1}% |
| 394 |
\gdef\@preamble{\the\tab@preamble}% |
| 395 |
\let\tab@bgroup\begingroup% |
| 396 |
\let\tab@egroup\endgroup% |
| 397 |
\begingroup% |
| 398 |
} |
| 399 |
\def\showpream#1{% |
| 400 |
\tab@initread% |
| 401 |
\tab@readpreamble{#1}% |
| 402 |
\showthe\tab@preamble% |
| 403 |
\showthe\tab@shortline% |
| 404 |
} |
| 405 |
\def\showcol#1{% |
| 406 |
\expandafter\show\csname\tab@colset!col.\string#1\endcsname% |
| 407 |
} |
| 408 |
\def\tab@array{% |
| 409 |
\tab@width\z@% |
| 410 |
\let\tab@bgroup\tab@bmaths% |
| 411 |
\let\tab@egroup\tab@emaths% |
| 412 |
\@tabarray% |
| 413 |
} |
| 414 |
\def\tab@btext{\begingroup} |
| 415 |
\def\tab@bmaths{$} |
| 416 |
\def\tab@etext{\endgroup} |
| 417 |
\def\tab@emaths{\m@th$} |
| 418 |
\def\array{% |
| 419 |
\col@sep\arraycolsep% |
| 420 |
\let\tab@extrasep\arrayextrasep% |
| 421 |
\tab@normalstrut% |
| 422 |
\tab@array% |
| 423 |
} |
| 424 |
\def\endarray{% |
| 425 |
\crcr% |
| 426 |
\egroup% |
| 427 |
\tab@right% |
| 428 |
\tab@restorehlstate% |
| 429 |
} |
| 430 |
\def\smarray{% |
| 431 |
\extrarowheight\z@% |
| 432 |
\col@sep\smarraycolsep% |
| 433 |
\let\tab@extrasep\smarrayextrasep% |
| 434 |
\def\tab@bmaths{$\scriptstyle}% |
| 435 |
\def\tab@btext{\begingroup\scriptsize}% |
| 436 |
\setbox\z@\hbox{\scriptsize\strut}% |
| 437 |
\dimen@\ht\z@\dimen\tw@\dp\z@\tab@setstrut% |
| 438 |
\tab@array% |
| 439 |
} |
| 440 |
\let\endsmarray\endarray |
| 441 |
\providecommand\tabstyle{} |
| 442 |
\def\@tabular#1{% |
| 443 |
\tabstyle% |
| 444 |
\tab@width#1% |
| 445 |
\let\tab@bgroup\tab@btext% |
| 446 |
\let\tab@egroup\tab@etext% |
| 447 |
\col@sep\tabcolsep% |
| 448 |
\let\tab@extrasep\tabextrasep% |
| 449 |
\tab@normalstrut% |
| 450 |
\@tabarray% |
| 451 |
} |
| 452 |
\def\tabular{\@tabular\z@} |
| 453 |
\expandafter\let\csname tabular*\endcsname\@tabular |
| 454 |
\let\endtabular\endarray |
| 455 |
\expandafter\let\csname endtabular*\endcsname\endarray |
| 456 |
\def\tab@setstrut{% |
| 457 |
\setbox\@arstrutbox\hbox{% |
| 458 |
\vrule% |
| 459 |
\@height\arraystretch\dimen@% |
| 460 |
\@depth\arraystretch\dimen\tw@% |
| 461 |
\@width\z@% |
| 462 |
}% |
| 463 |
} |
| 464 |
\def\tab@normalstrut{% |
| 465 |
\dimen@\ht\strutbox\advance\dimen@\extrarowheight% |
| 466 |
\dimen\tw@\dp\strutbox% |
| 467 |
\tab@setstrut% |
| 468 |
} |
| 469 |
\let\@arrayleft\relax% |
| 470 |
\let\@arrayright\relax% |
| 471 |
\def\@tabarray{% |
| 472 |
\let\@arrayleft\relax% |
| 473 |
\let\@arrayright\relax% |
| 474 |
\@ifnextchar[\@array{\@array[c]}% |
| 475 |
} |
| 476 |
\def\@array[#1]#2{% |
| 477 |
\edef\tab@restorehlstate{% |
| 478 |
\global\tab@endheight\the\tab@endheight% |
| 479 |
\gdef\noexpand\tab@hlstate{\tab@hlstate}% |
| 480 |
}% |
| 481 |
\def\tab@hlstate{n}% |
| 482 |
\colset{tabular}% |
| 483 |
\tab@initread% |
| 484 |
\def\tab@midtext{\tab@setcr\ignorespaces####\@maybe@unskip}% |
| 485 |
\def\tab@multicol{\@arstrut\tab@startrow}% |
| 486 |
\tab@preamble{\tab@multicol\tabskip\z@skip}% |
| 487 |
\tab@readpreamble{#2}% |
| 488 |
\tab@leftskip\z@skip% |
| 489 |
\tab@rightskip\z@skip% |
| 490 |
\tab@setposn{#1}% |
| 491 |
\ifdim\tab@width=\z@% |
| 492 |
\def\tab@halign{}% |
| 493 |
\else% |
| 494 |
\def\tab@halign{to\tab@width}% |
| 495 |
\fi% |
| 496 |
\lineskip\z@\baselineskip\z@% |
| 497 |
\m@th% |
| 498 |
\def\tabularnewline{\tab@arraycr\tab@penalty}% |
| 499 |
\tab@setcr% |
| 500 |
\let\par\@empty% |
| 501 |
\everycr{}\tabskip\tab@leftskip% |
| 502 |
\tab@left\halign\tab@halign\expandafter\bgroup% |
| 503 |
\the\tab@preamble\tabskip\tab@rightskip\cr% |
| 504 |
} |
| 505 |
\def\tab@setposn#1{% |
| 506 |
\def\tab@left{% |
| 507 |
\savenotes% |
| 508 |
\leavevmode\hbox\bgroup$\@arrayleft\vcenter\bgroup% |
| 509 |
}% |
| 510 |
\def\tab@right{% |
| 511 |
\egroup% |
| 512 |
\m@th\@arrayright$\egroup% |
| 513 |
\spewnotes% |
| 514 |
}% |
| 515 |
\global\tab@endheight\z@% |
| 516 |
\@tempswafalse% |
| 517 |
\let\tab@penalty\relax% |
| 518 |
\if#1t% |
| 519 |
\def\tab@left{% |
| 520 |
\savenotes% |
| 521 |
\leavevmode\setbox\z@\hbox\bgroup$\@arrayleft\vtop\bgroup% |
| 522 |
}% |
| 523 |
\def\tab@right{% |
| 524 |
\egroup% |
| 525 |
\m@th\@arrayright$\egroup% |
| 526 |
\tab@raisebase% |
| 527 |
\spewnotes% |
| 528 |
}% |
| 529 |
\gdef\tab@hlstate{t}% |
| 530 |
\global\tab@endheight\ht\@arstrutbox% |
| 531 |
\else\if#1b% |
| 532 |
\def\tab@left{% |
| 533 |
\savenotes% |
| 534 |
\leavevmode\setbox\z@\hbox\bgroup$\@arrayleft\vbox\bgroup% |
| 535 |
}% |
| 536 |
\def\tab@right{% |
| 537 |
\egroup% |
| 538 |
\m@th\@arrayright$\egroup% |
| 539 |
\tab@lowerbase% |
| 540 |
\spewnotes% |
| 541 |
}% |
| 542 |
\gdef\tab@hlstate{b}% |
| 543 |
\else% |
| 544 |
\if#1L\@tempswatrue\fi% |
| 545 |
\if#1C\@tempswatrue\fi% |
| 546 |
\if#1R\@tempswatrue\fi% |
| 547 |
\fi\fi% |
| 548 |
\if@tempswa\ifhmode% |
| 549 |
\ifinner\tab@err@unbrh\@tempswafalse\else\par\fi% |
| 550 |
\fi\fi% |
| 551 |
\if@tempswa\ifmmode\tab@err@unbmm\@tempswafalse\fi\fi% |
| 552 |
\if@tempswa\ifx\@arrayleft\relax\else% |
| 553 |
\tab@err@unbext\@tempswafalse% |
| 554 |
\fi\fi% |
| 555 |
\if@tempswa% |
| 556 |
\def\tab@left{\vskip\parskip\medskip}% |
| 557 |
\def\tab@right{\par\@endpetrue\global\@ignoretrue}% |
| 558 |
\tab@leftskip\@totalleftmargin% |
| 559 |
\tab@rightskip\hsize% |
| 560 |
\advance\tab@rightskip-\linewidth% |
| 561 |
\advance\tab@rightskip-\@totalleftmargin% |
| 562 |
\ifdim\tab@width=\z@% |
| 563 |
\if#1L\else\advance\tab@leftskip\z@\@plus10000fill\fi% |
| 564 |
\if#1R\else\advance\tab@rightskip\z@\@plus10000fill\fi% |
| 565 |
\else% |
| 566 |
\dimen@\linewidth% |
| 567 |
\advance\dimen@-\tab@width% |
| 568 |
\if#1L\advance\tab@rightskip\dimen@\fi% |
| 569 |
\if#1R\advance\tab@leftskip\dimen@\fi% |
| 570 |
\if#1C% |
| 571 |
\advance\[email protected]\dimen@% |
| 572 |
\advance\[email protected]\dimen@% |
| 573 |
\fi% |
| 574 |
\fi% |
| 575 |
\def\tab@penalty{\penalty\@M}% |
| 576 |
\tab@width\hsize% |
| 577 |
\fi% |
| 578 |
} |
| 579 |
\def\tab@hlstate{n} |
| 580 |
\def\tab@addruleheight#1{% |
| 581 |
\if\tab@hlstate n\else% |
| 582 |
\global\advance\tab@endheight#1\relax% |
| 583 |
\fi% |
| 584 |
} |
| 585 |
\def\tab@startrow{% |
| 586 |
\if\tab@hlstate t% |
| 587 |
\gdef\tab@hlstate{n}% |
| 588 |
\else\if\tab@hlstate b% |
| 589 |
\global\tab@endheight\dp\@arstrutbox% |
| 590 |
\fi\fi% |
| 591 |
} |
| 592 |
\def\tab@raisebase{% |
| 593 |
\global\advance\tab@endheight-\ht\z@% |
| 594 |
\raise\tab@endheight\box\z@% |
| 595 |
} |
| 596 |
\def\tab@lowerbase{% |
| 597 |
\global\advance\tab@endheight-\dp\z@% |
| 598 |
\lower\tab@endheight\box\z@% |
| 599 |
} |
| 600 |
\def\tabpause#{% |
| 601 |
\noalign{\ifnum0=`}\fi% |
| 602 |
\@parboxrestore% |
| 603 |
\tab@startpause% |
| 604 |
\vskip-\parskip% |
| 605 |
\parshape\@ne\@totalleftmargin\linewidth% |
| 606 |
\noindent% |
| 607 |
\doafter\tabpause@i% |
| 608 |
} |
| 609 |
\def\tabpause@i{% |
| 610 |
\nobreak% |
| 611 |
\tab@endpause% |
| 612 |
\ifnum0=`{\fi}% |
| 613 |
} |
| 614 |
\long\def\multicolumn#1#2#3{% |
| 615 |
\multispan{#1}% |
| 616 |
\begingroup% |
| 617 |
\tab@multicol% |
| 618 |
\tab@initread% |
| 619 |
\tab@preamble{}% |
| 620 |
\long\def\tab@midtext{#3}% |
| 621 |
\let\tab@looped\tab@err@multi% |
| 622 |
\tab@readpreamble{#2}% |
| 623 |
\the\tab@preamble% |
| 624 |
\endgroup% |
| 625 |
\ignorespaces% |
| 626 |
} |
| 627 |
\def\ranges#1#2{% |
| 628 |
\gdef\ranges@temp{#1}% |
| 629 |
\begingroup% |
| 630 |
\ranges@i#2 \q@delim% |
| 631 |
} |
| 632 |
\def\ranges@i{% |
| 633 |
\@ifnextchar\q@delim\ranges@done{\afterassignment\ranges@ii\count@}% |
| 634 |
} |
| 635 |
\def\ranges@ii{% |
| 636 |
\@ifnextchar-\ranges@iii{\ranges@do\count@\count@\ranges@v}% |
| 637 |
} |
| 638 |
\def\ranges@iii-{\afterassignment\ranges@iv\@tempcnta} |
| 639 |
\def\ranges@iv{\ranges@do\count@\@tempcnta\ranges@v} |
| 640 |
\def\ranges@v{% |
| 641 |
\@ifnextchar,% |
| 642 |
\ranges@vi% |
| 643 |
{% |
| 644 |
\@ifnextchar\q@delim% |
| 645 |
\ranges@done% |
| 646 |
{\tab@err@range\ranges@vi,}% |
| 647 |
}% |
| 648 |
} |
| 649 |
\def\ranges@vi,{\afterassignment\ranges@ii\count@} |
| 650 |
\def\ranges@do#1#2{% |
| 651 |
\ifnum#1>#2\else% |
| 652 |
\expandafter\endgroup% |
| 653 |
\expandafter\ranges@temp% |
| 654 |
\expandafter{% |
| 655 |
\the\expandafter#1% |
| 656 |
\expandafter}% |
| 657 |
\expandafter{% |
| 658 |
\the#2% |
| 659 |
}% |
| 660 |
\begingroup% |
| 661 |
\fi% |
| 662 |
} |
| 663 |
\def\ranges@done\q@delim{\endgroup} |
| 664 |
\def\ifinrange#1#2{% |
| 665 |
\@tempswafalse% |
| 666 |
\count@#1% |
| 667 |
\ranges\ifinrange@i{#2}% |
| 668 |
\if@tempswa% |
| 669 |
\expandafter\@firstoftwo% |
| 670 |
\else% |
| 671 |
\expandafter\@secondoftwo% |
| 672 |
\fi% |
| 673 |
} |
| 674 |
\def\ifinrange@i#1#2{% |
| 675 |
\ifnum\count@<#1 \else\ifnum\count@>#2 \else\@tempswatrue\fi\fi% |
| 676 |
} |
| 677 |
\def\hline{% |
| 678 |
\tab@dohline% |
| 679 |
\noalign{\ifnum0=`}\fi% |
| 680 |
\tab@penalty% |
| 681 |
\futurelet\@let@token\hline@i% |
| 682 |
} |
| 683 |
\def\hline@i{% |
| 684 |
\ifx\@let@token\hline% |
| 685 |
\vskip\doublerulesep% |
| 686 |
\tab@addruleheight\doublerulesep% |
| 687 |
\fi% |
| 688 |
\ifnum0=`{\fi}% |
| 689 |
} |
| 690 |
\def\tab@dohline{% |
| 691 |
\multispan{\tab@columns}% |
| 692 |
\leaders\hrule\@height\arrayrulewidth\hfil% |
| 693 |
\tab@addruleheight\arrayrulewidth% |
| 694 |
\cr% |
| 695 |
} |
| 696 |
\renewcommand\vline[1][\arrayrulewidth]{\vrule\@width#1\relax} |
| 697 |
\def\cline#1{% |
| 698 |
\noalign{\kern-.5\arrayrulewidth\tab@penalty}% |
| 699 |
\omit% |
| 700 |
\global\tab@state\@ne% |
| 701 |
\ranges\cline@i{#1}% |
| 702 |
\cr% |
| 703 |
\noalign{\kern-.5\arrayrulewidth\tab@penalty}% |
| 704 |
} |
| 705 |
\def\cline@i#1#2{% |
| 706 |
\ifnum#1<\tab@state\relax% |
| 707 |
\tab@@cr% |
| 708 |
\noalign{\kern-\arrayrulewidth\tab@penalty}% |
| 709 |
\omit% |
| 710 |
\global\tab@state\@ne% |
| 711 |
\fi% |
| 712 |
\@whilenum\tab@state<#1\do{% |
| 713 |
\hfil\tab@@tab@omit% |
| 714 |
\global\advance\tab@state\@ne% |
| 715 |
}% |
| 716 |
\ifnum\tab@state>\@ne% |
| 717 |
\kern-\arrayrulewidth% |
| 718 |
\fi% |
| 719 |
\@whilenum\tab@state<#2\do{% |
| 720 |
\tab@@span@omit% |
| 721 |
\global\advance\tab@state\@ne% |
| 722 |
}% |
| 723 |
\leaders\hrule\@height\arrayrulewidth\hfill% |
| 724 |
} |
| 725 |
\def\tab@@cr{\cr} |
| 726 |
\def\tab@@tab@omit{&\omit} |
| 727 |
\def\tab@@span@omit{\span\omit} |
| 728 |
\def\tab@checkrule#1{% |
| 729 |
\count@#1\relax% |
| 730 |
\expandafter\ifinrange% |
| 731 |
\expandafter\count@% |
| 732 |
\expandafter{\tab@xcols}% |
| 733 |
{\tab@checkrule@i}% |
| 734 |
{}% |
| 735 |
} |
| 736 |
\def\tab@checkrule@i#1{\setbox\z@\hbox{#1}\hb@xt@\wd\z@{}} |
| 737 |
\def\vgap{% |
| 738 |
\noalign{\nobreak}% |
| 739 |
\omit% |
| 740 |
\global\let\vgap@after\@empty% |
| 741 |
\iffalse{\fi\ifnum0=`}\fi% |
| 742 |
\@ifnextchar[\vgap@i\vgap@simple% |
| 743 |
} |
| 744 |
\def\vgap@i[#1]{\vgap@spec{#1}} |
| 745 |
\def\vgap@spec#1#2{% |
| 746 |
\gdef\tab@xcols{#1}% |
| 747 |
\global\let\tab@ckr\tab@checkrule% |
| 748 |
\vgap@do{#2}% |
| 749 |
} |
| 750 |
\def\vgap@simple#1{% |
| 751 |
\global\let\tab@ckr\@gobble% |
| 752 |
\vgap@do{#1}% |
| 753 |
} |
| 754 |
\def\vgap@do#1{% |
| 755 |
\ifnum0=`{}\fi% |
| 756 |
\global\tab@vgaptrue% |
| 757 |
\the\tab@shortline% |
| 758 |
\vrule\@height#1\@width\z@% |
| 759 |
\global\tab@vgapfalse |
| 760 |
\tab@addruleheight{#1}% |
| 761 |
\cr% |
| 762 |
\noalign{\nobreak}% |
| 763 |
\vgap@after% |
| 764 |
} |
| 765 |
\def\hlx#1{\hlx@loop#1\q@delim} |
| 766 |
\def\hlx@loop#1{% |
| 767 |
\ifx#1\q@delim\else% |
| 768 |
\@ifundefined{hlx@cmd@\string#1}{% |
| 769 |
\expandafter\hlx@loop% |
| 770 |
}{% |
| 771 |
\csname hlx@cmd@\string#1\expandafter\endcsname% |
| 772 |
}% |
| 773 |
\fi% |
| 774 |
} |
| 775 |
\def\hlxdef#1{\@namedef{hlx@cmd@#1}} |
| 776 |
\hlxdef h#1{% |
| 777 |
\noalign{% |
| 778 |
\ifx#1h% |
| 779 |
\def\@tempa{\hline\hline\hlx@loop}% |
| 780 |
\else% |
| 781 |
\def\@tempa{\hline\hlx@loop#1}% |
| 782 |
\fi% |
| 783 |
\expandafter |
| 784 |
}% |
| 785 |
\@tempa% |
| 786 |
} |
| 787 |
\hlxdef b{\noalign{\kern-\arrayrulewidth}\hlx@loop} |
| 788 |
\hlxdef /{% |
| 789 |
\noalign{\ifnum0=`}\fi% |
| 790 |
\@ifnextchar[\hlx@cmd@break@i{\hlx@cmd@break@i[0]}% |
| 791 |
} |
| 792 |
\def\hlx@cmd@break@i[#1]{\ifnum0=`{\fi}\pagebreak[0]\hlx@loop} |
| 793 |
\hlxdef v{% |
| 794 |
\noalign{\nobreak}% |
| 795 |
\omit% |
| 796 |
\iffalse{\fi\ifnum0=`}\fi% |
| 797 |
\global\let\vgap@after\hlx@loop% |
| 798 |
\@ifnextchar[\hlx@vgap@i{\hlx@vgap@ii\vgap@simple}% |
| 799 |
} |
| 800 |
\def\hlx@vgap@i[#1]{% |
| 801 |
\ifx!#1!% |
| 802 |
\def\@tempa{\hlx@vgap@ii\vgap@simple}% |
| 803 |
\else% |
| 804 |
\def\@tempa{\hlx@vgap@ii{\vgap@spec{#1}}}% |
| 805 |
\fi% |
| 806 |
\@tempa% |
| 807 |
} |
| 808 |
\def\hlx@vgap@ii#1{% |
| 809 |
\@ifnextchar[{\hlx@vgap@iii{#1}}{\hlx@vgap@iii{#1}[\doublerulesep]}% |
| 810 |
} |
| 811 |
\def\hlx@vgap@iii#1[#2]{#1{#2}} |
| 812 |
\hlxdef s{% |
| 813 |
\noalign{\ifnum0=`}\fi% |
| 814 |
\nobreak% |
| 815 |
\@ifnextchar[\hlx@space@i{\hlx@space@i[\doublerulesep]}% |
| 816 |
} |
| 817 |
\def\hlx@space@i[#1]{% |
| 818 |
\vskip#1% |
| 819 |
\tab@addruleheight{#1}% |
| 820 |
\ifnum0=`{\fi}% |
| 821 |
\hlx@loop% |
| 822 |
} |
| 823 |
\hlxdef c#1{\cline{#1}\hlx@loop} |
| 824 |
\hlxdef .#1\q@delim{% |
| 825 |
\ifx @#1@\else% |
| 826 |
\PackageWarning{mdwtab}{% |
| 827 |
Ignoring \protect\hlx\space command characters following a |
| 828 |
`.'\MessageBreak command% |
| 829 |
}% |
| 830 |
\fi% |
| 831 |
\ignorespaces% |
| 832 |
} |
| 833 |
\def\@arraycr{\tab@arraycr{}} |
| 834 |
\def\tab@arraycr#1{\tab@cr{\tab@tabcr{#1}}{}{}} |
| 835 |
\def\tab@tabcr#1#2{% |
| 836 |
\dimen@#2% |
| 837 |
\advance\dimen@\tab@extrasep% |
| 838 |
\ifdim\dimen@>\z@% |
| 839 |
\ifvmode% |
| 840 |
\unskip\ifdim\prevdepth>-\@m\p@\kern-\prevdepth\fi% |
| 841 |
\nointerlineskip\expandafter\hbox% |
| 842 |
\else% |
| 843 |
\@maybe@unskip\expandafter\@firstofone% |
| 844 |
\fi% |
| 845 |
{\advance\dimen@\dp\@arstrutbox\vrule\@depth\dimen@\@width\z@}% |
| 846 |
\fi% |
| 847 |
\global\dimen\@ne\dimen@% |
| 848 |
\cr% |
| 849 |
\noalign{% |
| 850 |
#1% |
| 851 |
\ifdim\dimen\@ne<\z@\vskip\dimen\@ne\relax\fi% |
| 852 |
}% |
| 853 |
\@gobble% |
| 854 |
} |
| 855 |
\def\tab@setcr{\let\\\tabularnewline} |
| 856 |
\def\tab@cr#1#2#3{% |
| 857 |
\relax% |
| 858 |
\iffalse{\fi\ifnum0=`}\fi% |
| 859 |
\@ifstar{\tab@cr@i{#1}{#3}}{\tab@cr@i{#1}{#2}}% |
| 860 |
} |
| 861 |
\def\tab@cr@i#1#2{% |
| 862 |
\@ifnextchar[{\tab@cr@ii{#1}{#2}}{\tab@cr@ii{#1}{#2}[\z@]}% |
| 863 |
} |
| 864 |
\def\tab@cr@ii#1#2[#3]{% |
| 865 |
\ifnum0=`{}\fi% |
| 866 |
#1{#3}{#2}% |
| 867 |
} |
| 868 |
\begingroup |
| 869 |
\catcode`.=11 |
| 870 |
\def\@tempa#1 #2 #3\@@{#1 #2} |
| 871 |
\xdef\[email protected] |
| 872 |
{1995/11/19 [mdwtab.sty \expandafter\@tempa\[email protected]\@@]} |
| 873 |
\endgroup |
| 874 |
\def\tab@error{\PackageError{mdwtab}} |
| 875 |
\def\tab@err@misscol{% |
| 876 |
\tab@error{Missing column type}{% |
| 877 |
I'm lost. I was expecting something describing^^J% |
| 878 |
the type of the current column, but you seem to^^J% |
| 879 |
have missed it out. I've inserted a type `l'^^J% |
| 880 |
column here in the hope that this makes sense.% |
| 881 |
}% |
| 882 |
} |
| 883 |
\def\tab@err@oddgroup{% |
| 884 |
\tab@error{Misplaced group in table preamble}{% |
| 885 |
I've found an open brace character in your preamble^^J% |
| 886 |
when I was expecting a specifier character. I'm^^J% |
| 887 |
going to gobble the whole group and carry on as if^^J% |
| 888 |
I'd never seen it.% |
| 889 |
}% |
| 890 |
} |
| 891 |
\def\tab@err@undef#1{% |
| 892 |
\tab@error{Unknown `\tab@colset' preamble character `\string#1'}{% |
| 893 |
I don't understand what you meant by typing this^^J% |
| 894 |
character. Anyway, I'll ignore it this time around.^^J% |
| 895 |
Just don't you do it again.% |
| 896 |
}% |
| 897 |
} |
| 898 |
\def\tab@err@unbrh{% |
| 899 |
\tab@error{Can't use unboxed tabular in LR mode}{% |
| 900 |
You've asked for a tabular or array environment with^^J% |
| 901 |
`L', `C' or `R' as the position specifier, but you're^^J% |
| 902 |
in LR (restricted horizontal) mode, so it won't work.^^J% |
| 903 |
I'll assume you really meant `c' and soldier on.% |
| 904 |
}% |
| 905 |
} |
| 906 |
\def\tab@err@unbmm{% |
| 907 |
\tab@error{Can't use unboxed tabular in maths mode}{% |
| 908 |
You've asked for a tabular or array environment with^^J% |
| 909 |
`L', `C' or `R' as the position specifier, but you're^^J% |
| 910 |
in maths mode, so it won't work. I'll pretend that^^J% |
| 911 |
you really typed `c', and that this is all a bad dream.% |
| 912 |
}% |
| 913 |
} |
| 914 |
\def\tab@err@unbext{% |
| 915 |
\tab@error{Can't extend unboxed tabulars}{% |
| 916 |
You're trying to use kludgy extensions (e.g.,^^J% |
| 917 |
`delarray') on an array or tabular with `L', `C'^^J% |
| 918 |
or `R' as the position specifier. I'll assume you^^J% |
| 919 |
subconsciously wanted a `c' type all along.% |
| 920 |
}% |
| 921 |
} |
| 922 |
\def\tab@err@multi{% |
| 923 |
\tab@error{More than one column in a \protect\multicolumn}{% |
| 924 |
You've put more than one column into a \string\multicolumn^^J% |
| 925 |
descriptor. It won't work. I have no idea what^^J% |
| 926 |
will happen, although it won't be pleasant. Hold^^J% |
| 927 |
on tight now...% |
| 928 |
}% |
| 929 |
} |
| 930 |
\def\tab@err@range{% |
| 931 |
\tab@error{Expected `,' or `<end>' in range list}{% |
| 932 |
I was expecting either the end of the range list,^^J% |
| 933 |
or a comma, followed by another range. I've^^J% |
| 934 |
inserted a comma to try and get me back on track.^^J% |
| 935 |
Good luck.% |
| 936 |
}% |
| 937 |
} |
| 938 |
%% |
| 939 |
%% footnote package -- Save footnotes around boxing environments |
| 940 |
%% Copyright (c) 1996 Mark Wooding |
| 941 |
%% |
| 942 |
\ifx\fn@notes\@@undefined% |
| 943 |
\newbox\fn@notes% |
| 944 |
\fi |
| 945 |
\newdimen\fn@width |
| 946 |
\let\fn@colwidth\columnwidth |
| 947 |
\newif\if@savingnotes |
| 948 |
\def\fn@startnote{% |
| 949 |
\hsize\fn@colwidth% |
| 950 |
\interlinepenalty\interfootnotelinepenalty% |
| 951 |
\reset@font\footnotesize% |
| 952 |
\floatingpenalty\@MM% Is this right??? |
| 953 |
\@parboxrestore% |
| 954 |
\protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% |
| 955 |
\color@begingroup% |
| 956 |
} |
| 957 |
\let\fn@endnote\color@endgroup |
| 958 |
\def\fn@fntext#1{% |
| 959 |
\ifx\ifmeasuring@\@@undefined% |
| 960 |
\expandafter\@secondoftwo\else\expandafter\@iden% |
| 961 |
\fi% |
| 962 |
{\ifmeasuring@\expandafter\@gobble\else\expandafter\@iden\fi}% |
| 963 |
{% |
| 964 |
\global\setbox\fn@notes\vbox{% |
| 965 |
\unvbox\fn@notes% |
| 966 |
\fn@startnote% |
| 967 |
\@makefntext{% |
| 968 |
\rule\z@\footnotesep% |
| 969 |
\ignorespaces% |
| 970 |
#1% |
| 971 |
\@finalstrut\strutbox% |
| 972 |
}% |
| 973 |
\fn@endnote% |
| 974 |
}% |
| 975 |
}% |
| 976 |
} |
| 977 |
\def\savenotes{% |
| 978 |
\begingroup% |
| 979 |
\if@savingnotes\else% |
| 980 |
\@savingnotestrue% |
| 981 |
\let\@footnotetext\fn@fntext% |
| 982 |
\let\@mpfootnotetext\fn@fntext% |
| 983 |
\fn@width\columnwidth% |
| 984 |
\let\fn@colwidth\fn@width% |
| 985 |
\global\setbox\fn@notes\box\voidb@x% |
| 986 |
\let\fn@thempfn\thempfn% |
| 987 |
\let\fn@mpfn\@mpfn% |
| 988 |
\ifx\@minipagerestore\relax\let\@minipagerestore\@empty\fi% |
| 989 |
\expandafter\def\expandafter\@minipagerestore\expandafter{% |
| 990 |
\@minipagerestore% |
| 991 |
\let\thempfn\fn@thempfn% |
| 992 |
\let\@mpfn\fn@mpfn% |
| 993 |
}% |
| 994 |
\fi% |
| 995 |
} |
| 996 |
\def\spewnotes{% |
| 997 |
\endgroup% |
| 998 |
\if@savingnotes\else\ifvoid\fn@notes\else\begingroup% |
| 999 |
\let\@makefntext\@empty% |
| 1000 |
\let\@finalstrut\@gobble% |
| 1001 |
\let\rule\@gobbletwo% |
| 1002 |
\@footnotetext{\unvbox\fn@notes}% |
| 1003 |
\endgroup\fi\fi% |
| 1004 |
} |
| 1005 |
\let\endsavenotes\spewnotes |
| 1006 |
%% |
| 1007 |
%% doafter package -- insert a token really after a group |
| 1008 |
%% Copyright (c) 1996 Peter Schmitt and Mark Wooding |
| 1009 |
%% |
| 1010 |
\let\@@aftergroup\aftergroup |
| 1011 |
\def\doafter#1{% |
| 1012 |
\def\@tempa{\@@aftergroup#1}% |
| 1013 |
\afterassignment\doafter@i\let\@let@token% |
| 1014 |
} |
| 1015 |
\def\doafter@i{% |
| 1016 |
\@let@token% |
| 1017 |
\let\aftergroup\@my@aftergroup% |
| 1018 |
\@@aftergroup\@prepare@after\@tempa% |
| 1019 |
} |
| 1020 |
\def\ag@cnt@local{0 } |
| 1021 |
\let\ag@cnt@global\ag@cnt@local |
| 1022 |
\def\@my@aftergroup{% |
| 1023 |
\begingroup% |
| 1024 |
\count@\ag@cnt@local% |
| 1025 |
\advance\count@\@ne% |
| 1026 |
\xdef\ag@cnt@global{\the\count@\space}% |
| 1027 |
\endgroup% |
| 1028 |
\let\ag@cnt@local\ag@cnt@global% |
| 1029 |
\@@aftergroup\@after@token\@@aftergroup% |
| 1030 |
} |
| 1031 |
\def\@after@token{% |
| 1032 |
\@start@after@group% |
| 1033 |
\@after@token% |
| 1034 |
} |
| 1035 |
\def\@start@after@group{% |
| 1036 |
\begingroup% |
| 1037 |
\count@\ag@cnt@global% |
| 1038 |
\clubpenalty\ag@cnt@local% |
| 1039 |
\let\@after@token\@after@token@i% |
| 1040 |
} |
| 1041 |
\def\@after@token@i{% |
| 1042 |
\advance\count@\m@ne% |
| 1043 |
\ifnum\count@=\clubpenalty% |
| 1044 |
\global\let\ag@cnt@global\ag@cnt@local% |
| 1045 |
\expandafter\@after@aftertoken\expandafter\@after@all% |
| 1046 |
\else% |
| 1047 |
\expandafter\@@aftergroup% |
| 1048 |
\fi% |
| 1049 |
} |
| 1050 |
\let\@after@all\endgroup |
| 1051 |
\def\@prepare@after{% |
| 1052 |
\ifx\ag@cnt@local\ag@cnt@global\else% |
| 1053 |
\expandafter\@prepare@after@i% |
| 1054 |
\fi% |
| 1055 |
} |
| 1056 |
\def\@prepare@after@i#1{% |
| 1057 |
\@start@after@group% |
| 1058 |
\def\@after@all{\@@aftergroup#1\endgroup}% |
| 1059 |
} |
| 1060 |
\def\@after@aftertoken#1{% |
| 1061 |
\let\bgroup\relax\let\egroup\relax% |
| 1062 |
\toks@{#1}% |
| 1063 |
\futurelet\@let@token\@after@aftertoken@i% |
| 1064 |
} |
| 1065 |
\def\@after@aftertoken@i{% |
| 1066 |
\ifcat\noexpand\@let@token{% |
| 1067 |
\@@aftergroup{% |
| 1068 |
\else\ifcat\noexpand\@let@token}% |
| 1069 |
\@@aftergroup}% |
| 1070 |
\else% |
| 1071 |
\def\@tempa##1{\@@aftergroup##1\the\toks@}% |
| 1072 |
\expandafter\expandafter\expandafter\@tempa% |
| 1073 |
\fi\fi% |
| 1074 |
} |
| 1075 |
\endinput |
| 1076 |
%% |
| 1077 |
%% End of file `mdwtab.sty'. |