From: fred Date: Wed, 27 Mar 2002 02:05:51 +0000 (+0000) Subject: lilypond-1.5.34 X-Git-Tag: release/1.5.59~314 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=67d59dde6e2b1ced3816faaca8aad89ba117ce0c;p=lilypond.git lilypond-1.5.34 --- diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 0dd22f2f2e..bda53f7212 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -4,7 +4,7 @@ NAME = documentation SUBDIRS=user bibliography pictures topdocs misc windows STEPMAKE_TEMPLATES=documentation texinfo tex LOCALSTEPMAKE_TEMPLATES=lilypond ly - +LILYPOND_BOOK_FLAGS=--extra-options '-e "(set-lily-option (quote internal-type-checking) \#t)"' README_TOP_FILES=NEWS DEDICATION CHANGES EXTRA_DIST_FILES= diff --git a/lily/bar.cc b/lily/bar.cc index 7ad1f12693..a390189a92 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -153,7 +153,7 @@ Bar::before_line_breaking (SCM smob) if (!gh_string_p (g)) { - me->set_grob_property ("molecule-callback", SCM_BOOL_T); + me->set_grob_property ("molecule-callback", SCM_EOL); me->set_extent_callback (SCM_EOL, X_AXIS); // leave y_extent for spanbar? } diff --git a/lily/grob.cc b/lily/grob.cc index e9025beb46..4077188023 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -168,10 +168,15 @@ Grob::set_immutable_grob_property (SCM s, SCM v) } #endif - void Grob::internal_set_grob_property (SCM s, SCM v) { +#ifndef NDEBUG + if (internal_type_checking_global_b) + assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?"))); +#endif + + mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v); } @@ -818,6 +823,9 @@ ly_set_grob_property (SCM elt, SCM sym, SCM val) return SCM_UNSPECIFIED; } + if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) + return SCM_UNSPECIFIED; + if (sc) { sc->internal_set_grob_property (sym, val); diff --git a/lily/include/main.hh b/lily/include/main.hh index 69cc315faf..0fadb2524a 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -31,6 +31,8 @@ extern String output_name_global; extern bool safe_global_b; extern bool verbose_global_b; extern bool store_locations_global_b; +extern bool internal_type_checking_global_b; + /* misc */ extern All_font_metrics *all_fonts_global_p; diff --git a/lily/item.cc b/lily/item.cc index e92ac8ac90..b07210f8bc 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -173,7 +173,7 @@ Item::handle_prebroken_dependencies () set_extent_callback (SCM_EOL, Y_AXIS); } else if (trans) - set_grob_property ("molecule-callback", SCM_BOOL_T); + set_grob_property ("molecule-callback", SCM_EOL); } } diff --git a/lily/main.cc b/lily/main.cc index d1158824c1..37d8dfff9e 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -103,8 +103,8 @@ static Getopt_long *oparser_p_static = 0; follow regular localisation guidelines). */ static Long_option_init options_static[] = { - /* print example usage: lilypond -e "(set-lily-option 'help 0)" ? */ - {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")}, + /* print example usage: lilypond -e "" ? */ + {_i ("EXPR"), "evaluate", 'e',_i ("Scheme options: try -e \"(set-lily-option 'help 0)\" for more help.")}, /* another bug in option parser: --output=foe is taken as an abbreviation for --output-format */ {_i ("EXT"), "format", 'f', _i ("use output format EXT (tex [default], pdftex, ps, scm or as)")}, diff --git a/lily/music.cc b/lily/music.cc index 597afc58b2..b00c8519d6 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -6,6 +6,7 @@ (c) 1997--2002 Han-Wen Nienhuys */ +#include "main.hh" #include "input-smob.hh" #include "music.hh" #include "music-list.hh" @@ -167,9 +168,16 @@ Music::internal_get_mus_property (SCM sym) const } + void Music::internal_set_mus_property (SCM s, SCM v) { +#ifndef NDEBUG + if (internal_type_checking_global_b) + assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?"))); +#endif + + mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v); } @@ -238,7 +246,7 @@ ly_set_mus_property (SCM mus, SCM sym, SCM val) } - bool ok = type_check_assignment (val, sym, ly_symbol2scm ("music-type?")); + bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?")); if (ok) { sc->internal_set_mus_property (sym, val); diff --git a/lily/scm-option.cc b/lily/scm-option.cc index 5e38876b0d..2eac1482ac 100644 --- a/lily/scm-option.cc +++ b/lily/scm-option.cc @@ -33,7 +33,10 @@ bool midi_debug_global_b; /* General purpose testing flag */ int testing_level_global; - +/* + crash if internally the wrong type is used for a grob property. + */ +bool internal_type_checking_global_b; /* @@ -59,15 +62,22 @@ set_lily_option (SCM var, SCM val) */ if (var == ly_symbol2scm ("help")) { - cout << '\n'; - cout << _ ("Scheme options:"); - cout << '\n'; - cout << " help (any-symbol)"; - cout << '\n'; - cout << " midi-debug (boolean)"; - cout << '\n'; - cout << " testing-level (int)"; - cout << '\n'; + cout << _("lilypond -e EXPR means + +evalute EXPR as Scheme after init.scm has been read. In particular, +the function set-lily-option allows for access to some internal +variables. Usage: + + (set-lily-option SYMBOL VAL) + +possible options for SYMBOL are : +")<translate_axis (-0.8, X_AXIS); // ugh - else if (gh_symbol_p (gl) && gl == ly_symbol2scm ("bracket") - && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket")) + else if (gh_string_p (gl) && gh_equal_p (gl, ly_symbol2scm ("bracket")) + && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_symbol2scm ("bracket"))) { inf.grob_l_->translate_axis ( -0.8, X_AXIS); // ugh inf.grob_l_->set_grob_property ("arch-height", @@ -71,7 +71,7 @@ System_start_delimiter_engraver::System_start_delimiter_engraver () void System_start_delimiter_engraver::initialize () { - SCM delim_name =get_property ("SystemStartDelimiter"); + SCM delim_name =get_property ("systemStartDelimiter"); delim_ = new Spanner (internal_get_property (delim_name)); delim_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); @@ -91,5 +91,5 @@ ENTER_DESCRIPTION(System_start_delimiter_engraver, /* descr */ "creates a system start delimiter (ie. SystemStart@{Bar,Brace,Bracket@} spanner", /* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket", /* acks */ "system-start-delimiter-interface staff-symbol-interface", -/* reads */ "", +/* reads */ "systemStartDelimiter", /* write */ ""); diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index e2c4f02d87..b526caebb8 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -84,8 +84,8 @@ System_start_delimiter::after_line_breaking (SCM smob) { Grob * me = unsmob_grob (smob); SCM gl = me->get_grob_property ("glyph"); - - if (scm_ilength (me->get_grob_property ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line")) + + if (scm_ilength (me->get_grob_property ("elements")) <= 1 && gh_equal_p (gl,ly_str02scm ("bar-line"))) { me->suicide (); } diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 411cbc07da..4d03ac6ea3 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -111,13 +111,6 @@ Volta_engraver::process_music () { end_volta_span_p_ = volta_span_p_; volta_span_p_ =0; - - /* - maybe do typeset_grob () directly? - */ - - if (!gh_string_p (start_str_)) - end_volta_span_p_->set_grob_property ("last-volta", SCM_BOOL_T); } if (gh_string_p (start_str_) && volta_span_p_) diff --git a/make/ly-rules.make b/make/ly-rules.make index 81cb51cb6d..2f5b494235 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -5,19 +5,20 @@ $(outdir)/%.latex: %.doc rm -f $@ - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES)\ +$(LILYPOND_BOOK_FLAGS) --dependencies --outdir=$(outdir) $< chmod -w $@ # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --srcdir builds $(outdir)/%.texi: %.tely rm -f $@ - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $(LILYPOND_BOOK_FLAGS) $< chmod -w $@ $(outdir)/%.texi: $(outdir)/%.tely rm -f $@ - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $(LILYPOND_BOOK_FLAGS) $< rm -f $< chmod -w $@ @@ -25,7 +26,7 @@ $(outdir)/%.texi: $(outdir)/%.tely # for plain info doco: don't run lily $(outdir)/%.nexi: %.tely rm -f $@ - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $(LILYPOND_BOOK_FLAGS) $< mv $(@D)/$(*F).texi $@ chmod -w $@ diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index e3c781c1bc..57c77912b4 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -28,17 +28,17 @@ ("||:" . ("||" . "|:")) ("|" . ("|" . "")) ("||:" . ("||" . "|:")) - ("|s" . (nil . "|")) + ("|s" . (() . "|")) ("|:" . ("|" . "|:")) - ("|." . ("|." . nil)) - (".|" . (nil . ".|")) - (":|" . (":|" . nil)) - ("||" . ("||" . nil)) - (".|." . (".|." . nil)) + ("|." . ("|." . ())) + (".|" . (() . ".|")) + (":|" . (":|" . ())) + ("||" . ("||" . ())) + (".|." . (".|." . ())) ("" . ("" . "")) - ("empty" . ("nil" . nil)) - ("brace" . (nil . "brace")) - ("bracket" . (nil . "bracket")) + ("empty" . ("()" . ())) + ("brace" . (() . "brace")) + ("bracket" . (() . "bracket")) ) ))) @@ -57,15 +57,13 @@ ;; See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147 ;; -;; documentme: difference between extra-space and minimum-space - -;; documentme: difference between extra-space and minimum-space +;; documentme: difference between extra-space and minimum-space-pair ;; (Measured in staff space) (define default-break-align-space-alist '( - ((Staff_bar Custos) . (minimum-space 2.0)) - ((Custos begin-of-note) . (minimum-space 0.0)) + ((Staff_bar Custos) . (minimum-space-pair 2.0)) + ((Custos begin-of-note) . (minimum-space-pair 0.0)) ((none Instrument_name) . (extra-space 1.0)) ((Instrument_name Left_edge_item) . (extra-space 1.0)) ((Left_edge_item Clef_item) . (extra-space 1.0)) @@ -75,29 +73,29 @@ ((Left_edge_item Staff_bar) . (extra-space 0.0)) ; ((none Left_edge_item) . (extra-space -15.0)) ; ((none Left_edge_item) . (extra-space -15.0)) - ((none Clef_item) . (minimum-space 1.0)) - ((none Staff_bar) . (minimum-space 0.0)) - ((none Clef_item) . (minimum-space 1.0)) - ((none Key_item) . (minimum-space 0.5)) + ((none Clef_item) . (minimum-space-pair 1.0)) + ((none Staff_bar) . (minimum-space-pair 0.0)) + ((none Clef_item) . (minimum-space-pair 1.0)) + ((none Key_item) . (minimum-space-pair 0.5)) ((none Time_signature) . (extra-space 0.0)) - ((none begin-of-note) . (minimum-space 1.5)) - ((Clef_item Key_item) . (minimum-space 4.0)) + ((none begin-of-note) . (minimum-space-pair 1.5)) + ((Clef_item Key_item) . (minimum-space-pair 4.0)) ((Key_item Time_signature) . (extra-space 1.0)) - ((Clef_item Time_signature) . (minimum-space 3.5)) - ((Staff_bar Clef_item) . (minimum-space 1.0)) - ((Clef_item Staff_bar) . (minimum-space 3.7)) - ((Time_signature Staff_bar) . (minimum-space 2.0)) + ((Clef_item Time_signature) . (minimum-space-pair 3.5)) + ((Staff_bar Clef_item) . (minimum-space-pair 1.0)) + ((Clef_item Staff_bar) . (minimum-space-pair 3.7)) + ((Time_signature Staff_bar) . (minimum-space-pair 2.0)) ((Key_item Staff_bar) . (extra-space 1.0)) - ((Staff_bar Time_signature) . (minimum-space 1.5)) + ((Staff_bar Time_signature) . (minimum-space-pair 1.5)) ((Time_signature begin-of-note) . (extra-space 2.0)) ((Key_item begin-of-note) . (extra-space 2.5)) ((Staff_bar begin-of-note) . (extra-space 1.0)) - ((Clef_item begin-of-note) . (minimum-space 5.0)) - ((Left_edge_item Breathing_sign) . (minimum-space 0.0)) - ((none Breathing_sign) . (minimum-space 0.0)) - ((Breathing_sign Key_item) . (minimum-space 1.5)) - ((Breathing_sign begin-of-note) . (minimum-space 1.0)) - ((Breathing_sign Staff_bar) . (minimum-space 1.5)) - ((Breathing_sign Clef_item) . (minimum-space 2.0)) + ((Clef_item begin-of-note) . (minimum-space-pair 5.0)) + ((Left_edge_item Breathing_sign) . (minimum-space-pair 0.0)) + ((none Breathing_sign) . (minimum-space-pair 0.0)) + ((Breathing_sign Key_item) . (minimum-space-pair 1.5)) + ((Breathing_sign begin-of-note) . (minimum-space-pair 1.0)) + ((Breathing_sign Staff_bar) . (minimum-space-pair 1.5)) + ((Breathing_sign Clef_item) . (minimum-space-pair 2.0)) ) ) diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 0ce17a0706..02bfd0d36d 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -667,9 +667,8 @@ (meta . ,(grob-description sustain-pedal-interface side-position-interface font-interface)) )) - ;; TODO: should split in 3 (SystemStartBrace . ( - (glyph . brace) + (glyph . "brace") (molecule-callback . ,System_start_delimiter::brew_molecule) (collapse-height . 5.0) (font-family . braces) @@ -679,7 +678,7 @@ (SystemStartBracket . ( (Y-extent-callback . #f) (molecule-callback . ,System_start_delimiter::brew_molecule) - (glyph . bracket) + (glyph . "bracket") (arch-height . 1.5) (arch-angle . 50.0) (arch-thick . 0.25) @@ -691,7 +690,7 @@ (SystemStartBar . ( (Y-extent-callback . #f) (molecule-callback . ,System_start_delimiter::brew_molecule) - (glyph . bar-line) + (glyph . "bar-line") (thickness . 1.6) (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking) (meta . ,(grob-description system-start-delimiter-interface )) @@ -824,5 +823,8 @@ ;; make sure that \property Foo.Bar =\turnOff doesn't complain -(map (lambda (x) (set-object-property! (car x) 'translator-type? list?)) +(map (lambda (x) + ; (display (car x)) (newline) + + (set-object-property! (car x) 'translation-type? list?)) all-grob-descriptions) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index 4231dfe19d..b64817cf61 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -21,8 +21,6 @@ (set! all-backend-properties (cons symbol all-backend-properties)) ) - - ;; put this in an alist? (grob-property-description 'X-extent-callback procedure? "procedure taking an grob and axis argument, returning a number-pair. The return value is the extent of the grob.") @@ -177,7 +175,7 @@ is used by @ref{note-collision-interface}.") (grob-property-description 'fraction number-pair? "fraction of a time signature.") (grob-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.") -(grob-property-description 'glyph symbol? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. .") +(grob-property-description 'glyph string? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. .") (grob-property-description 'glyph-name string? "a name of character within font.") (grob-property-description 'gap number? "Size of a gap in a variable symbol.") @@ -205,7 +203,9 @@ For text, this is `relative'(?) to the current alignment. For barline, space after a thick line.") (grob-property-description 'layer number? "The output layer [0..2]. The default is 1.") + (grob-property-description 'left-padding number? "space left of accs.") + (grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.") (grob-property-description 'lengths list? "Stem length given multiplicity of flag.") (grob-property-description 'line-count integer? "Number of staff @@ -220,6 +220,7 @@ and will have no effect. (grob-property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.") (grob-property-description 'maximum-length number? "don't make Grob longer than this") (grob-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.") +(grob-property-description 'measure-count integer? "number of measures for a multimeasure rest.") (grob-property-description 'merge-differently-dotted boolean? " Merge noteheads in collisions, even if they have a different number of dots. This normal notation for some types of polyphonic music. The value of this setting is used by @ref{note-collision-interface} .") (grob-property-description 'minimum-distance number? "minimum distance between notes and rests.") (grob-property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs).") @@ -236,9 +237,14 @@ Also works as a scaling parameter for the length of hyphen. .") FIXME: also pair? (cons LEFT RIGHT) ") +(grob-property-description 'minimum-space-pair number-pair? " +? (cons LEFT RIGHT) + +") (grob-property-description 'minimum-width number? "minimum-width of rest symbol, in staffspace.") (grob-property-description 'molecule-callback procedure? "Function taking grob as argument, returning a Scheme encoded Molecule.") +(grob-property-description 'molecule molecule? "Cached output of the molecule-callback.") (grob-property-description 'new-accidentals list? "list of (pitch, accidental) pairs.") (grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).") @@ -267,18 +273,19 @@ as a real penalty.") (grob-property-description 'right-padding number? "space right of accs.") (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.") (grob-property-description 'script-priority number? "A sorting key that determines in what order a script is within a stack of scripts.") -(grob-property-description 'self-alignment-X number? "real number: -1 = +(grob-property-description 'self-alignment-X number-or-grob? "real number: -1 = left aligned, 0 = center, 1 right-aligned in X direction. Set to an grob pointer, if you want that grob to be the center. In this case, the center grob should have this object as a reference point. -.") + +TODO: revise typing.") (grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.") (grob-property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.") (grob-property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.") (grob-property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.") -(grob-property-description 'side-support list? "the support, a list of grobs.") +(grob-property-description 'side-support-elements list? "the support, a list of grobs.") (grob-property-description 'slope number? "some kind of slope") (grob-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.") (grob-property-description 'solid boolean? "should porrectus be solidly filled?.") @@ -294,7 +301,7 @@ itself. Return value is ignored.") (grob-property-description 'stacking-dir dir? "stack contents of grobs in which direction ?.") (grob-property-description 'staff-space number? "Amount of line leading relative to global staffspace.") (grob-property-description 'staff-position number? "vertical position in staff spaces, counted from the middle line.") -(grob-property-description 'staff-symbol boolean? "the staff symbol grob that we're in.") + (grob-property-description 'staffline-clearance number? "don't get closer than this to stafflines.") (grob-property-description 'stem ly-grob? "pointer to Stem object.") (grob-property-description 'stem-attachment-function procedure? "Where @@ -376,6 +383,7 @@ The following abbreviations are currently defined: (grob-property-description 'thickness number? "thickness, measured in stafflinethickness.") (grob-property-description 'thin-kern number? "space after a hair-line.") (grob-property-description 'forced-distance number? "forced distance for an alignment.") + (grob-property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace.") (grob-property-description 'transparent boolean? "This is almost the same as setting molecule-callback to #f, but this retains the @@ -403,3 +411,24 @@ function of type (beam multiplicity dy staff-line-thickness) -> real. Default v (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.") (grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.") (grob-property-description 'y number? "set by beam: position of left edge.") + + +;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;; INTERNAL + +(grob-property-description 'left-neighbors list? "") +(grob-property-description 'right-neighbors list? "") +(grob-property-description 'left-items list? "") +(grob-property-description 'right-items list? "") +(grob-property-description 'cause scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob. ") +(grob-property-description 'font font-metric? "Cached font metric object") +(grob-property-description 'break-alignment-done boolean? "mark flag to signal we've done alignment already.") +(grob-property-description 'staff-symbol ly-grob? "the staff symbol grob that we're in.") +(grob-property-description 'collision-done boolean? "") +(grob-property-description 'rest ly-grob? "the staff symbol grob that we're in.") +(grob-property-description 'rest-collision ly-grob? "rest collision that a rest is in.") + +(grob-property-description 'staff-support boolean? " JUNKME.") +(grob-property-description 'script-molecule pair? "index code for script.") + +(grob-property-description 'accidentals-grob ly-grob? "accidentals for this note.") diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 2eb4a0c5f2..8dc047bb26 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -98,7 +98,7 @@ include_path = [os.getcwd()] # g_ is for global (?) - +g_extra_opts = '' g_here_dir = os.getcwd () g_dep_prefix = '' g_outdir = '' @@ -106,6 +106,7 @@ g_force_lilypond_fontsize = 0 g_read_lys = 0 g_do_pictures = 1 g_num_cols = 1 + format = '' g_run_lilypond = 1 no_match = 'a\ba' @@ -368,6 +369,7 @@ option_definitions = [ ('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'), ('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'), ('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'), + ('OPT', '', 'extra-options' , 'Pass OPT quoted to the lilypond command line'), ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'), ('DIM', '', 'force-lilypond-fontsize', 'deprecated, use --force-music-fontsize'), ('DIR', 'I', 'include', 'include path'), @@ -1046,7 +1048,7 @@ def compile_all_files (chunks): if g_outdir: lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/' texfiles = string.join (tex, ' ') - system ('lilypond --header=texidoc %s %s' % (lilyopts, texfiles)) + system ('lilypond --header=texidoc %s %s %s' % (lilyopts, g_extra_opts, texfiles)) # # Ugh, fixing up dependencies for .tex generation @@ -1329,6 +1331,8 @@ for opt in options: elif o == '--default-lilypond-fontsize': print "--default-lilypond-fontsize is deprecated, use --default-music-fontsize" default_music_fontsize = string.atoi (a) + elif o == '--extra-options': + g_extra_opts = a elif o == '--force-music-fontsize': g_force_lilypond_fontsize = string.atoi(a) elif o == '--force-lilypond-fontsize':