FILTER = 'filter'
FRAGMENT = 'fragment'
LAYOUT = 'layout'
-LILYQUOTE = 'lilyquote'
LINE_WIDTH = 'line-width'
NOFRAGMENT = 'nofragment'
NOGETTEXT = 'nogettext'
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''',
},
def classic_lilypond_book_compatibility (key, value):
+ if key == 'lilyquote':
+ return (QUOTE, value)
if key == 'singleline' and value == None:
return (RAGGED_RIGHT, None)
self.option_dict[option] = None
- # If LINE_WIDTH is used without parameter, set it to default.
+ # Store if we have an explicit line-width given
has_line_width = self.option_dict.has_key (LINE_WIDTH)
if has_line_width and self.option_dict[LINE_WIDTH] == None:
has_line_width = False
del self.option_dict[LINE_WIDTH]
- # TODO: Can't we do that more efficiently (built-in python func?)
+ # Use default options (i.e. auto-detected line-width, etc)
for k in self.formatter.default_snippet_options:
if k not in self.option_dict:
self.option_dict[k] = self.formatter.default_snippet_options[k]
# 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):