]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
Add 'lilyquote' fragment option to lilypond-book
[lilypond.git] / scripts / lilypond-book.py
index ebe2efd1dd1797665f3bc8d18aab37f004234ddf..7084350d5ae668afa5142a1d609e099724bb6651 100644 (file)
@@ -188,6 +188,7 @@ INDENT = 'indent'
 LATEX = 'latex'
 LAYOUT = 'layout'
 LINE_WIDTH = 'line-width'
+LILYQUOTE = 'lilyquote'
 NOFRAGMENT = 'nofragment'
 NOINDENT = 'noindent'
 NOQUOTE = 'noquote'
@@ -510,6 +511,8 @@ ly_options = {
 
         QUOTE: r'''line-width = %(line-width)s - 2.0 * %(exampleindent)s''',
 
+        LILYQUOTE: r'''line-width = %(line-width)s - 2.0 * %(exampleindent)s''',
+
         RAGGED_RIGHT: r'''ragged-right = ##t''',
 
         PACKED: r'''packed = ##t''',
@@ -1250,11 +1253,14 @@ class Lilypond_snippet (Snippet):
 
         if VERBATIM in self.option_dict:
             verb = self.substring ('code')
-            str += (output[TEXINFO][VERBATIM] % vars ())
+            str += output[TEXINFO][VERBATIM] % vars ()
             if not QUOTE in self.option_dict:
                 str = output[TEXINFO][NOQUOTE] % vars ()
 
-        str += self.output_info ()
+        if LILYQUOTE in self.option_dict:
+            str += output[TEXINFO][QUOTE] % {'str':self.output_info ()}
+        else:
+            str += self.output_info ()
 
 #                str += ('@ifinfo\n' + self.output_info () + '\n@end ifinfo\n')
 #                str += ('@tex\n' + self.output_latex () + '\n@end tex\n')