]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/span-bar.ly: smaller file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Jun 2003 22:28:09 +0000 (22:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Jun 2003 22:28:09 +0000 (22:28 +0000)
* input/test/markup.ly: remove

* scripts/lilypond-book.py: put printfilename in separate chunk,
so texidoc is printed after the filename.

17 files changed:
buildscripts/lys-to-tely.py
input/regression/+.ly
input/regression/beam-french.ly
input/regression/grace-dynamic.ly
input/regression/grace-nest4.ly
input/regression/grace-nest5.ly
input/regression/key-signature-scordatura.ly
input/regression/lyric-align.ly
input/regression/slur-attachment.ly
input/regression/spacing-loose.ly [deleted file]
input/regression/spacing-natural.ly [deleted file]
input/regression/spacing-tight.ly [deleted file]
input/regression/span-bar.ly
input/regression/stanza-number.ly
input/test/markup.ly [deleted file]
input/test/move-specific-text.ly
scripts/lilypond-book.py

index 9f2099b90b9b3d1a44b628f081481a74d4921c73..55becc827578c9e2bf7f1ed3562934422c4dddcb 100644 (file)
@@ -84,7 +84,7 @@ if files:
                
                s += "@lilypondfile[printfilename]{%s}" % n
                return s
-
+       files.sort ()
        s = s + string.join (map (lambda x: name2line (x), files), "\n")
        s = s + '\n@bye\n'
        f = "%s/%s.tely" % (dir, name)
index 8218afc2ea8d53e8adba4db215b58f3fa060c9f5..f7ee566dc12b6c799d2fb8235fff66864a83c345 100644 (file)
@@ -25,5 +25,5 @@ foollilypondbook = "
 }
 
 \score{
-\context Lyrics \lyrics { "." }
+\context Lyrics \lyrics { " " }
 }
index 0e978017cc30f4427cb4f42c59ea4de3a2765a43..f7fe947038da2ddbf71f9321b51b314211377442 100644 (file)
@@ -1,16 +1,20 @@
 \version "1.7.18"
 
 \header {
-    texidoc = "French style beaming. In french beaming, the stems do not go to the outer beams."
+
+    texidoc = "French style beaming. In french beaming, the
+    stems do not go to the outer beams."
+
 }
 
 \score { \notes
-\relative c'
+        \relative c'
         {
-            \property Voice.Beam \override #'french-beaming = ##t
-             c16-[ c c c]
-        c8-[ c16 c16 c8]
-        c8-[ c16 e16 g8]
+            \property Voice.Stem \override #'french-beaming = ##t
+            c16-[ c c c]
+            c8-[ c16 c16 c8]
+            c8-[ c16 e16 g8]
+        }
+     }
 
-    }}
-%% new-chords-done %%
\ No newline at end of file
+%% new-chords-done %%
index 25764bcffa8575a3e618296e712d77ce824a2594..eba3373849794ac1b26bf4e5e3209ebbcff481d5 100644 (file)
@@ -5,5 +5,10 @@
 texidoc="Dynamics on grace notes are small and behave nicely (don't crash into to main note)."
 }
  
