]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.128
authorfred <fred>
Wed, 27 Mar 2002 00:48:47 +0000 (00:48 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:48:47 +0000 (00:48 +0000)
input/test/mark.ly
lily/mark-engraver.cc
scripts/ly2dvi.py

index f037d10dde416e2a43b6599babbfc5afaf24ac95..0222093bf12e7d3c20f1d166a2643ea988fdef0c 100644 (file)
@@ -4,12 +4,14 @@ global =  \notes {
   s1 | \mark "A";
   s1 | \mark ; 
   s1 | \mark "12";
+  s1 | \mark ; 
   s1 | \mark "A2";
+  s1 | \mark #'(music "scripts-segno") ; 
   s1
 }
 
 one =  \notes \relative c {
-  c''1 c c c c 
+  c''1 c c c c c c 
 }
 
 
index 4e8f1725dd9c3725e6e161fea203f99466573758..42dcb8751389ca182a071b85f4a64d56faaf147f 100644 (file)
@@ -149,51 +149,56 @@ Mark_engraver::create_grobs ()
        */
       
       SCM m = mark_req_l_->get_mus_property ("label");
-      if (!gh_string_p (m)) 
-       m =  get_property ("rehearsalMark");
-;
-      
-      if (gh_number_p (m))
-       {
-         int mark_count = gh_scm2int (m);
-         t = to_str (mark_count);
-         mark_count ++;
-         m = gh_int2scm (mark_count);
-       }
-      else if (gh_string_p (m))
+      if (gh_pair_p (m)) // markup text
+       text_p_->set_grob_property ("text",m);
+      else 
        {
-         t = ly_scm2string (m);
-         String next;
-         if (t.length_i ())
+         if (!gh_string_p (m)) 
+           m =  get_property ("rehearsalMark");
+         ;
+         
+         if (gh_number_p (m))
            {
-             char c = t[0];
-             c++;
-             next = to_str (c);
+             int mark_count = gh_scm2int (m);
+             t = to_str (mark_count);
+             mark_count ++;
+             m = gh_int2scm (mark_count);
+           }
+         else if (gh_string_p (m))
+           {
+             t = ly_scm2string (m);
+             String next;
+             if (t.length_i ())
+               {
+                 char c = t[0];
+                 c++;
+                 next = to_str (c);
+               }
+             m = ly_str02scm (next.ch_C());
+           }
+         else
+           {
+             m = gh_int2scm (1);
            }
-         m = ly_str02scm (next.ch_C());
-       }
-      else
-       {
-         m = gh_int2scm (1);
-       }
          
-      daddy_trans_l_->set_property ("rehearsalMark", m);
-
-      
-      text_p_->set_grob_property ("text",
-                                ly_str02scm ( t.ch_C()));
+         daddy_trans_l_->set_property ("rehearsalMark", m);
+         
+         text_p_->set_grob_property ("text",
+                                     ly_str02scm ( t.ch_C()));
 
-      String style = "mark";
-      for (int i=0; i < t.length_i(); i++)
-       {
-         if (!isdigit(t[i])) 
+         String style = "mark";
+         for (int i=0; i < t.length_i(); i++)
            {
-             style = "large";
-             break;
+             if (!isdigit(t[i])) 
+               {
+                 style = "large";
+                 break;
+               }
            }
+         SCM st = ly_symbol2scm (style.ch_C());
+         text_p_->set_grob_property ("font-style",  st);
        }
-      SCM st = ly_symbol2scm (style.ch_C());
-      text_p_->set_grob_property ("font-style",  st);
+
     }
 }
 
index 704efe84ee5c775c82cb39925b16eacf5dd967cf..165e63b142e259a57ac12b356f25dacaea46d8d4 100644 (file)
@@ -7,7 +7,7 @@
 # * (c) on page 1
 # * more helpful info on lily crashes
 # * Should use files in /tmp/ only.  This potentially messes with
-# usergenerated files in the CWD
+# user generated files in the CWD
 
 
 """
@@ -25,8 +25,6 @@ Output: DVI file
 
 name = 'ly2dvi'
 version = '@TOPLEVEL_VERSION@'
-if version == '@' + 'TOPLEVEL_VERSION' + '@':
-       version = '(unknown version)'           # uGUHGUHGHGUGH
 errorlog = ''
 
 import sys
@@ -147,6 +145,7 @@ class Input:
             #   ------              ----------
             ( 'language',         Props.setLanguage ),
             ( 'latexheaders',     Props.setHeader ),
+            ( 'latexpackages',    Props.setPackages ),
             ( 'paperorientation', Props.setOrientation ),
             ( 'paperpapersize',   Props.setPaperZize ),
             ( 'papertextheight',  Props.setTextHeight ),
@@ -261,7 +260,6 @@ class TeXOutput:
 \usepackage[latin1]{inputenc} 
 %%\usepackage[T1]{fontenc} 
 %%
-%s 
 %% don not waste unused space at bottom of page
 %% (unless we have footnotes ...)
 %%\headheight9pt
@@ -276,10 +274,11 @@ class TeXOutput:
 %% UGR.
 %%\renewcommand{\@evenhead}{eve!{\small\lilypondinstrument{,}\quad\textbf{\thepage}}\hfil}%%
 \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%%
+%s
 \begin{document}
 """ % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
-        Props.get('language'), Props.get('pagenumber'), Props.get('linewidth'),
-        textheightsetting, Props.get('orientation'), Props.get('header') )
+        Props.get('language'), Props.get('linewidth'), textheightsetting, 
+        Props.get('orientation'), Props.get('header'), Props.get('pagenumber'))
         
         base, ext = os.path.splitext(file)
         this.__base = base
@@ -574,6 +573,7 @@ class Properties:
             ( 'KEEPLY2DVI',     this.setKeeply2dvi ),
             ( 'LANGUAGE',       this.setLanguage ),
             ( 'LATEXHF',        this.setHeader ),
+            ( 'LATEXPKG',       this.setPackages ),
             ( 'LILYINCLUDE',    this.setInclude ),
             ( 'LILYPONDPREFIX', this.setRoot ),
             ( 'NONUMBER',       this.setNonumber ),
@@ -822,7 +822,13 @@ class Properties:
     # Set latex header name
     #
     def setHeader(this,head, requester):
-       this.__set('header','\\input{' + head + '}',requester)
+       this.__set('header','\\input{' + head + '}'+this.get('header'),requester)
+
+    #
+    # Set latex package name
+    #
+    def setPackages(this,pkgs, requester):
+       this.__set('header','\\usepackage{' + pkgs + '}'+this.get('header'),requester)
 
     #
     # Set or Clear Dependencies flag to generate makefile dependencies