]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/mudela-book.py
release: 1.3.0
[lilypond.git] / scripts / mudela-book.py
index 97ca4acb055ce7f084607969a760bccde8271db2..59bde3bbd7dbd24d3c0f065c3d4050fed0c7492d 100644 (file)
@@ -421,7 +421,8 @@ def find_mudela_shorthands (b):
 
        def mudela_file (match):
                "Find \mudelafile, and substitute appropriate \begin / \end blocks."
-               str = find_file (match.group (2))
+               fn = match.group (2)
+               str = find_file (fn)
                opts = match.group (1)
                if opts:
                        opts = opts[1:-1]
@@ -429,16 +430,16 @@ def find_mudela_shorthands (b):
                else:
                        opts = []
 
-               if re.search ('.fly$', full_path):
+               if re.search ('.fly$', fn):
                        opts.append ('fly')
-               elif re.search ('.sly$', full_path):
+               elif re.search ('.sly$', fn):
                        opts = opts + [ 'fly','fragment']
-               elif re.search ('.ly$', full_path):
+               elif re.search ('.ly$', fn):
                        opts .append ('nofly')
                        
                str_opts = string.join (opts, ',')
 
-               str = ("%% copied from file `%s'\n" % full_path) + str 
+               str = ("%% copied from file `%s'\n" % fn) + str 
                return get_output ('output-mudela') % (str_opts, str)
   
        b = get_re('mudela-file').sub (mudela_file, b)
@@ -681,7 +682,7 @@ def compile_all_files (chunks):
                system ('lilypond %s %s' % (lilyopts, texfiles))
 
        for e in eps:
-               cmd = r"""tex %s; dvips -E -o %s %s""" % \
+               cmd = r"""tex '\nonstopmode \input %s'; dvips -E -o %s %s""" % \
                      (e, e + '.eps', e)
                system (cmd)