summaryrefslogtreecommitdiff
path: root/info/examples/tex-in-practice/pm-main.tip
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/tex-in-practice/pm-main.tip')
-rw-r--r--info/examples/tex-in-practice/pm-main.tip111
1 files changed, 111 insertions, 0 deletions
diff --git a/info/examples/tex-in-practice/pm-main.tip b/info/examples/tex-in-practice/pm-main.tip
new file mode 100644
index 0000000000..2ec2287495
--- /dev/null
+++ b/info/examples/tex-in-practice/pm-main.tip
@@ -0,0 +1,111 @@
+% This macro source file is from the four volume series
+% "TeX in Practice" by Stephan von Bechtolsheim, published
+% 1993 by Springer-Verlag, New York.
+% Copyright 1993 Stephan von Bechtolsheim.
+% No warranty or liability is assumed.
+% This macro may be copied freely if no fees other than
+% media cost or shipping charges are charged and as long
+% as this copyright and the following source code itself
+% is not changed. Please see the series for further information.
+%
+% Version: 1.0
+% Date: May 1, 1993
+%
+%
+% This source code is documented in 30.7.3, p. III-549.
+% Original source in file "pp1.TEX", starting line 825.
+\wlog{L: "pm-main.tip" ["pp1.TEX," l. 825, p. III-549]}%
+% This file DOES NOT belong to format "texip."
+\InputD{conval.tip}
+\InputD{ts-wind.tip}
+\catcode`\@ = 11
+\newif\ifPartVerbose
+\PartVerbosefalse
+\def\InitialParts{%
+ \def\@AllPartsOfDocumentList{}%
+ \def\@ToProcessList{}%
+}
+\def\DocPart #1{%
+ \ConvertArgsToListAndAppend{\@AllPartsOfDocumentList}{#1}%
+ \ifPartVerbose
+ {%
+ \wlog{\string\DocPart: List now current list of parts
+ of this document:}%
+ \def\\##1{\wlog{Document part "##1"}}%
+ \@AllPartsOfDocumentList
+ }%
+ \fi
+}
+\def\ProcessPart #1{%
+ \ConvertArgsToListAndAppend{\@ToProcessList}{#1}%
+ \ifPartVerbose
+ {%
+ \wlog{\string\ProcessPart: List of parts which will
+ be processed.}%
+ \def\\##1{%
+ \wlog{Part which will be processed: "##1"}%
+ }%
+ \@ToProcessList
+ }%
+ \fi
+}
+\def\ProcessNow{%
+ \wlog{\string\ProcessNow: Start reading
+ all auxiliary files.}%
+ \@IgnoreAuxStuff
+ \let\@NewLabel = \Saved@NewLabel
+ \@ReadInAuxFiles
+ \wlog{\string\ProcessNow: Done reading all auxiliary files.}%
+ \i@openout\@TmpFileStream = \jobname.\TmpFileNameExtension
+ \let\@AllPartsOfDocumentListCopy = \@AllPartsOfDocumentList
+ {%
+ \def\\{\noexpand\@DoPart}%
+ \xdef\@AllPartsOfDocumentListCopy{%
+ \@AllPartsOfDocumentListCopy
+ }%
+ }%
+ \@AllPartsOfDocumentListCopy
+}
+\newif\if@ProcessThisPart
+\def\@DoPart #1{%
+ \gdef\CurrentPartName{#1}%
+ \@ProcessThisPartfalse
+ \if\EmptyListConditional{\@ToProcessList}%
+ \@ProcessThisParttrue
+ \fi
+ \if\MemberOfListConditional{\@ToProcessList}{\CurrentPartName}%
+ \@ProcessThisParttrue
+ \fi
+ \if@ProcessThisPart
+ \@DoPartProcess
+ \else
+ \@DoPartNotProcess
+ \fi
+}
+\def\@DoPartProcess{%
+ \wlog{\string\@DoPartProcess: process part "\CurrentPartName".}
+ \i@openout\@PartAuxStream =
+ \CurrentPartName.\AuxFileNameExtension
+ \OpenIndexFiles{\CurrentPartName}%
+ \input \CurrentPartName.\PartSourceFileNameExtension
+ \EvalEveryParsCE
+ \vfill\supereject
+ \WriteCountersToAuxFile
+ \wlog{\string\@DoPart: "\CurrentPartName" was processed.}%
+ \i@closeout\@PartAuxStream
+ \NameUse{CloseIndexFiles}%
+}
+\def\@DoPartNotProcess{%
+ \wlog{\string\@DoPartNotProcess:
+ "\CurrentPartName.\PartSourceFileNameExtension" not
+ processed.}%
+ \@IgnoreAuxStuff
+ \let\@SetCounter = \SetCounter
+ \InputCWithAt{\CurrentPartName.\AuxFileNameExtension}
+ \@PageNumbersToCounterRegs
+}
+\def\EndProcessing{%
+ \i@closeout\@TmpFileStream
+ \@BuildNewSpecialFiles
+}
+\catcode`\@ = 12