summaryrefslogtreecommitdiff
path: root/macros/generic/misc/cropmark.tex
blob: 3f04674e820362a63b4a009e6aa9a5439226e088 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
%% Save file as: CROPMARK.TEX                   Source: FILESERV@SHSU.BITNET
% Author: Peter Ungar <LAXA@ACFcluster.NYU.EDU>
% 
% CROPMARK MACROS FOR PLAIN TEX. Feb. 10, 1992 01:31 Peter Ungar 914 723 7187
% Cropmarks are markings on pages intended to be phototypeset. They mark the
% corners of the intended book page.
% THE DIMENSION SPECIFICATIONS (\paperheight,\paperwidth, \topmargin,
% \outsidemargin, \hsize, \vsize) SHOULD COME BEFORE THE MACROS. OTHERWISE
% THE CROPMARKS GO INTO ODD LOCATIONS. THESE QUANTITIES ARE ASSIGNED VALUES
% IN THIS FILE TO MAKE THE EXAMPLE WORK. REPLACE THE GIVEN VALUES BY THE
% ONES YOU NEED BEFORE INSTALLING THE MACROS. HSIZE IS THE LENGTH OF THE LINES
% AND VSIZE IS THE HEIGHT OF THE PRINTED PAGE NOT COUNTING HEADER OR FOOTER.
% \lefttopcropmark should be inserted at the beginning of the
% headline. It is a \llap and should not take space away from any other item
% in the headline. \righttopcropmark should be at the end of the headline.
% If there is no \hfil in the headline, use one to put the cropmark to
% the end of the headline. It is a \rlap and in theory it should not take
% space away
% from other items. Do not to put a space in front of \righttopcropmark be-
% cause the space will be typeset unless it is preceded by a control sequence.
% The bottom cropmarks should be inserted in the beginning and end of the
% \footline. Be sure to fill space in the middle with \hfil.
% Remember that the \footline definition has to come BEFORE the end of the
% first page.
% The values of \voffset and \hoffset can be adjusted to try to push the
% entire page including the cutmarks into the area your printer can print.
% The quantities you have to input are
% \paperheight, \paperwidth, \topmargin (measured from the top of the headline
% which is assumed to be 10-point size, and \outsidemargin which will be the
% right margin of odd-numbered pages and the left margin of even numbered
% pages. The other quantities which are needed are computed by the macros.
% The computations two empirical corrections.
% If the dimensions on your printout are slightly off, try over or under-
% stating the true dimensions of the above quantities.
% The macros ought to work for all values of \hsize and \vsize but if these
% are too large the cropmarks may not fit the area most printers can print.
% \nocropmarks replaces the cropmark macros by \relax (blanks). The cropmarks
% are needed only for phototypesetting and we may not want to see them on
% printout prepared for other purposes.
% TEX WILL NOT LET YOU KNOW IF YOU DID NOT ASSIGN A VALUE TO A DIMENSION.
% THAT MAY BE THE REASON IF YOU GET BIZARRE RESULTS. THE VALUES MUST COME
% BEFORE THE MACROS.

%\magnification 1042 %% Needed to get exact dimensions on the MacPlus screen.

\voffset=20mm\hoffset=15mm % Needed to bring cropmarks within printable area.
\overfullrule=0mm  % To prevent overfullrules being added to cropmarks
\newdimen\paperheight
\newdimen\paperwidth
\newdimen\topmargin
\newdimen\outsidemargin
\newdimen\insidemargin
\newdimen\leftmargin
\newdimen\rightmargin
\newdimen\topliftadjustment
\newdimen\bottomliftadjustment
\newdimen\topcropmarklift
\newdimen\bottomcropmarklift
\newdimen\leftsideskip
\newdimen\rightsideskip
\newdimen\bclifta
\newdimen\bcliftb

\vsize=182mm
\hsize=112mm
\paperheight=227.4mm     % These six quantities specify the margins.
\paperwidth=152.3mm      % The ones introduced below are either
\topmargin=14mm          % computed from these by the macros or they
\outsidemargin=25mm      % are auxiliary.

\topliftadjustment=2.6mm
\bottomliftadjustment=15.5mm
\insidemargin=\paperwidth
\advance\insidemargin by -\outsidemargin
\advance\insidemargin by -\hsize

\def\leftorright{\ifodd\pageno
\leftmargin=\insidemargin\rightmargin=\outsidemargin\else
\leftmargin=\outsidemargin\rightmargin=\insidemargin\fi
\leftsideskip=\leftmargin
\advance\leftsideskip by -4.05mm
\rightsideskip=\rightmargin
\advance\rightsideskip by -4.05mm}

\def\lefttopcropmark{{\parindent=0mm\llap{\vtop{
\hsize=\leftmargin
\vskip-\topliftadjustment
\vskip-\topmargin
\vrule height 0.05mm depth 4mm width 0.05mm
\vrule height 0.05mm depth0mm width 4mm
\hfill}}}}
\def\righttopcropmark{{\parindent=0mm\rlap{\vtop{\hsize=\rightmargin
\vskip-\topliftadjustment
\vskip-\topmargin
\hfill
\vrule height 0.05mm depth0mm width 4mm
\vrule height 0.05mm depth 4mm width 0.05mm
}}}}

\bottomcropmarklift=-\paperheight
\advance\bottomcropmarklift by\topmargin
\advance\bottomcropmarklift by\vsize
\advance\bottomcropmarklift by\bottomliftadjustment

\bclifta=\bottomcropmarklift
\advance\bclifta by 4mm
\bcliftb=\bottomcropmarklift
\advance\bcliftb by -0.05mm

\def\leftbottomcropmark{{\parindent=0mm\llap{
\hbox{\vrule height\bclifta depth -\bottomcropmarklift width 0.05mm
\vrule height \bottomcropmarklift depth -\bcliftb width 4mm
\hskip\leftsideskip}}}}

\def\rightbottomcropmark{{\parindent=0mm\rlap{\hbox{\hskip\rightsideskip
\vrule height \bottomcropmarklift depth -\bcliftb width 4mm
\vrule height\bclifta depth -\bottomcropmarklift width 0.05mm}}}}


\def\nocropmarks{\def\lefttopcropmark{\relax}  % THIS TURNS OFF CROPMARKS
\def\righttopcropmark{\relax}
\def\leftbottomcropmark{\relax}
\def\rightbottomcropmark{\relax}}
\endinput

% END OF THE MACROS.  AN EXAMPLE FOLLOWS. COMMENT OUT \endinput TO
% TYPESET IT.

\headline={\leftorright\lefttopcropmark\ifodd\pageno
\hfil HEADLINE\hfil\folio\else
\folio\hfil HEADLINE\hfil \fi
\righttopcropmark}
\footline={\leftorright\leftbottomcropmark
\hfil
\rightbottomcropmark}

\noindent Topliftadjustment=2.6mm bottomliftadjustment=15.5mm
\hfill H

\noindent paperheight=227.4mm  paperwidth=152.3mm

\noindent topmargin=14mm outsidemargin=25mm

\noindent vsize=182mm hsize=112mm

NOTE THAT THE DIMENSION SPECIFICATIONS MUST COME BEFORE THE MACROS.
\vfill
\noindent\line{Here is the bottom left corner. \hfil Bottom right is H}
\eject
\noindent\line{Here is the top left corner.\hfil Top right is H}
\vfill
\noindent\line{Here is the bottom left corner. \hfil Bottom right is H}
\eject
\end