- \score { \notes \context Voice {\grace {c'_\f} d e f g}}
+\score {
+     \notes \relative c'  \context Voice {\grace {c_\f} d, c'  f g}
+     \paper { raggedright =  ##t } 
+
+}
+
 %% new-chords-done %%
index 8a5cfb461ecb14cebdacb4ca3dfe844222b7a260..bffc916ee923394fd4d986c827881295a7b2a3df 100644 (file)
@@ -3,13 +3,15 @@
 texidoc = "Another combination of grace note nesting."
 }
 
-\score { \notes \context Voice {
+\score { \notes \context Voice \relative c'' {
 
     <
      { \grace  g32 f4 }
     >
     \grace c16 c2. \bar "|."
 }
+  \paper { raggedright = ##t }
+        
 }
 
 
index 9f17e0723802ae751d6da816860c8ae781cab00e..f6e7662f035bdbcef982baf427b9705e939953ab 100644 (file)
@@ -1,9 +1,11 @@
 \version "1.7.18"
 
 \score
-{ \notes {
+{ \notes \relative c'' {
      s2 <<f>>4
     \grace g e4
 }
+
+  \paper { raggedright = ##t }
 }
 %% new-chords-done %%
index c86a8ffc7d4ed215454f4707c9e7e22cf2eb1223..97990de6263e7ccfd759e0d72d315ff2704eef5a 100644 (file)
@@ -1,7 +1,7 @@
 \version "1.7.18"
 
 \header { texidoc = "Key signatures can be set per pitch
-individually. This can be done bby setting @code{Staff.keySignature}
+individually. This can be done by setting @code{Staff.keySignature}
 directly."
 
 }
index 996b630f32a8e117c1bce77c144674c22d19567a..83399492ad4b191b4e74670b1f9f3ee3f6bf4e56 100644 (file)
@@ -1,10 +1,13 @@
 \version "1.7.18"
 \header{
-  texidoc="Lyric alignment
+  texidoc="
 
-  Lyric alignment is adjustable both interms of alignment between stanzas and on notehead.
+  Lyric alignment is adjustable both in terms of alignment between
+  stanzas and on notehead.
 
-  If the property alignment is not set, there is automatic determination of alignment type based on punctuation. (ee lyric-phrasing.ly)
+  If the property alignment is not set, there is automatic
+  determination of alignment type based on punctuation. (see
+  lyric-phrasing.ly)
 
 "
 }
index 9e77e872002b678e083f590cc1b8ea321a14f8c8..40bc5b420eabc431cfe9cc36321dd3b23efddca7 100644 (file)
@@ -3,7 +3,7 @@
 \header{
 texidoc="
 Slurs should be attached to note heads, except when they would collide
-with beams.  Also see: ophee-slurs.
+with beams.  
 "
 }
 \score{
diff --git a/input/regression/spacing-loose.ly b/input/regression/spacing-loose.ly
deleted file mode 100644 (file)
index ba6c65c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-\version "1.7.18"
-
-\header{
-texidoc="
-Loose:
-"
-}
-\score {
-       \notes { \time 2/2 c'2 c'2 \time 2/2 }
-       \paper { linewidth = 5.0\cm
-       indent = 0.0
-       }
-}
-%% new-chords-done %%
diff --git a/input/regression/spacing-natural.ly b/input/regression/spacing-natural.ly
deleted file mode 100644 (file)
index ac48a17..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-\version "1.7.18"
-
-\header{
-texidoc="
-Natural:
-"
-}
-
-\score {
-       \notes { \time 2/2 c'2 c'2 \time 2/2 }
-       \paper { raggedright = ##t
-       indent = 0.0
-       }
-}
-
-%% new-chords-done %%
diff --git a/input/regression/spacing-tight.ly b/input/regression/spacing-tight.ly
deleted file mode 100644 (file)
index 9ebfc4e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\version "1.7.18"
-
-\header{
-texidoc="
-Even if a line is very tightly spaced, there will still be room
-between prefatory matter and the following notes.  The space after the
-prefatory is rigid.  In contrast, the space before the barline
-must stretch like the space within the measure.
-
-"
-}
-\score {
-       \notes { \time 2/2 f''2 c'2 \time 2/2 }
-       \paper { linewidth = 2.5 \cm
-       indent = 0.0
-       }
-}
-%% new-chords-done %%
index ccfe8b99b444ecad687b03be83e632316994914e..f7e080b23611711871a07207243985080519ad5f 100644 (file)
@@ -6,34 +6,19 @@ texidoc = "Span bars draw only in between staff bar lines, so setting those to t
 
 \score {
  \notes \relative c' \context StaffGroup = groupie <
-  \context Staff = SA { c1 c1 c1}
-  \context Lyrics = LA \lyrics <
-   { bla1 die bla }
-  >
-  \context Staff = SB { a1 a1 a1}
+ \context Staff = SB { a1 a1 a1}
   \context Lyrics = LB \lyrics <
    { bla1 die bla }
    { foo bar foo }
   >
   \context Staff = SC { f1 f1 f1}
-  \context Lyrics = LC \lyrics <
-   { bla1 die bla }
-   { foo bar foo }
-   { foo bar foo }
-  >
-  \context Staff = SD { d1 d1 d1}
-  \context Lyrics = LD \lyrics <
-   { bla1 die bla }
-   { foo bar foo }
-   { foo bar foo }
-   { foo bar foo }
-  >
  >
  \paper {
   \translator {
    \StaffContext
    BarLine \override #'transparent = ##t
   }
+  raggedright =##t 
  }
 }
 %% new-chords-done %%
index 4b980710239e16e49ea1addd56e72a8220b905d0..52c273d4256b40a1d3d676cb1bd12d495157d6de 100644 (file)
@@ -8,12 +8,13 @@ texidoc = "Stanza numbers may differ for the first and following systems."
     \context LyricsVoice
     \lyrics {
        \property LyricsVoice . stanza = "first"
-       \property LyricsVoice . stz =  \markup { "2" \super "nd"  }
+       \property LyricsVoice . stz =  \markup { "32" \super "nd"  }
        Foo1 Bar1
     }
     \notes { c''1 \break c''1 }
 >
 
+\paper { raggedright = ##t } 
 } 
 
 %% new-chords-done %%
diff --git a/input/test/markup.ly b/input/test/markup.ly
deleted file mode 100644 (file)
index 94fac78..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-\version "1.7.18"
-
-\header {
-  texidoc ="Test font selection and scm text markup
-"
-}
-
-
-\score{
-  \notes\relative c''{
-    \stemUp
-    a-"text"
-    b-"texta"
-    c-\markup \bold "textb"
-
-    d-\markup { "one" "two" "three" } |
-    e1-\markup { \column << \bold "one"
-    { "and" "there" "is" \override #'(font-family . number) "2" }
-       \italic "three" >> }
-    e2.
-    f4-\markup \teeny \number "3"
-    f2.
-    b4-\markup { "a" \hspace #-8 \raise #2 "b"  "c" }
-    b4-\markup { "1" \raise #-2 \hspace #-1 "2"  "3" }
-    d4-\markup { \column <<  "Violoncello" "    e" "Contrabasso" >> }
-    d4_\markup {\override #'(baseline-skip . 0.0)
-               \override #'(word-space . 1.5)
-               \column <<  "Violoncello" "    e" "Contrabasso" >> }
-
-    
-    g1-"ÅÖÄÜÇÕ"
-    c,,
-    c1 
-    
-    
-  }
-  \paper{
-                               %raggedright = ##t
-    fontenc = "T1"
-    \translator{
-      \ScoreContext
-      TextScript \override #'font-family = #'roman
-      TextScript \override #'font-shape = #'upright
-      TextScript \revert #'no-spacing-rods
-      TextScript \override #'direction = #1
-    }
-  }
-}
-%%% Local variables:
-%%% LilyPond-indent-level:2
-%%% End:
-%% new-chords-done %%
index fd59be909728e1705091a6eb27806f2f7e83d628..f1b9b68c4bf107aebd63d3a5208b09566b0b7812 100644 (file)
@@ -6,7 +6,7 @@
 \score {
   \notes\relative c''' {
     \property Voice.Stem \set #'direction = #1
-    \outputproperty #(make-text-checker "m.d.")
+    \outputproperty #(make-text-checker (make-simple-markup "m.d."))
       #'extra-offset = #'(-3.5 . -4.5)
     a^2^"m.d."
   }
index 981611d984702503d223f1d85007758a7325c38d..bb0e4476554b58abcf3641a31df1605bea8d9da5 100644 (file)
@@ -1,40 +1,54 @@
 #!@PYTHON@
 # vim: set noexpandtab:
-# TODO:
-# * junk --outdir for--output
-# * Figure out clean set of options.
-# *
-# * texinfo: add support for @pagesize
 
-# todo: dimension handling (all the x2y) is clumsy. (tca: Thats
-#       because the values are taken directly from texinfo.tex,
-#       geometry.sty and article.cls. Give me a hint, and I'll
-#       fix it.)
+"""
 
-#
-# TODO: magnification support should also work for texinfo -> html: eg. add as option to dvips.
-#
+  TODO:
+  * junk --outdir for--output
+  * Figure out clean set of options.
+  *
+  * texinfo: add support for @pagesize
 
+  todo: dimension handling (all the x2y) is clumsy. (tca: Thats
+        because the values are taken directly from texinfo.tex,
+        geometry.sty and article.cls. Give me a hint, and I'll
+        fix it.)
 
-#
-# This is a slightly hairy program. The general approach is as follows 
-# The input string is chopped up in chunks, i.e. ,  a list of tuples
-#
-#   with the format  (TAG_STR, MAIN_STR, OPTIONS, TODO, BASE)
-#
-# This list is build step by step: first ignore and verbatim commands are handled,
-# delivering a list of chunks.
-# 
-# then all chunks containing lilypnod commands are chopped up
-#
-# when all chunks have their final form, all bodies from lilypond blocks are 
-# extracted, and if applicable, written do disk and run through lilypond.
-# 
 
+  TODO: magnification support should also work for texinfo -> html: eg. add as option to dvips.
+
+
+
+  This is a slightly hairy program. The general approach is as follows 
+  The input string is chopped up in chunks, i.e. ,  a list of tuples
+
+    with the format  (TAG_STR, MAIN_STR, OPTIONS, TODO, BASE)
+
+  This list is built step by step: first ignore and verbatim commands
+  are handled, delivering a list of chunks.
+  
+  then all chunks containing lilypond commands are chopped up
+
+  when all chunks have their final form, all bodies from lilypond blocks are 
+  extracted, and if applicable, written do disk and run through lilypond.
+  
 
-# This is was the idea for handling of comments:
+tags supported
 
+  ignore
+  lilypond
+  input
+  verb
+  verbatim
+  multicols
+  numcols
+  
 
+
+
+"""
+
+#  This is was the idea for handling of comments:
 #      Multiline comments, @ignore .. @end ignore is scanned for
 #      in read_doc_file, and the chunks are marked as 'ignore', so
 #      lilypond-book will not touch them any more. The content of the
@@ -413,7 +427,8 @@ output_dict= {
        'texi' : {
 
 
-               'output-filename' : r'''@ifnothtml
+               'output-filename' : r'''
+@ifnothtml
 @file{%s}:@*
 @end ifnothtml
 @ifhtml
@@ -892,7 +907,9 @@ def make_lilypond_file (m):
        (content, nm) = find_file (m.group ('filename'))
        options.append ("filename=%s" % nm)
 
+
        return [('lilypond', content, options)]
+       
 
 def make_ly2dvi_block (m):
        '''
@@ -1021,10 +1038,15 @@ def schedule_lilypond_block (chunk):
        for the main file).  The .ly is written, and scheduled in
        TODO.
 
-       Return: a chunk (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE)
+       Return: multiple chunks.
 
-       TODO has format [basename, extension, extension, ... ]
+       The chunk pertaining to the lilypond output
+       has the format (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE), 
+       where TODO has format [basename, extension, extension, ... ]
        '''
+
+       return_chunks = []
+
        (type, body, opts) = chunk
        assert type == 'lilypond'
        file_body = compose_full_body (body, opts)
@@ -1068,6 +1090,7 @@ def schedule_lilypond_block (chunk):
                todo.append ('png')
        newbody = ''
 
+       filename_chunk = None 
        if 'printfilename' in opts:
                for o in opts:
                        m= re.match ("filename=(.*)", o)
@@ -1078,14 +1101,14 @@ def schedule_lilypond_block (chunk):
                                                  
                                ## todo: include path, but strip 
                                ## first part of the path.
-                               newbody = newbody + template % (human_base, b,human_base)
+                               filename_chunk = ('input',  template % (human_base, b,human_base))
                                break
 
 
        if 'smallverbatim' in opts:
-               newbody = newbody + output_verbatim (body, 1)
+               newbody += output_verbatim (body, 1)
        elif 'verbatim' in opts:
-               newbody = newbody + output_verbatim (body, 0)
+               newbody += output_verbatim (body, 0)
 
        for o in opts:
                m = re.search ('intertext="(.*?)"', o)
@@ -1115,7 +1138,13 @@ def schedule_lilypond_block (chunk):
        else: # format == 'html'
                s = 'output-html'
        newbody = newbody + get_output (s) % {'fn': basename }
-       return ('lilypond', newbody, opts, todo, basename)
+
+       if filename_chunk:
+               return_chunks += [filename_chunk]
+       
+       return_chunks += [('lilypond', newbody, opts, todo, basename)]
+       
+       return return_chunks
 
 
 
@@ -1124,13 +1153,15 @@ def process_lilypond_blocks (chunks):#ugh rename
        newchunks = []
        # Count sections/chapters.
        for c in chunks:
+               cs = []
                if c[0] == 'lilypond':
-                       c = schedule_lilypond_block (c)
+                       cs = schedule_lilypond_block (c)
                elif c[0] == 'numcols':
                        paperguru.m_num_cols = c[2]
                elif c[0] == 'multicols':
                        paperguru.m_multicols = c[2]
-               newchunks.append (c)
+               newchunks += cs
+               
        return newchunks
 
 def process_ly2dvi_blocks (chunks):
@@ -1400,9 +1431,7 @@ def do_file (input_filename):
        chunks = chop_chunks (chunks, 'preamble-end', do_preamble_end)
        chunks = chop_chunks (chunks, 'numcols', do_columns)
        chunks = chop_chunks (chunks, 'multicols', do_multicols)
-       #print "-" * 50
-       #for c in chunks: print "c:", c;
-       #sys.exit ()
+       
        scan_preamble (chunks)
        chunks = process_lilypond_blocks (chunks)
        chunks = process_ly2dvi_blocks (chunks)