From f9b8c5cd66ae78b0d7303460c175ea544180221e Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:44:59 +0000 Subject: [PATCH] lilypond-1.1.13 --- init/GNUmakefile | 4 ++-- init/mudela-book-defs.py | 17 +++++++++++++++++ init/table11.ly | 2 +- init/table13.ly | 5 +---- init/table26.ly | 2 +- scripts/mudela-book.py | 27 ++++++++++++++------------- 6 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 init/mudela-book-defs.py diff --git a/init/GNUmakefile b/init/GNUmakefile index 105ca5fc69..1157e404da 100644 --- a/init/GNUmakefile +++ b/init/GNUmakefile @@ -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 index 0000000000..9348a8e9c4 --- /dev/null +++ b/init/mudela-book-defs.py @@ -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} +""" +} diff --git a/init/table11.ly b/init/table11.ly index 11cb57b9b1..b28e661056 100644 --- a/init/table11.ly +++ b/init/table11.ly @@ -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 diff --git a/init/table13.ly b/init/table13.ly index c57132ec46..78ae676aa5 100644 --- a/init/table13.ly +++ b/init/table13.ly @@ -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 diff --git a/init/table26.ly b/init/table26.ly index 07590b0353..76925b35bb 100644 --- a/init/table26.ly +++ b/init/table26.ly @@ -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 diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index 577f96cb58..98fb69f81e 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -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) -- 2.39.2