summaryrefslogtreecommitdiff
path: root/info/examples/tip/orsimple.tip
blob: a49920d5c230e6770fdf2587f3474b3f6733a860 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% 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.4.1, p. IV-62.
% Original source in file "o1.TEX", starting line 249.
\wlog{L: "orsimple.tip" ["o1.TEX," l. 249, p. IV-62]}%
% This file DOES NOT belong to format "texip."
\InputD{box-mac.tip}
\InputD{pmtime.tip}
\InputD{graphmac.tip}
\newdimen\LeftPageShift     \LeftPageShift = -10pt
\newdimen\RightPageShift    \RightPageShift= -40pt
\def\HeadLine{%
    \ifodd\PageNo
        \HboxR to \hsize{%
            \strut
            \the\month/\the\day/\the\year, \PrintMilTime
            \hfil
            {\tt\jobname.tip}% 
        }%
    \else
        \HboxR to \hsize{%
            \strut
            {\tt\jobname.tip}% 
            \hfil
            \the\month/\the\day/\the\year, \PrintMilTime
        }%
    \fi
}
\countdef\ChapNo = 0
\countdef\PageNo = 1
\def\FootLine{%
    \ifodd\PageNo
        \HboxR to \hsize{%
            \strut
            \hfil
            \bf \the\ChapNo--\the\PageNo
        }% 
    \else
        \HboxR to \hsize{%
            \strut
            \bf
            \the\ChapNo--\the\PageNo
            \hfil
        }% 
    \fi
}
\newbox\CropMarksBox
\setbox\CropMarksBox = \vbox{%
    \offinterlineskip
    \SetScale{1in}
    \SetLineThickness{0.5pt}
    \DrawHLine(-0.8,0){0.2}
    \DrawVLine(-0.7,-0.1){0.2}
    \DrawHLine(3.4,0){0.2}
    \DrawVLine(3.5,-0.1){0.2}
    \DrawHLine(-0.8,-6.5){0.2}
    \DrawVLine(-0.7,-6.6){0.2}
    \DrawHLine(3.4,-6.5){0.2}
    \DrawVLine(3.5,-6.6){0.2}
}
\ZeroBox{\CropMarksBox}
\def\SimpleOutputRoutine{%
    \ifodd\PageNo
        \dimen0 = \RightPageShift
    \else
        \dimen0 = \LeftPageShift
    \fi
    \shipout\vbox{%
        \offinterlineskip
        \copy\CropMarksBox
        \moveright\dimen0 \vbox{%
            \HeadLine
            \vskip 12pt
            \VboxR to \vsize{%
                \unvbox 255
            }
            \vskip 12pt
            \FootLine
        }
    }
    \global\advance\PageNo by 1
}
\def\OutputWithRules{%
    \output = {\SimpleOutputRoutine}%
}
\def\OutputWithoutRules{
    \output = {%
        \EliminateRuledBoxes
        \SimpleOutputRoutine
    }
}
\OutputWithoutRules