]> git.donarmstrong.com Git - lilypond.git/commitdiff
* tex/lily-ps-defs.tex (\lilypondsetdimen): Define ID macro.
authorWerner Lemberg <wl@gnu.org>
Mon, 21 Oct 2002 19:20:40 +0000 (19:20 +0000)
committerWerner Lemberg <wl@gnu.org>
Mon, 21 Oct 2002 19:20:40 +0000 (19:20 +0000)
(\lilypondpostscript): Define PS macros `lyscaleXXX' (`XXX' is the
scaling factor) only once and use them in the definition of
\embeddedps.
* ps/music-drawing-routines.ps (skeel): Removed.

ChangeLog
ps/music-drawing-routines.ps
tex/lily-ps-defs.tex

index de2be3b9c7926f830450af4868b047be8eda7268..b2992e93353a9997d68d572a81af7034c60931bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-21  Werner Lemberg  <wl@gnu.org>
+
+       * tex/lily-ps-defs.tex (\lilypondsetdimen): Define ID macro.
+       (\lilypondpostscript): Define PS macros `lyscaleXXX' (`XXX' is the
+       scaling factor) only once and use them in the definition of
+       \embeddedps.
+       * ps/music-drawing-routines.ps (skeel): Removed.
+
 2002-10-21  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * Documentation/topdocs/INSTALL.texi: Add note about using ksh for
index 9ca584665709ecfc7cdb7085be8eb9ed3a153ab8..4cee740b1b0fd740efc697bf30ea7e25210a576b 100644 (file)
@@ -4,9 +4,6 @@
 
 /blot-diameter { lilypondpaperblotdiameter } bind def
 
-% fucking redhat xdvi patch.
-/skeel { scale } bind def
-
 /set_tex_dimen {
        cvr def     
 } bind def
index 71e31e8aabc6aadcf9f58ddc710e51b82a66d6d2..8a4522a2e72048a8fe547e359ee2afc80d890ccf 100644 (file)
@@ -6,30 +6,46 @@
 % Header info (macros/defs, etc) should go into a \special{! ... };
 % note the ! sign.  See dvips.info for details.
 %
-% Escape the colon with \string to avoid problems with French while using
-% the Babel package.
+% We protect punctuation characters with \string to avoid problems with
+% language specific shorthands (e.g. `:' for French, `"' for German, etc.).
 
 \gdef\lilypondsetdimen#1{
-  \expandafter\special{
-    ! /#1 (\csname #1\endcsname) set_tex_dimen
+  \expandafter\gdef\csname #1ps\endcsname{}
+  \special{
+    \string!
+    /#1 (\csname #1\endcsname) set_tex_dimen
   }
 }
 
 \gdef\lilypondspace{ }
 
 \gdef\lilypondpostscript{
-  % This sets CTM so that you get to the currentpoint
-  % by executing a 0 0 moveto
+  % A document processed with lilypond-book can contain music fragments in
+  % different sizes.  To reduce overhead, we define `lyscaleXXX' PS macros
+  % only once.
+  \lilypondifundefined{lyscale\lilypondpaperoutputscale}
+    {
+      \expandafter\gdef\csname lyscale\lilypondpaperoutputscale\endcsname{}
+      % This sets CTM so that you get to the currentpoint
+      % by executing a 0 0 moveto
+      \special{
+        \string!
+        /lyscale\lilypondpaperoutputscale
+          {\lilypondpaperoutputscale\lilypondspace\scaletounit %
+           dup scale} def
+      }
+    }
+    {}
+                      
   \def\embeddedps##1{
     \special{
-      ps\string: @beginspecial @setspecial %
-                 \lilypondpaperoutputscale\lilypondspace\scaletounit %
-                 \lilypondpaperoutputscale\lilypondspace\scaletounit %
-                 % FUCKING REDHAT XDVI -- ARG!
-                 skeel ##1 @endspecial
-    }
+      \string"
+      lyscale\lilypondpaperoutputscale\lilypondspace ##1}
   }
-  \lilypondsetdimen{lilypondpaperblotdiameter}
+
+  \lilypondifundefined{lilypondpaperblotdiameterps}
+    {\lilypondsetdimen{lilypondpaperblotdiameter}}
+    {}
 }
 
 \gdef\lilypondexperimentalfeatures{}