]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-book: make [relative] imply [fragment]
authorJohn Mandereau <john.mandereau@gmail.com>
Wed, 30 Apr 2008 19:23:23 +0000 (21:23 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Wed, 30 Apr 2008 19:23:23 +0000 (21:23 +0200)
Documentation/user/lilypond-book.itely
scripts/lilypond-book.py

index cfbae202ec7978384293bde034fb830758e1e5c3..4478c0d6cb8a93af87c00d25043989c9e3456a8f 100644 (file)
@@ -618,6 +618,10 @@ Set the amount by which the @code{quote} option indents a music snippet.
 Use relative octave mode.  By default, notes are specified relative to
 middle@tie{}C.  The optional integer argument specifies the octave of
 the starting note, where the default @code{1} is middle C.
+@code{relative} option only works when @code{fragment} option is set,
+so @code{fragment} is automatically implied by @code{relative},
+regardless of the presence of any @code{(no)fragment} option in the
+source.
 @end table
 
 LilyPond also uses @command{lilypond-book} to produce its own
index a57333e2338ac4b6a1e1b1b8f9af921b4395478a..f10e07c172633f19c4d273ee4c895a11f3a5fc1f 100644 (file)
@@ -991,6 +991,12 @@ class LilypondSnippet (Snippet):
             if k not in self.option_dict:
                 self.option_dict[k] = default_ly_options[k]
 
+        # RELATIVE does not work without FRAGMENT;
+        # make RELATIVE imply FRAGMENT
+        has_relative = self.option_dict.has_key (RELATIVE)
+        if has_relative and not self.option_dict.has_key (FRAGMENT):
+            self.option_dict[FRAGMENT] = None
+
         if not has_line_width:
             if type == 'lilypond' or FRAGMENT in self.option_dict:
                 self.option_dict[RAGGED_RIGHT] = None