]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.13
authorfred <fred>
Tue, 26 Mar 2002 21:44:59 +0000 (21:44 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:44:59 +0000 (21:44 +0000)
init/GNUmakefile
init/mudela-book-defs.py [new file with mode: 0644]
init/table11.ly
init/table13.ly
init/table26.ly
scripts/mudela-book.py

index 105ca5fc69c748d693f27e1e625dd065a15b8eb9..1157e404daf46cba6d660d7d2c765520338f1f7b 100644 (file)
@@ -3,8 +3,8 @@
 depth = ..
 
 INI_FILES = $(FLY_FILES) $(LY_FILES)
-SCM_FILES = $(wildcard *.scm)
-EXTRA_DIST_FILES = $(SCM_FILES)
+PY_FILES=$(wildcard *.py)
+EXTRA_DIST_FILES = $(SCM_FILES)  $(PY_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
 INSTALLATION_FILES=$(INI_FILES)
diff --git a/init/mudela-book-defs.py b/init/mudela-book-defs.py
new file mode 100644 (file)
index 0000000..9348a8e
--- /dev/null
@@ -0,0 +1,17 @@
+# Default mudela-book init-file
+{    'mudela': r"""
+\begin{mudela}[eps \fontoptions]
+    \maininput
+\end{mudela}
+""",
+    'mudelaRhythm': r"""
+\begin{mudela}[eps \fontoptions]
+\score{
+    \type RhythmicStaff{
+        \notes{\stemup \maininput}
+    }
+    \paper{linewidth = -1.\cm;}
+}
+\end{mudela}
+"""
+}
index 11cb57b9b1d325fc1b66e394659b2e81b19e7482..b28e661056d58567a9c0ccdce8da193cf61f3234 100644 (file)
@@ -47,7 +47,7 @@ table_eleven  = \symboltables {
 
     "bars" = \table {
        "empty" "emptybar"      0
-       ""      ""      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
+       ""      "emptybar"      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
        "|"     "maatstreep"    1       0.0\pt  0.64\pt         0.0\pt  20.0\pt
        "||"    "doublebar"     1               0.0\pt  5.0\pt  0.0\pt  20.0\pt
        "|."    "finishbar"     1               -5.0\pt 0.0\pt  0.0\pt  20.0\pt
index c57132ec4645faab1e00f255e7a6d7d449979215..78ae676aa50855adc05e2187f9177a3f58b9ed8c 100644 (file)
@@ -42,12 +42,9 @@ table_thirteen  = \symboltables {
                "1"     "rightalign"    1
        }
 
-
-
-
     "bars" = \table {
        "empty" "emptybar"      0
-       ""      ""      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
+       ""      "emptybar"      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
        "|"     "maatstreep"    1       0.0\pt  0.64\pt         0.0\pt  20.0\pt
        "||"    "doublebar"     1               0.0\pt  5.0\pt  0.0\pt  20.0\pt
        "|."    "finishbar"     1               -5.0\pt 0.0\pt  0.0\pt  20.0\pt
index 07590b035372e7a4b7da4203e8e11a46f1c1be72..76925b35bb4a7f2b8a3ed437fa7f2400de3fc52b 100644 (file)
@@ -47,7 +47,7 @@ table_twentysix  = \symboltables {
 
     "bars" = \table {
        "empty" "emptybar"      0
-       ""      ""      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
+       ""      "emptybar"      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
        "|"     "maatstreep"    1       0.0\pt  0.64\pt         0.0\pt  20.0\pt
        "||"    "doublebar"     1               0.0\pt  5.0\pt  0.0\pt  20.0\pt
        "|."    "finishbar"     1               -5.0\pt 0.0\pt  0.0\pt  20.0\pt
index 577f96cb58aa541af3aeabac755ee48db59c1de1..98fb69f81ea44b09d479f1904b0f080f90a787fc 100644 (file)
@@ -68,7 +68,7 @@ twocolumn_re = re.compile('\\\\twocolumn')
 onecolumn_re = re.compile('\\\\onecolumn')
 preMudelaExample_re = re.compile('\\\\def\\\\preMudelaExample')
 postMudelaExample_re = re.compile('\\\\def\\\\postMudelaExample')
-boundingBox_re = re.compile('%%BoundingBox: ([0-9]*) ([0-9]*) ([0-9]*) ([0-9]*)')
+boundingBox_re = re.compile('%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)')
 
 def file_exist_b(name):
     try: 
@@ -201,6 +201,7 @@ class Mudela_output:
         # 'tex' or 'eps'
         self.graphic_type = 'tex'
         self.code_type = 'unknown'
+        self.code_type_override = None
     def write (self, line):
         # match only if there is nothing but whitespace before \begin HACK
         if re.search('^\s*\\\\begin{mudela}', line):
@@ -221,9 +222,9 @@ class Mudela_output:
         else:
             optlist = []
         if 'fragment' in optlist:
-            print "warning: obsolete option: fragment"
-        if 'floating' in optlist:
-            print "warning: obsolete option: floating, change to eps"
+            self.code_type_override = 'fly'
+        if 'nonfragment' in optlist:
+            self.code_type_override = 'ly'
         if 'eps' in optlist:
             self.graphic_type = 'eps'
         for pt in fontsize_pt2i.keys():
@@ -248,14 +249,13 @@ class Mudela_output:
     def close (self):
         if self.code_type == 'unknown':
             self.code_type = 'fly'
-        if self.code_type == 'ly':
-            self.write_red_tape()
-            for l in self.__lines:
-                self.file.write(l)
-        else:
-            self.write_red_tape()
-            for l in self.__lines:
-                self.file.write(l)
+        if self.code_type_override:
+            self.code_type = self.code_type_override
+            print "override:", self.code_type_override
+        self.write_red_tape()
+        for l in self.__lines:
+            self.file.write(l)
+        if self.code_type == 'fly':
             self.file.write('}}')
             
         self.file.close()
@@ -329,6 +329,7 @@ class Tex_output:
             else:
                 file.write(line)
         file.close()
+
 class Tex_input:
     def __init__ (self, filename):
         for fn in [filename, filename+'.tex', filename+'.doc']:
@@ -393,7 +394,7 @@ class Tex_input:
                         else:
                             opts = ', '+opts
                         (start, rest) = string.split(line, r_mud.group(), 1)
-                        retlines.append(start+'\n')
+                        retlines.append(start)#+'\n')
                         v = string.split(defined_mudela_cmd[r_mud.groups()[0]], '\n')
                         for l in v[1:-1]:
                             l = re.sub(r'\\fontoptions', opts, l)