]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.48
authorfred <fred>
Tue, 26 Mar 2002 22:47:39 +0000 (22:47 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:47:39 +0000 (22:47 +0000)
Documentation/topdocs/index.tely
lily/font-metric.cc
scripts/ly2dvi.py

index 326173916e1b3b5d85ea8e58fde7a78978d6071a..a989d8ad21785e51189761c10b2cdd952d4789a1 100644 (file)
@@ -100,7 +100,9 @@ Sankey}, harpsichordist to the internet, is typesetting the complete
 by Scarlatti}. Jeff Covey, guitar player and overall nice guy, is
 putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the
 net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a
-large archive of public domain sheet music under construction.
+large archive of public domain sheet music under construction. Dirk
+Latterman also put some works <a
+href=http://www.alqualonde.de/lilypond.html>on the web</a>
 
 @html
 <a name="download">
index 1f54aa5eada1193fd11041769dc006bcfcd35cfe..f11483f8f092ee826a22f0c8a1b5e250caf906ff 100644 (file)
@@ -4,7 +4,8 @@
   source file of the GNU LilyPond music typesetter
   
   (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
+
+    Mats Bengtsson <matsb@s3.kth.se>  (the ugly TeX parsing in text_dimension)
  */
 
 #include <math.h>
@@ -22,23 +23,29 @@ Font_metric::text_dimension (String text) const
   for (int i = 0; i < text.length_i (); i++) 
     {
       
-      if (text[i]=='\\'
+      switch (text[i]
        {
-         for (i++; (i < text.length_i ()) && isalpha(text[i]); i++)
+       case '\\':
+         for (i++; (i < text.length_i ()) && !isspace(text[i]) 
+                && text[i]!='{' && text[i]!='}'; i++)
            ;
          // ugh.
          i--; // Compensate for the increment in the outer loop!
-       }
-      else
-       {
+         break;
+       case '{':  // Skip '{' and '}'
+       case '}':
+         break;
+       
+       default: 
          Box b = get_char ((unsigned char)text[i],false);
-
+         
          // Ugh, use the width of 'x' for unknown characters
          if (b[X_AXIS].length () == 0) 
            b = get_char ((unsigned char)'x',false);
          
          w += b[X_AXIS].length ();
          ydims.unite (b[Y_AXIS]);
+         break;
        }
     }
   if (ydims.empty_b ())
@@ -74,7 +81,6 @@ Font_metric::Font_metric (Font_metric const &)
 }
 
 
-
 Box 
 Font_metric::get_char (int, bool)const
 {
index 730273ea3cc0aa9a63fdba29d33545ce36c34501..e17b41b1f11c35fc5b21d13e39f808d09722b636 100644 (file)
@@ -245,8 +245,6 @@ class TeXOutput:
             pageheight = Props.get('pageheight')
             pagewidth = Props.get('pagewidth')
                                 
-        horizontalMarginArg =  ( (pagewidth - linewidth)/2 )   
-        verticalMarginArg =  ( (pageheight - textheight)/2  )
 
         top= r"""
 %% Creator: %s
@@ -265,16 +263,7 @@ class TeXOutput:
 %%\headheight9pt
 %%\headsep0pt
 %% Maybe this is too drastic, but let us give it a try.
-\headheight0pt
-\headsep2mm
-\footskip2mm
-%%
-%%\addtolength{\oddsidemargin}{-1cm} 
-%%\addtolength{\topmargin}{-1cm} 
-%%\setlength{\textwidth}{%s} 
-%%\setlength{\textheight}{%s} 
-%%
-\geometry{width=%spt, left=%spt, height=%spt, top=%spt} 
+\geometry{width=%spt, height=%spt,headheight=2mm,headsep=0pt,footskip=2mm} 
 \input lilyponddefs 
 \input titledefs 
 %s
@@ -286,9 +275,8 @@ class TeXOutput:
 \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%%
 \begin{document}
 """ % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
-        Props.get('language'), Props.get('pagenumber'), linewidth, textheight,
-        linewidth, horizontalMarginArg, textheight, verticalMarginArg,
-        Props.get('header') )
+        Props.get('language'), Props.get('pagenumber'), linewidth,
+        textheight, Props.get('header') )
         
         base, ext = os.path.splitext(file)
         this.__base = base