summaryrefslogtreecommitdiff
path: root/info/examples/tex-in-practice/orcards.tip
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/tex-in-practice/orcards.tip')
-rw-r--r--info/examples/tex-in-practice/orcards.tip119
1 files changed, 119 insertions, 0 deletions
diff --git a/info/examples/tex-in-practice/orcards.tip b/info/examples/tex-in-practice/orcards.tip
new file mode 100644
index 0000000000..337a7d88b6
--- /dev/null
+++ b/info/examples/tex-in-practice/orcards.tip
@@ -0,0 +1,119 @@
+% 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 34.5.1, p. IV-70.
+% Original source in file "o1.TEX", starting line 532.
+\wlog{L: "orcards.tip" ["o1.TEX," l. 532, p. IV-70]}%
+% This file DOES NOT belong to format "texip."
+\InputD{box-mac.tip}
+\InputD{modonead.tip}
+\InputD{nlm.tip}
+\hsize = 3.0in
+\baselineskip = 12pt
+\topskip = 10pt plus 10pt
+\vsize = 9\baselineskip
+\countdef\PageNo = 0
+\newcount\CardCount
+\CardCount = 0
+\def\Card #1{%
+ \vfill\eject
+ \advance\CardCount by 1
+ \noindent
+ {\bf #1}
+ \par
+ \def\CardTitle{#1}%
+}
+\newdimen\RuleSpace \RuleSpace = 10pt
+\newdimen\BetweenRules \BetweenRules = 20pt
+\newdimen\BaseLineSkipSave
+\BaseLineSkipSave = \baselineskip
+\newcount\PositionCount
+\PositionCount = 0
+\def\HeadLine{%
+ \line{%
+ \strut
+ {\it Cards, page \the\PageNo}%
+ \hfil
+ \tt\jobname
+ }%
+}
+\def\FootLine{%
+ \line{\strut*****\hfil*****}%
+}
+\newbox\OutTopBox
+\newbox\OutMidBox
+\newbox\OutBotBox
+\def\CardOutputRoutine{%
+ \NewLineMessage{\string\CardOutputRoutine:
+ card number: \the\CardCount,
+ PositionCounter: \the\PositionCount,}%
+ \NewLineMessage{page number: \the\PageNo,
+ \string\outputpenalty: \the\outputpenalty.}%
+ \ifnum\outputpenalty < -9999
+ \setbox0 = \hbox{\strut}
+ \else
+ \setbox0 = \line{%
+ \strut
+ \hfil
+ \it
+ \CardTitle\space con't\/\dots
+ }%
+ \fi
+ \setbox 2 = \vbox{%
+ \offinterlineskip
+ \hrule
+ \vskip\RuleSpace
+ \VboxR to \vsize{\unvbox 255 \vfill}
+ \box0
+ \vskip\RuleSpace
+ \hrule
+ }
+ \global\setbox
+ \ifcase\PositionCount
+ \OutTopBox \or
+ \OutMidBox \or
+ \OutBotBox
+ \fi
+ = \box2
+ \ifnum\PositionCount = 2
+ \shipout\vbox{%
+ \offinterlineskip
+ \VboxR{
+ \HeadLine
+ \vskip\BaseLineSkipSave
+
+ \box\OutTopBox
+ \vskip\BetweenRules
+ \box\OutMidBox
+ \vskip\BetweenRules
+ \box\OutBotBox
+
+ \vskip\BaseLineSkipSave
+ \FootLine
+ }
+ }
+ \fi
+ \ifnum\outputpenalty = -20000
+ \NewLineMessage{\string\supereject\space encountered.}
+ \ifnum\PositionCount < 2
+ \line{}
+ \vfill
+ \supereject
+ \fi
+ \fi
+ \ifnum\ModuloOneAdvanceNumCond{\PositionCount}{3} = 0
+ \global\advance\pageno by 1
+ \fi
+}
+\output = {\CardOutputRoutine}