]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/book_latex.py
Lilypond-book: Implement MusicXML support in lilypond-book
[lilypond.git] / python / book_latex.py
index dfb6fc0ac741617c530ef69701a43a1eaa2790c9..8097443f7f320f01c858e2cac7af597eb6f1de66 100644 (file)
@@ -6,6 +6,11 @@ import os
 import book_base as BookBase
 from book_snippets import *
 import lilylib as ly
+global _;_=ly._
+
+progress = ly.progress
+warning = ly.warning
+error = ly.error
 
 # Recognize special sequences in the input.
 #
@@ -63,6 +68,17 @@ Latex_snippet_res = {
            (?P<filename>\S+?)
           })''',
 
+    'musicxml_file':
+         r'''(?smx)
+          ^[^%\n]*?
+          (?P<match>
+          \\musicxmlfile\s*(
+          \[
+           \s*(?P<options>.*?)\s*
+          \])?\s*\{
+           (?P<filename>\S+?)
+          })''',
+
     'singleline_comment':
          r'''(?mx)
           ^.*?
@@ -101,6 +117,7 @@ Latex_output = {
 
     OUTPUT: r'''{%%
 \parindent 0pt
+\noindent
 \ifx\preLilyPondExample \undefined
 \else
   \expandafter\preLilyPondExample