blob: 131045ef8db4f19536970a2efc8e91180541f681 (
plain) (
blame)
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
|
%% This PostScript file centers the page on an A4 paper and draws a
%% crop marks. dvips is assumed.
%% DEBUG
%% /mydict 20 dict def mydict begin
%% Millimeter to postscript points:
/mm{ 25.4 div 72 mul }def
%% The size of the retangle is:
/papw 172 mm def
/paph 232 mm def
%% The text area size is:
%%/txtw{131 mm}def
%%/txth{285 mm}def
%% A4 size is:
/A4w 209 mm def
/A4h 296 mm def
%% Draw crop marks
/mkcrop{
0.3 setlinewidth
0 0 mkonecrop
papw 0 mkonecrop
0 paph mkonecrop
papw paph mkonecrop
} def
/mkonecrop{gsave
translate
newpath
0 18 moveto
0 -18 lineto
stroke
newpath
-18 0 moveto
18 0 lineto
stroke
grestore } def
%% Draw a frame
/mkframe{
gsave
0 A4h paph sub moveto
papw 0 rlineto
0 paph rlineto
papw neg 0 rlineto
0 paph neg rlineto
stroke
grestore
} def
/mkmarks{mk@MARKS@} def
/mkinfo{ gsave
72 68 moveto (Book: @BOOK@) show
72 60 moveto (Generated by dvips: @DATE@) show
72 52 moveto (Config spec: @CSFILE@) show
72 44 moveto (View: @VIEW@) show
72 36 moveto (User: @USER@) show
72 28 moveto (Latex: @LATEX@) show
72 20 moveto (@DOCBVSN@ @DOCB@) show
72 12 moveto (@DVIPSVSN@ @DVIPS@) show
288 68 moveto (Book build: @BOOKBUILD@) show
288 60 moveto (Build script: @BUILDSCRIPT@) show
grestore
} def
%% Beginning-of-page hook (the thing called by dvips):
/bop-hook{
gsave
/Helvetica findfont 7 scalefont setfont
gsave
A4w papw sub 2 div
A4h paph sub 2 div neg
translate
mkmarks
grestore
mkinfo
grestore
} def
%% DEBUG
%%/bop-hook
%%showpage
%%end
|