]> git.donarmstrong.com Git - lilypond.git/blob - tex/lily-ps-defs.tex
Merge branch 'master' into lilypond/translation
[lilypond.git] / tex / lily-ps-defs.tex
1 %% lily-ps-defs.tex
2 %%
3 \edef\lilypsdefsELC{\the\endlinechar}%
4 \endlinechar -1\relax
5
6 %% Header info (macros/defs, etc) should go into a \special{! ... };
7 %% note the ! sign.  See dvips.info for details.
8 %%
9 %% We protect punctuation characters with \string to avoid problems with
10 %% language specific shorthands (e.g. `:' for French, `"' for German, etc.).
11
12 \gdef\lilypondsetdimen#1{
13   \expandafter\gdef\csname #1ps\endcsname{}
14   \special{
15     \string!
16     /#1 (\csname #1\endcsname) set_tex_dimen}}
17
18 \gdef\lilypondspace{ }
19
20 \gdef\lilypondpostscript{
21   %% A document processed with lilypond-book can contain music fragments in
22   %% different sizes.  To reduce overhead, we define `lyscaleXXX' PS macros
23   %% only once.
24   \lilypondifundefined{lyscale\lilypondpaperoutputscale}
25     {\expandafter\gdef\csname lyscale\lilypondpaperoutputscale\endcsname{}
26      %% This sets CTM so that you get to the currentpoint
27      %% by executing a 0 0 moveto
28      \special{
29        \string!
30        /lyscale\lilypondpaperoutputscale
31          {\lilypondpaperoutputscale\lilypondspace\scaletounit %
32           dup scale} def}}
33     {}
34                       
35   \def\embeddedps##1{
36     \special{
37       \string"
38       lyscale\lilypondpaperoutputscale\lilypondspace ##1}}}
39
40 \endlinechar \lilypsdefsELC
41 \endinput
42
43 %% end lily-ps-defs.tex