PageRenderTime 36ms CodeModel.GetById 29ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/contrib/groff/tmac/psfig.tmac

https://bitbucket.org/freebsd/freebsd-head/
Unknown | 89 lines | 78 code | 11 blank | 0 comment | 0 complexity | 358a27198130e7f2bd644a7b24f1d8e3 MD5 | raw file
 1.\" psfig.tmac
 2.\"
 3.\" These are macros to make psfig work with groff.
 4.\" They require that psfig be patched as described in ../grops/psfig.diff.
 5.de psfig-defs
 6ps: mdef 100
 7
 8% wid ht llx lly urx ury psfigstart -
 9
10/psfigstart {
11	/level1 save def
12	/ury exch def
13	/urx exch def
14	/lly exch def
15	/llx exch def
16	/ht exch u def
17	/wid exch u def
18	currentpoint ht add translate
19	wid urx llx sub div ht ury lly sub div neg scale
20	llx neg lly neg translate
21
22	% set the graphics state to default values
23	0 setgray
24	0 setlinecap
25	1 setlinewidth
26	0 setlinejoin
27	10 setmiterlimit
28	[] 0 setdash
29	newpath
30	/showpage {} def
31} bind def
32
33% psfigclip -
34
35/psfigclip {
36	currentpoint newpath
37	llx lly moveto
38	urx lly lineto
39	urx ury lineto
40	llx ury lineto
41	closepath clip
42	newpath moveto
43} bind def
44
45% psfigend -
46
47/psfigend {
48	level1 restore
49} bind def
50
51% globalstart -
52
53/globalstart {
54	% save the current space code on the stack
55	SC
56	level0 restore
57} bind def
58
59% globalend -
60
61/globalend {
62	end
63	BP
64	/SC exch def
65	DEFS begin
66} bind def
67..
68.de psfig-init
69.if \\n[.P] \{\
70\Y[psfig-defs]
71.	br
72.	sp -1
73.	ds psfig-init\" empty
74.	rm psfig-defs
75.\}
76..
77.de F+
78.br
79.psfig-init
80.nr psfig-fill \\n[.u]
81.nf
82.sp -.5
83.if !\\n[.$] .ce 9999
84..
85.de F-
86.br
87.ce 0
88.if \\n[psfig-fill] .fi
89..