]> git.donarmstrong.com Git - lilypond.git/commitdiff
Lilypond-book: Get rid of lilyquote option, use quote instead
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 21 Aug 2011 14:30:26 +0000 (16:30 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 30 Aug 2011 15:34:16 +0000 (17:34 +0200)
The only difference between the lilyquote and quote options
so far was that with lilyquote the texinfo and doctitle
was outside the example block. We didn't use quote together
with those texinfo texts, so there is really no need to
have both.

Furthermore, those texinfo options were documented as 'obscure'
options, used internally for the lilypond documentation,
so this shouldn't break external scores, either.

python/book_snippets.py
python/book_texinfo.py

index a67b8b129e59f08599c243269bb8d25b659ffbe3..b13d4817575874bc6ed4f7ce8e84a39b75dc7b9a 100644 (file)
@@ -39,7 +39,6 @@ FILENAME = 'filename'
 FILTER = 'filter'
 FRAGMENT = 'fragment'
 LAYOUT = 'layout'
-LILYQUOTE = 'lilyquote'
 LINE_WIDTH = 'line-width'
 NOFRAGMENT = 'nofragment'
 NOGETTEXT = 'nogettext'
@@ -113,7 +112,6 @@ snippet_options = {
         INDENT: r'''indent = %(indent)s''',
         LINE_WIDTH: r'''line-width = %(line-width)s''',
         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''',
         NORAGGED_RIGHT: r'''ragged-right = ##f''',
     },
@@ -142,6 +140,8 @@ snippet_options = {
 
 
 def classic_lilypond_book_compatibility (key, value):
+    if key == 'lilyquote':
+        return (QUOTE, value)
     if key == 'singleline' and value == None:
         return (RAGGED_RIGHT, None)
 
@@ -422,8 +422,7 @@ class LilypondSnippet (Snippet):
         # all settings before writing them in the \paper block.
         if not LINE_WIDTH in self.option_dict:
             if not QUOTE in self.option_dict:
-                if not LILYQUOTE in self.option_dict:
-                    self.option_dict[LINE_WIDTH] = "#(- paper-width \
+                self.option_dict[LINE_WIDTH] = "#(- paper-width \
 left-margin-default right-margin-default)"
 
     def get_option_list (self):
index 6bda07a3f8f890603df077ae905fe055ef436a80..82b6db441941e91a994849d6f996a6ebf8b46cf0 100644 (file)
@@ -247,7 +247,7 @@ class BookTexinfoOutputFormat (BookBase.BookOutputFormat):
             rep['verb'] = snippet.verb_ly ()
             substr = self.output[VERBATIM] % rep
         substr += self.output_info (basename, snippet)
-        if LILYQUOTE in snippet.option_dict:
+        if (QUOTE in snippet.option_dict):
             substr = self.output[QUOTE] % {'str': substr}
         str += substr
 
@@ -255,9 +255,6 @@ class BookTexinfoOutputFormat (BookBase.BookOutputFormat):
 #                str += ('@tex\n' + self.output_latex () + '\n@end tex\n')
 #                str += ('@html\n' + self.output_html () + '\n@end html\n')
 
-        if QUOTE in snippet.option_dict:
-            str = self.output[QUOTE] % {'str': str}
-
         # need par after image
         str += '\n'