summaryrefslogtreecommitdiff
path: root/info/examples/tip/out2-or.tip
blob: b412be9f8b974aae5b856bc30d3b4da9541c0aac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
% 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 37.1.1, p. IV-160.
% Original source in file "o4.TEX", starting line 69.
\wlog{L: "out2-or.tip" ["o4.TEX," l. 69, p. IV-160]}%
% This file DOES NOT belong to format "texip."
\catcode`\@ = 11
\newbox\@LeftColumnBox
\newbox\@RightColumnBox
\newdimen\@PageWidth
\def\SetUpDC #1#2#3{% 
    \@PageWidth = #1
    \hsize = #2
    \vsize = #3
}
\def\@PageLine{\hbox to \@PageWidth}
\def\Header{% 
    \@PageLine{%
        \it Some Header Text\hfil
        \PrintCurrentMonth\space \the\day, \the\year,
        Page~\the\pageno
    }% 
}
\topskip = 10pt plus 60pt
\let\@ColumnMode = L
\def\supereject{%
    \eject
    \if\@ColumnMode R
        \hbox{}
        \vfill\eject
    \fi
    \end
}
\output = {
    \if\@ColumnMode L
        \global\setbox\@LeftColumnBox = \vbox to \vsize{
            \unvbox 255
            \vfil
        }
        \global\wd\@LeftColumnBox = \hsize
        \global\let\@ColumnMode = R
    \else
        \setbox\@RightColumnBox = \vbox to \vsize{
            \unvbox 255
            \vfil
        }
        \wd\@RightColumnBox = \hsize
        \shipout\vbox{
            \Header
            \vskip 24pt
            \@PageLine{% 
                \box\@LeftColumnBox
                \hfil
                \box\@RightColumnBox
            }
        }
        \advancepageno
        \global\let\@ColumnMode = L
    \fi
}
\catcode`\@ = 12