Lines Matching refs:PT

13 \let\PT@original@And\And
14 \let\PT@original@Not\Not
16 \let\PT@And\And
17 \let\PT@Not\Not
18 \def\PT@prelazylist
19 {\let\And\PT@And
20 \let\Not\PT@Not}
21 \def\PT@postlazylist
22 {\let\And\PT@original@And
23 \let\Not\PT@original@Not}
24 \PT@postlazylist
26 \DeclareOption{debug} {\AtEndOfPackage\PT@debug}
27 \DeclareOption{info} {\AtEndOfPackage\PT@info}
28 \DeclareOption{silent}{\AtEndOfPackage\PT@silent}
29 \newdimen\PT@colwidth
30 \newcount\PT@cols
31 \newcount\PT@table
32 \newtoks\PT@toks
34 \newread\PT@in
35 \newwrite\PT@out
36 \def\PT@allcols{\Nil}
37 \let\PT@infromto\empty
38 \let\PT@currentwidths\empty
39 \def\PT@false{0}
40 \def\PT@true{1}
41 \let\PT@inrestore\PT@false
42 \newcommand{\defaultcolumn}[1]{\gdef\PT@defaultcolumnspec{#1}}
43 \newcommand{\nodefaultcolumn}{\global\let\PT@defaultcolumnspec\undefined}
46 \let\PT@preparewrite\@gobble
47 \let\PT@add \PT@addmem
48 \let\PT@prepareread \PT@preparereadmem
49 \let\PT@split \PT@splitmem
50 \let\PT@finalize \relax
53 \let\PT@preparewrite\PT@preparewritefile
54 \let\PT@add \PT@addfile
55 \let\PT@prepareread \PT@preparereadfile
56 \let\PT@split \PT@splitfile
57 \let\PT@finalize \PT@finalizefile
61 \newcommand*{\PT@debug}
62 {\def\PT@debug@ ##1{\typeout{(polytable) ##1}}
63 \PT@info}
64 \newcommand*{\PT@info}
65 {\def\PT@typeout@ ##1{\typeout{(polytable) ##1}}}
66 \let\PT@debug@\@gobble
67 \let\PT@typeout@\@gobble
68 \def\PT@warning{\PackageWarning{polytable}}%
69 \def\PT@silent
70 {\let\PT@typeout@\@gobble\let\PT@warning\@gobble}
71 \def\PT@aligndim#1#2#3\@@{%
74 \PT@aligndim@0.0pt\space\space\space\space\space\@@
76 \PT@aligndim@#1#2#3\space\space\space\space\space\space\space\space\@@
79 \PT@aligndim@#1#2#3\space\space\space\space\space\space\space\space\@@
82 \def\PT@aligndim@#1.#2#3#4#5#6#7#8#9\@@{%
89 \def\PT@aligncol#1{%
90 \PT@aligncol@#1\space\space\space\space\space\space\space\space\@@}
92 \def\PT@aligncol@#1#2#3#4#5#6#7#8#9\@@{%
94 \def\PT@rerun
95 {\PT@typeout@{We have to rerun LaTeX ...}%
99 \global\let\PT@rerun\relax}
100 \def\PT@listopmacro #1#2#3% #1 #3 to the list #2
101 {\def\PT@temp{#1{#3}}%
105 {\expandafter\PT@temp\expandafter{#2}}}
107 \def\PT@consmacro{\PT@listopmacro\Cons}
108 \def\PT@appendmacro{\PT@listopmacro\Cat}
109 \def\PT@gaddendmacro #1#2% add #2 to the end of #1
110 {\PT@expanded{\gdef #1}{#1#2}}
111 \def\PT@expanded #1#2%
113 \def\PT@enamedef #1% sets name #1 to the expansion of #2
114 {\PT@expanded{\@namedef{#1}}}
115 \def\PT@addoptargtomacro
116 {\PT@add@argtomacro\PT@makeoptarg}
117 \def\PT@addargtomacro
118 {\PT@add@argtomacro\PT@makearg}
120 \def\PT@add@argtomacro#1#2#3%
121 {\PT@expanded{\PT@expanded{\gdef\PT@temp}}{\csname #3\endcsname}%
123 \PT@expanded{\PT@gaddendmacro{#2}}{\PT@temp}}
125 \def\PT@makeoptarg%
126 {\PT@expanded{\def\PT@temp}{\expandafter[\PT@temp]}}
127 \def\PT@makearg%
128 {\PT@expanded{\def\PT@temp}{\expandafter{\PT@temp}}}
129 \newcommand*{\PT@gobbleoptional}[1][]{\ignorespaces}
130 \def\PT@addmem#1#2{\PT@gaddendmacro #2{\PT@elt{#1}}}
131 \def\PT@splitmem#1#2{#1\PT@nil{#2}{#1}}
133 \def\PT@elt#1#2\PT@nil#3#4{\gdef #3{#1}\gdef #4{#2}}
135 \def\PT@queuefilename{\jobname.ptb}
137 \def\PT@addfile#1#2{%
140 \def\PT@splitfile#1#2{%
147 \PT@expanded{\def #2}{\PTtemp}%
152 \def\PT@preparereadmem#1#2{%
155 \def\PT@preparewritefile#1{%
156 \immediate\openout\PT@out\PT@queuefilename\relax
157 \let #1\PT@out}
159 \def\PT@preparereadfile#1#2{%
160 \immediate\closeout\PT@out
161 \openin\PT@in\PT@queuefilename\relax
162 \let #1\PT@in}
164 \def\PT@finalizefile{%
165 \closein\PT@in}
169 {\edef\PT@environment{\@currenvir}%
172 \PT@savecounters
173 \PT@toks{}% initialise token register
174 \PT@scantoend}
176 \newcommand{\PT@scantoend}% LaTeX check
177 \long\def\PT@scantoend #1\end #2%
178 {\PT@toks\expandafter{\the\PT@toks #1}%
179 \def\PT@temp{#2}%
180 \ifx\PT@temp\PT@environment
181 \global\let\PT@columnqueue \empty
182 \global\let\PT@columnreference \undefined
183 \PT@preparewrite\PT@columnqueue
184 \expandafter\PT@getwidths
186 \PT@toks\expandafter{\the\PT@toks\end{#2}}%
187 \expandafter\PT@scantoend
189 \def\PT@getwidths
190 {\let\column \PT@firstrun@column
191 \let\savecolumns \PT@savewidths
192 \let\restorecolumns \PT@restorewidths
195 \PT@cols=0\relax%
196 \let\fromto \PT@fromto
197 \let\PT@processentry \PT@checkwidth
198 \let\PT@scanbegin \PT@scanbeginfree
199 \let\\= \PT@resetcolumn
200 \let\nextline \PT@resetcolumn
201 \let\>= \PT@fromopt
202 \let\== \PT@from
203 \let\<= \PT@toopt
204 \global\PT@changedfalse % nothing has changed so far
205 \PT@resetcolumn % we are at the beginning of a line
206 \the\PT@toks
207 \@ifundefined{PT@scanning}%
208 {}{\PT@resetcolumn\relax}%
209 \ifx\column\PT@otherrun@column
212 \PT@prelazylist
213 \PT@typeout@{\PT@environment: \the\PT@cols\space columns, %
214 \PT@Print\PT@allcols}%
215 \PT@postlazylist
217 \let\PT@firstrun@column \PT@otherrun@column
218 \let\savecolumns \PT@gobbleoptional
219 \let\restorecolumns \PT@gobbleoptional
220 \let\PT@savewidths \PT@gobbleoptional
221 \let\PT@restorewidths \PT@gobbleoptional
222 \PT@restorecounters
225 \PT@typeout@{There were changes; another trial run needed.}%
226 \expandafter\PT@getwidths
229 \PT@typeout@{There were no changes; reached fixpoint.}%
230 \expandafter\PT@sortcols
232 \def\PT@savecounters
236 \xdef\PT@restorecounters{\cl@@ckpt}%
238 \def\PT@sortcols
239 {\PT@prelazylist
240 \edef\PT@sortedlist
242 {\Insertsort\PT@ltmax\PT@allcols}}%
243 \PT@typeout@{Sorted columns:}%
244 \PT@PrintWidth\PT@sortedlist
245 \PT@postlazylist
246 \PT@cols=0\relax%
247 \PT@prelazylist
248 \PT@Execute{\Map\PT@numbercol\PT@sortedlist}%
249 \PT@postlazylist
250 \edef\PT@lastcol@{\PT@StripColumn\PT@lastcol}%
251 \PT@typeout@{Numbered successfully, %
252 last column is \PT@lastcol@}%
253 \ifx\PT@currentwidths\empty
255 \PT@typeout@{Saving table information for \PT@currentwidths .}%
256 \PT@expanded\PT@saveinformation\PT@currentwidths
258 \PT@typeset}
259 \def\PT@typeset
260 {\PT@typeout@{Typesetting the table ...}%
261 \let\PT@processentry \PT@placeinbox
262 \let\PT@scanbegin \PT@scanbeginwidth
263 \let\\= \PT@resetandcr
264 \let\nextline \PT@resetandcr
265 \PT@prepareread\PT@columnreference\PT@columnqueue
266 \let\@arraycr \PT@resetandcr
267 \PT@resetcolumn % we are at the beginning of a line
268 \PT@begin%
269 \the\PT@toks
270 \PT@fill% new in 0.7.3: balance the last line
271 \PT@finalize% finalize the queue (possibly close file)
272 \PT@end
274 \PT@typeout@{Finished.}%
275 \expandafter\end\expandafter{\PT@environment}}%
276 \newcommand{\PT@from}[1]%
277 {\PT@checkendentry{#1}\PT@dofrom{#1}}
279 \newcommand{\PT@fromopt}[1][]%
280 {\def\PT@temp{#1}%
281 \ifx\PT@temp\empty
283 \def\PT@temp{\PT@currentcolumn .}%
285 \PT@expanded\PT@from\PT@temp}
287 \newcommand{\PT@toopt}[1][]%
288 {\def\PT@temp{#1}%
289 \ifx\PT@temp\empty
291 \def\PT@temp{\PT@currentcolumn .}%
293 \PT@expanded\PT@checkendentry\PT@temp
294 \let\PT@scanning\undefined}
295 \newcommand*{\PT@dofrom}[1]%
296 {\edef\PT@currentcolumn{#1}%
297 \let\PT@scanning\PT@currentcolumn
298 \let\PT@currentpreamble\relax% necessary for preparescan
300 {\PT@expanded\PT@dospecfrom\PT@currentcolumn}%
301 {\PT@expanded\PT@dodofrom \PT@currentcolumn}}
303 \newcommand*{\PT@dospecfrom}{}% LaTeX check
304 \def\PT@dospecfrom #1[#2]%
305 {\PT@checkglobalfrom #2\PT@nil{#1}%
306 \PT@dodofrom{#1}}
308 \newcommand*{\PT@checkglobalfrom}{}% LaTeX check
309 \def\PT@checkglobalfrom
310 {\@ifnextchar!\PT@getglobalfrom\PT@ignorefrom}
312 \newcommand*{\PT@getglobalfrom}{}% LaTeX check
313 \def\PT@getglobalfrom!#1\PT@nil#2%
316 \newcommand*{\PT@ignorefrom}{}% LaTeX check
317 \def\PT@ignorefrom #1\PT@nil#2%
318 {\def\PT@currentpreamble{#1}}
320 \newcommand*{\PT@dodofrom}[1]%
321 {\@ifundefined{PT@columnreference}%
323 \ifx\column\PT@otherruncolumn
326 \let\PT@storeendcolumn\PT@add
328 \def\PT@temp{@end@}}%
330 \PT@split\PT@columnreference\PT@temp
331 %\PT@typeout@{splitted: \PT@temp}
333 \PT@expanded{\PT@expanded\PT@preparescan\PT@currentcolumn}\PT@temp
334 \PT@scanbegin}
336 \let\PT@storeendcolumn\@gobbletwo
337 \newcommand*{\PT@fromto}[3]%
338 {\PT@checkendentry{#1}%
339 \let\PT@scanning\undefined
340 \PT@infromto
341 \def\PT@infromto{%
343 \let\PT@currentpreamble\relax% necessary for preparescan
344 \PT@preparescan{#1}{#2}%
345 \PT@scanbegin #3\PT@scanend% defines \@curfield
346 \PT@processentry{#1}{#2}%
347 \let\PT@infromto\empty
349 \newcommand*{\PT@checkendentry}% takes one argument
350 {\@ifundefined{PT@scanning}%
351 {\let\PT@temp\@gobble}%
352 {\let\PT@temp\PT@endentry}%
353 \PT@temp}
356 \newcommand*{\PT@endentry}[1]%
357 {\PT@scanend
358 \edef\PT@temp{#1}%
359 \PT@expanded\PT@storeendcolumn\PT@temp\PT@columnqueue
360 \let\PT@storeendcolumn\@gobbletwo
361 \PT@expanded{\PT@expanded\PT@processentry\PT@currentcolumn}\PT@temp}
362 \newcommand\PT@firstrun@column[3][0pt]%
363 {\@ifundefined{PT@col@#2.type}%
364 {\PT@typeout@{Defining column \PT@aligncol{#2} at #1.}%
365 \@namedef{PT@col@#2.type}{#3}%
366 \@namedef{PT@col@#2.width}{#1}% initialize the width of the column
368 \PT@consmacro\PT@allcols{PT@col@#2}%
369 \advance\PT@cols by 1\relax}%
370 {\expandafter\ifx\csname PT@col@#2.type\endcsname\empty
374 \def\PT@temp{PT@col@#2}%
375 \ifx\PT@temp\PT@endcol
378 \PT@warning{Redefining column #2}%
382 \@namedef{PT@col@#2.type}{#3}%
384 \PT@typeout@{Redefining column #2 at #1.}%
385 \@namedef{PT@col@#2.width}{#1}%
388 \@ifundefined{PT@col@#2.max}%
389 {\@namedef{PT@col@#2.max}{#1}%
390 \expandafter\let\csname PT@col@#2.trusted\endcsname\PT@true}{}%
392 \newcommand\PT@otherrun@column[3][]%
394 \def\PT@checkcoldefined #1%
395 {\@ifundefined{PT@col@#1.type}%
396 {\@ifundefined{PT@defaultcolumnspec}%
398 {\PT@debug@{Implicitly defining column #1}%
399 \PT@expanded{\column{#1}}{\PT@defaultcolumnspec}}}{}%
400 \expandafter\ifx\csname PT@col@#1.type\endcsname\empty\relax
401 \@ifundefined{PT@defaultcolumnspec}{}%
402 {\PT@debug@{Implicitly defining column #1}%
403 \PT@expanded{\column{#1}}{\PT@defaultcolumnspec}}%
405 \def\PT@checkwidth #1#2%
406 {\PT@checkcoldefined{#2}% first column should have been checked before
407 \def\PT@temp{PT@col@#1}%
408 \ifx\PT@currentcol\PT@temp
409 \PT@debug@{No need to skip columns.}%
411 \PT@colwidth=\expandafter\@nameuse\expandafter
412 {\PT@currentcol.width}\relax
413 \ifdim\PT@colwidth>\csname PT@col@#1.width\endcsname\relax
415 \PT@debug@{s \PT@aligncol{#1}: %
417 \PT@aligndim\csname PT@col@#1.width\endcsname\@@%
418 new=\expandafter\PT@aligndim\the\PT@colwidth\@@}%
419 \PT@changedtrue
420 \PT@enamedef{PT@col@#1.width}{\the\PT@colwidth}%
422 \PT@colwidth=\expandafter\@nameuse\expandafter
423 {\PT@currentcol.max}\relax
424 \ifdim\PT@colwidth>\csname PT@col@#1.max\endcsname\relax
426 \PT@debug@{S \PT@aligncol{#1}: %
428 \PT@aligndim\csname PT@col@#1.max\endcsname\@@%
429 new=\expandafter\PT@aligndim\the\PT@colwidth\@@}%
430 \PT@changedtrue
431 \PT@checkrerun
432 \PT@enamedef{PT@col@#1.max}{\the\PT@colwidth}%
434 \ifnum\csname PT@col@#1.trusted\endcsname=\PT@false\relax
435 \ifdim\PT@colwidth=\csname PT@col@#1.max\endcsname\relax
436 \PT@debug@{#1=\the\PT@colwidth\space is now trusted}%
437 \expandafter\let\csname PT@col@#1.trusted\endcsname\PT@true%
441 \PT@expanded{\def\PT@temp}{\the\wd\@curfield}%
442 \global\PT@colwidth=\@nameuse{PT@col@#1.width}%
443 \global\advance\PT@colwidth by \PT@temp\relax%
444 \ifdim\PT@colwidth>\csname PT@col@#2.width\endcsname\relax
446 \PT@debug@{#2 (width \PT@temp) starts after #1 (at \csname PT@col@#1.width\endcsname)}%
447 \PT@debug@{c \PT@aligncol{#2}: %
449 \PT@aligndim\csname PT@col@#2.width\endcsname\@@%
450 new=\expandafter\PT@aligndim\the\PT@colwidth\@@}%
451 \PT@changedtrue
452 \PT@enamedef{PT@col@#2.width}{\the\PT@colwidth}%
454 \global\PT@colwidth=\@nameuse{PT@col@#1.max}%
455 \global\advance\PT@colwidth by \PT@temp\relax%
456 \ifdim\PT@colwidth>\csname PT@col@#2.max\endcsname\relax
458 \PT@debug@{C \PT@aligncol{#2}: %
460 \PT@aligndim\csname PT@col@#2.max\endcsname\@@%
461 new=\expandafter\PT@aligndim\the\PT@colwidth\@@}%
462 \PT@changedtrue
463 \PT@checkrerun
464 \PT@enamedef{PT@col@#2.max}{\the\PT@colwidth}%
466 \ifnum\csname PT@col@#2.trusted\endcsname=\PT@false\relax
467 \ifdim\PT@colwidth=\csname PT@col@#2.max\endcsname\relax
468 \PT@debug@{#2=\the\PT@colwidth\space is now trusted}%
469 \expandafter\let\csname PT@col@#2.trusted\endcsname\PT@true%
472 \def\PT@currentcol{PT@col@#2}}
473 \def\PT@checkrerun
474 {\ifnum\PT@inrestore=\PT@true\relax
475 \PT@rerun
477 \newcommand*{\PT@resetcolumn}[1][]%
478 {\PT@checkendentry{@end@}%
479 \let\PT@currentcolumn\empty%
480 \let\PT@scanning\undefined
481 \let\PT@currentcol\PT@nullcol
483 %\let\PT@pre@preamble\empty
484 %\PT@scanbeginfree
486 \def\PT@nullcol{PT@col@@begin@}
487 \def\PT@endcol{PT@col@@end@}
488 \def\PT@Execute{\Foldr\PT@Sequence\empty}
489 \def\PT@Sequence #1#2{#1#2}
490 \def\PT@ShowColumn #1#2%
491 {\PT@ShowColumn@{#1}#2\PT@ShowColumn@}
492 \def\PT@ShowColumn@ #1PT@col@#2\PT@ShowColumn@
494 \def\PT@ShowColumnWidth #1%
495 {\PT@typeout@{%
496 \PT@ShowColumn\PT@aligncol{#1}:
498 \PT@aligndim\csname #1.max\endcsname\@@}}
499 \def\PT@StripColumn #1%
500 {\expandafter\PT@StripColumn@#1\PT@StripColumn@}
501 \def\PT@StripColumn@ PT@col@#1\PT@StripColumn@
503 \def\PT@Print#1{\PT@Execute{\Map{\PT@ShowColumn\Identity}#1}}
504 \def\PT@PrintWidth#1{\PT@Execute{\Map\PT@ShowColumnWidth#1}}
505 \def\PT@TeXif #1%
507 \PT@gobblefalse
511 \def\PT@gobblefalse\else\relax\gobbletrue\fi #1#2%
513 \def\PT@ltmax #1#2%
514 {\Not{\PT@TeXif{\ifdim\csname #1.max\endcsname>\csname #2.max\endcsname}}}
515 \def\PT@numbercol #1%
516 {%\PT@typeout@{numbering #1 as \the\PT@cols}%
517 \PT@enamedef{#1.num}{\the\PT@cols}%
518 \def\PT@lastcol{#1}%
519 \advance\PT@cols by 1\relax}
520 \newcommand{\PT@resetandcr}%
521 {\PT@expanded\PT@checkendentry\PT@lastcol@%
522 \ifx\PT@currentcol\PT@lastcol
524 \ifx\PT@currentcol\PT@nullcol
525 \edef\PT@currentcol{\Head{\Tail\PT@sortedlist}}%
527 \edef\PT@currentcol@{\PT@StripColumn\PT@currentcol}%
528 \PT@typeout@{adding implicit fromto at eol from \PT@currentcol@
529 \space to \PT@lastcol@}%
530 \PT@expanded{\PT@expanded\fromto\PT@currentcol@}\PT@lastcol@
532 \PT@typeout@{Next line ...}%
533 \let\PT@scanning\undefined% needed for resetcolumn
534 \PT@resetcolumn\PT@cr}
535 \newcommand{\PT@fill}%
536 {\PT@expanded\PT@checkendentry\PT@lastcol@%
537 \ifx\PT@currentcol\PT@lastcol
539 \ifx\PT@currentcol\PT@nullcol
541 \edef\PT@currentcol@{\PT@StripColumn\PT@currentcol}%
542 \PT@typeout@{adding implicit fromto from \PT@currentcol@
543 \space to \PT@lastcol@}%
544 \PT@expanded{\PT@expanded\fromto\PT@currentcol@}\PT@lastcol@
546 \def\PT@placeinbox#1#2%
547 {\PT@colwidth=\@nameuse{PT@col@#1.max}%
548 \advance\PT@colwidth by -\expandafter\csname\PT@currentcol.max\endcsname
550 \edef\PT@temp{\PT@StripColumn\PT@currentcol}%
551 \PT@typeout@{adding space of width %
552 \expandafter\PT@aligndim\the\PT@colwidth\@@
553 (\expandafter\PT@aligncol\expandafter{\PT@temp} %
554 -> \PT@aligncol{#1})}%
555 \hb@xt@\PT@colwidth{%
561 \PT@typeout@{adding box \space\space of width %
562 \expandafter\PT@aligndim\the\wd\@curfield\@@
563 (\PT@aligncol{#1} -> \PT@aligncol{#2})}%
565 \def\PT@currentcol{PT@col@#2}%
567 \def\PT@preparescan#1#2%
568 {\PT@checkcoldefined{#1}%
569 \PT@checkcoldefined{#2}%
570 \PT@colwidth=\@nameuse{PT@col@#2.max}%
571 \advance\PT@colwidth by -\@nameuse{PT@col@#1.max}\relax%
573 \PT@debug@{*math mode*}%
578 \PT@debug@{*text mode*}%
583 \ifx\PT@currentpreamble\relax
584 \PT@expanded{\PT@expanded{\def\PT@currentpreamble}}%
585 {\csname PT@col@#1.type\endcsname}%
587 {\PT@expanded\@mkpream\PT@currentpreamble%
590 \expandafter\PT@splitpreamble\@preamble\@sharp\PT@nil}
591 \def\PT@splitpreamble #1\@sharp #2\PT@nil{%
593 \def\PT@terp{#2}%
594 \ifx\PT@terp\empty%
597 \PT@splitsplitpreamble{#1}#2\PT@nil}
599 \def\PT@splitsplitpreamble #1#2\@sharp #3\PT@nil{%
600 \def\PT@temp{#3}%
601 \ifx\PT@temp\empty%
605 \def\PT@pre@preamble{#1}%
606 \def\PT@post@preamble{#2}}%
607 \def\PT@scanbeginwidth
608 {\PT@scanbegin@{\hbox to \PT@colwidth}}
610 \def\PT@scanbeginfree
611 {\PT@scanbegin@{\hbox}}
613 \def\PT@scanbegin@#1%
616 \PT@pre@preamble\strut\ignorespaces}
618 \def\PT@scanend
619 {\PT@post@preamble
621 \newcommand*{\PT@setmaxwidth}[3][\PT@false]% #2 column name, #3 maximum width
622 {\@namedef{PT@col@#2.max}{#3}%
624 \expandafter\let\csname PT@col@#2.trusted\endcsname=\PT@true%
626 \expandafter\let\csname PT@col@#2.trusted\endcsname=#1%
629 \def\PT@loadtable#1% #1 table id number
630 {%\expandafter\show\csname PT@restore@\romannumeral #1\endcsname
632 \PT@typeout@
634 \csname PT@restore@\romannumeral #1\endcsname.}%
635 \let\maxcolumn\PT@setmaxwidth
636 %\expandafter\show\csname PT@load@\romannumeral #1\endcsname
637 \csname PT@restore@\romannumeral #1\endcsname}
638 \def\PT@loadtablebyname#1% #1 set name
639 {\PT@typeout@{Loading table information for column width set #1.}%
640 \PT@loadtable{\csname PT@widths@#1\endcsname}}%
641 \def\PT@saveinformation#1% #1 set name
642 {\PT@expanded{\def\PT@temp}{\csname PT@widths@#1\endcsname}%
643 \PT@expanded{\def\PT@temp}%
644 {\csname PT@restore@\romannumeral\PT@temp\endcsname}%
645 \expandafter\gdef\PT@temp{}% start empty
646 % this is: \PT@Execute{\Map{\PT@savecolumn{\PT@temp}}{\Reverse\PT@allcols}}
647 \expandafter\PT@Execute\expandafter{\expandafter
648 \Map\expandafter{\expandafter\PT@savecolumn
649 \expandafter{\PT@temp}}{\Reverse\PT@allcols}}}
650 \def\PT@savecolumn#1#2% #1 macro name, #2 column name
651 {\PT@typeout@{saving column #2 in \string #1 ...}%
652 \def\PT@temp{#2}%
653 \ifx\PT@temp\PT@nullcol
654 \PT@typeout@{skipping nullcol ...}%
656 \PT@typeout@{max=\csname #2.max\endcsname, %
662 \PT@gaddendmacro{#1}{\maxcolumn}%
663 \ifnum\csname #2.trusted\endcsname=\PT@true\relax
664 \PT@gaddendmacro{#1}{[\PT@true]}%
666 \edef\PT@temp{\PT@StripColumn{#2}}%
667 \PT@addargtomacro{#1}{PT@temp}%
668 \PT@addargtomacro{#1}{#2.max}%
669 \PT@gaddendmacro{#1}{\column}%
670 \PT@addoptargtomacro{#1}{#2.width}%
671 \edef\PT@temp{\PT@StripColumn{#2}}%
672 \PT@addargtomacro{#1}{PT@temp}%
673 \PT@addargtomacro{#1}{#2.type}%
677 \newcommand*{\PT@savewidths}[1][default@]
678 {\PT@typeout@{Executing \string\savecolumns [#1].}%
679 \def\PT@currentwidths{#1}%
680 \PT@verifywidths{#1}%
681 \global\advance\PT@table by 1\relax
682 \expandafter\xdef\csname PT@widths@#1\endcsname
683 {\the\PT@table}%
684 \PT@loadtable{\PT@table}%
686 \newcommand*{\PT@restorewidths}[1][default@]
687 {\PT@typeout@{Executing \string\restorecolumns [#1].}%
688 \def\PT@currentwidths{#1}%
689 \let\PT@inrestore\PT@true
690 \PT@loadtablebyname{#1}%
692 \def\PT@comparewidths#1% #1 full column name
694 {\PT@typeout@{computed width for #1 is fine ...}}%
696 \PT@typeout@{Preferring saved width for \PT@StripColumn{#1}.}%
697 \PT@changedtrue
698 \PT@colwidth=\@nameuse{#1.max}\relax
699 \PT@enamedef{#1.width}{\the\PT@colwidth}%
701 \def\PT@trustedmax#1%
702 {\PT@TeXif{\ifnum\csname #1.trusted\endcsname=\PT@true}}
703 \def\PT@equalwidths#1% #1 full column name
706 \PT@typeout@{col #1 is okay ...}%
708 \PT@rerun% a rerun is needed
710 \def\PT@verifywidths#1% #1 column width set name
711 {\@ifundefined{PT@widths@#1}%
712 {\PT@typeout@{Nothing to verify yet for set #1.}%
713 \PT@typeout@{Scheduling set #1 for verification at end of document.}%
714 \AtEndDocument{\PT@verifywidths{#1}}}%
715 {\PT@typeout@{Verifying column width set #1.}%
716 \PT@expanded\PT@verify@widths{\csname PT@widths@#1\endcsname}{#1}}}
718 \def\PT@verify@widths#1#2% #1 set id number, #2 set name
719 {\@ifundefined{PT@restore@\romannumeral #1}{}%
721 \let\column\PT@firstrun@column
722 \PT@cols=0\relax%
723 \def\PT@allcols{\Nil}%
724 \PT@loadtablebyname{#2}%
725 \PT@table=#1\relax
727 \@namedef{\PT@nullcol .width}{0pt}%
729 \PT@prelazylist
730 \All{\PT@trustedmax}{\PT@allcols}%
731 {\PT@typeout@{All maximum widths can be trusted -- writing .max!}%
732 \PT@save@table{.max}}%
733 {\PT@typeout@{Untrustworthy maximums widths -- writing .width!}%
734 \PT@rerun
735 \PT@save@table{.width}}%
736 \PT@postlazylist
738 \PT@typeout@{Verification for #2 successful.}}
739 \def\PT@save@table#1%
740 {\PT@typeout@{Saving column width information.}%
742 \PT@prelazylist
745 \csname PT@restore@\romannumeral\PT@table\endcsname
746 {\PT@Execute{\Map{\PT@write@column{#1}}{\Reverse\PT@allcols}}}}}%
747 \PT@postlazylist
749 \def\PT@write@column #1#2%
751 {\PT@StripColumn{#2}}%
754 \let\PT@begin \empty
755 \let\PT@end \empty
756 \ifx\\\PT@arraycr
757 \let\PT@cr \PT@normalcr
759 \let\PT@cr \\%
766 \def\PT@begin {\tabular{@{}l@{}}}%
767 \let\PT@end \endtabular
768 \let\PT@cr \@arraycr
774 \def\PT@begin {\array{@{}l@{}}}%
775 \let\PT@end \endarray
776 \let\PT@cr \@arraycr