]> git.donarmstrong.com Git - lilypond.git/blob - tex/lily-ps-defs.tex
patch::: 1.1.2.jcn1: geile ps vixen enzode
[lilypond.git] / tex / lily-ps-defs.tex
1 %
2 % WARNING: don't leave blank lines in the PS-code; they are
3 % transformed into \par 
4 %
5
6 %
7 % header info (macros/defs, etc) should go into a \special{! ... }, 
8 % note the ! sign.  See dvips.info for details.
9 %
10
11 % Use of 
12 % /foo { operatorname } bind def
13 %
14 % ``compiles'' operatorname binding in the body of foo, making
15 % the code faster, and more reliable (less flexible)
16
17 % transplant a TeX dimension into the PS output.
18 \def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\the\csname #1\endcsname) deftexdimen}}
19
20 \def\turnOnPostScript{%
21 \special{!
22 % PS helper: convert (0.2pt) to the token 0.2
23 /settexdimen
24 {
25         /thestring exch def
26         thestring 0 thestring length 2 sub
27         getinterval
28         token
29         pop exch pop 
30 } def
31 %
32 /deftexdimen
33 {
34         settexdimen
35         def     
36 } def
37 }
38 \PSsetTeXdimen{staffrulethickness}
39 \PSsetTeXdimen{staffheight}
40 % urg, no dvips.info over here...
41 %\special{! \input lily.ps }
42 \special{!
43 (lily.ps) findlibfile 
44 {
45         exch pop //systemdict /run get exec
46
47
48         /undefinedfilename signalerror 
49 } ifelse
50 }
51 %
52 \def\embeddedps##1{%
53         % This sets CTM so that you get to the currentpoint
54         % by executing a 0 0 moveto
55         \special{ps: @beginspecial @setspecial ##1 @endspecial}       
56 }
57 %
58 %
59 %\PSsetTeXdimen{staffrulethickness}
60 %\PSsetTeXdimen{staffheight}
61 }
62
63 \def\turnOnExperimentalFeatures{%
64 \special{ps:
65 }}
66