]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
remove bogus docstring.
[lilypond.git] / scripts / lilypond-book.py
index 17f42366e019daea5cbeef52674487ef449bedd4..c0ca09a5537a3aab397da096459f3d33a3d50219 100644 (file)
@@ -382,12 +382,10 @@ output_dict= {
 
        'latex': {
 
-               'output-lilypond-fragment' : r'''\begin[eps,singleline,%s]{lilypond}
-  \context Staff <
+               'output-lilypond-fragment' : r'''\begin[singleline,%s]{lilypond}
     \context Voice{
       %s
     }
-  >
 \end{lilypond}''',
                'output-filename' : r'''\verb+%s+:\\
 %% %s
@@ -405,7 +403,6 @@ output_dict= {
                'output-default-post': "\\def\postLilyPondExample{}\n",
                'output-default-pre': "\\def\preLilyPondExample{}\n",
                'usepackage-graphics': '\\usepackage{graphics}\n',
-               'output-eps': '\\noindent\\parbox{\\lilypondepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s}}',
                'output-noinline': r'''
 %% generated: %(fn)s.eps
 ''',
@@ -556,7 +553,7 @@ re_dict = {
        # why do we have distinction between @mbinclude and @include?
 
        'texi': {
-               'include':  '(?m)^[^%\n]*?(?P<match>@mbinclude[ \n\t]+(?P<filename>[^\t \n]*))',
+               'include':  '(?m)^[^%\n]*?(?P<match>@mbinclude\s+(?P<filename>\S*))',
                'input': no_match,
                'header': no_match,
                'preamble-end': no_match,
@@ -759,7 +756,7 @@ def scan_latex_preamble (chunks):
                if not m:
                        error ("Latex documents must start with a \documentclass command")
                if m.group (1):
-                       options = re.split (',[\n \t]*', m.group (1)[1:-1])
+                       options = re.split (r',\s*', m.group (1)[1:-1])
                else:
                        options = []
                if 'twocolumn' in options:
@@ -908,7 +905,10 @@ def make_lilypond_file (m):
                options = []
        (content, nm) = find_file (m.group ('filename'))
        options.append ("filename=%s" % nm)
-
+       (path, base) = os.path.split (nm)
+       
+       if path not in include_path:
+               include_path.append (path)
 
        return [('lilypond', content, options)]
        
@@ -1158,13 +1158,10 @@ def format_lilypond_block (chunk):
        if 'noinline' in opts:
                s = 'output-noinline'
        elif format == 'latex':
-               if 'eps' in opts:
-                       s = 'output-eps'
+               if 'quote' in opts:
+                       s = 'output-latex-quoted'
                else:
-                       if 'quote' in opts:
-                               s = 'output-latex-quoted'
-                       else:
-                               s = 'output-latex-noquote'
+                       s = 'output-latex-noquote'
        elif format == 'texi':
                if 'quote' in opts:
                        s = 'output-texi-quoted'