From 224be1cbf4f035b2cf20bd9b080b0da321c1d395 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 28 Nov 2004 00:47:15 +0000 Subject: [PATCH] * scm/define-markup-commands.scm (note-by-number): add "s" to "noteheads-" glyphname. * lily/parser.yy (Generic_prefix_music): supply parser argument to music function as well. --- ChangeLog | 8 ++++ Documentation/topdocs/NEWS.texi | 5 +++ .../user/programming-interface.itely | 4 +- VERSION | 2 +- lily/include/paper-system.hh | 2 +- lily/lily-parser.cc | 5 ++- lily/multi-measure-rest-engraver.cc | 4 -- lily/parser.yy | 3 +- ly/music-functions-init.ly | 32 ++++++++-------- mf/feta-test-generic.mf | 37 +++++++++++++++++++ scm/define-markup-commands.scm | 2 +- scm/framework-ps.scm | 15 ++++++-- scm/page-layout.scm | 2 +- stepmake/stepmake/generic-targets.make | 1 - 14 files changed, 88 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae8e10b505..7ab7307e70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-11-28 Han-Wen Nienhuys + + * scm/define-markup-commands.scm (note-by-number): add "s" to + "noteheads-" glyphname. + + * lily/parser.yy (Generic_prefix_music): supply parser argument to + music function as well. + 2004-11-26 Han-Wen Nienhuys * Documentation/user/changing-defaults.itely (Creating titles): diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index b7219377bb..49616d8988 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -7,6 +7,11 @@ @unnumbered New features in 2.5 since 2.4 @itemize @bullet +@item +Pagebreaks can now be forced or forbidden after title blocks. This is +achieved by setting @code{breakbefore} in the @code{\header} block to +true or false. + @item Shaped note heads. This feature has been sponsored by Jonathan Walther. diff --git a/Documentation/user/programming-interface.itely b/Documentation/user/programming-interface.itely index 4bf22d5d03..0f1c4280e0 100644 --- a/Documentation/user/programming-interface.itely +++ b/Documentation/user/programming-interface.itely @@ -412,7 +412,7 @@ withPadding = @node Markup programmer interface @section Markup programmer interface -@c Please rewrite the second sentence; I don't unѕerstand its meaning. AS +@c Please rewrite the second sentence; I don't unѕerstand its meaning. AS Markups are implemented as special Scheme functions. When applied with as arguments an output definition (@code{\layout} or @code{\paper}), and a list of properties and other arguments, produce a Stencil @@ -506,7 +506,7 @@ In this case, @code{latin1} is the input encoding, which is set with the @code{\encoding} command. When the markup is converted to printable objects (Stencils), the -raise markup is called as +@code{raise-markup} function is called as @example (apply raise-markup diff --git a/VERSION b/VERSION index eaee5216d6..5935b6cb11 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=5 -PATCH_LEVEL=1 +PATCH_LEVEL=2 MY_PATCH_LEVEL= diff --git a/lily/include/paper-system.hh b/lily/include/paper-system.hh index 50b4b4404b..ca6b535eec 100644 --- a/lily/include/paper-system.hh +++ b/lily/include/paper-system.hh @@ -35,7 +35,7 @@ public: bool is_title () const; Real break_before_penalty () const; }; - +// DECLARE_UNSMOB (Paper_system, paper_system); #endif /* PAPER_SYSTEM_HH */ diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index e401761ef3..11bdf7fa6d 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -146,8 +146,9 @@ Lily_parser::parse_string (String ly_code) if (!define_spots_.is_empty ()) { - define_spots_.top ().warning (_ ("Braces don't match")); - error_level_ = 1; + if (define_spots_.is_empty() + && !error_level_ ) + programming_error ("Braces don't match, but error_level_ not set."); } error_level_ = error_level_ | lexer_->error_level_; diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 1e89a14ecc..a1557679c7 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -152,7 +152,6 @@ Multi_measure_rest_engraver::stop_translation_timestep () if (last_command_item_ && (mmrest_ || last_rest_)) { - if (last_rest_) { add_bound_item (last_rest_, last_command_item_); @@ -170,10 +169,7 @@ Multi_measure_rest_engraver::stop_translation_timestep () } } - - Moment mp(robust_scm2moment (get_property ("measurePosition"), Moment (0))); - if (last_rest_) { last_rest_ = 0; diff --git a/lily/parser.yy b/lily/parser.yy index d3f044b034..7743e1bdc6 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1102,7 +1102,8 @@ Generic_prefix_music: SCM m = SCM_EOL; if (ok) - m = scm_apply_0 (func, scm_cdr ($1)); + m = scm_apply_0 (func, scm_cons (THIS->self_scm(), + scm_cdr ($1))); if (unsmob_music (m)) { diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index cf2a2745de..c38e5a771c 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -1,10 +1,10 @@ \version "2.4.0" -applymusic = #(def-music-function (location func music) (procedure? ly:music?) +applymusic = #(def-music-function (parser location func music) (procedure? ly:music?) (func music)) -oldaddlyrics = #(def-music-function (location music lyrics) (ly:music? ly:music?) +oldaddlyrics = #(def-music-function (parser location music lyrics) (ly:music? ly:music?) (make-music 'LyricCombineMusic 'origin location @@ -14,46 +14,46 @@ grace = #(def-grace-function startGraceMusic stopGraceMusic) acciaccatura = #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic) appoggiatura = #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic) -partcombine = #(def-music-function (location part1 part2) (ly:music? ly:music?) +partcombine = #(def-music-function (parser location part1 part2) (ly:music? ly:music?) (make-part-combine-music (list part1 part2))) -autochange = #(def-music-function (location music) (ly:music?) +autochange = #(def-music-function (parser location music) (ly:music?) (make-autochange-music music)) -applycontext = #(def-music-function (location proc) (procedure?) +applycontext = #(def-music-function (parser location proc) (procedure?) (make-music 'ApplyContext 'origin location 'procedure proc)) -displayMusic = #(def-music-function (location music) (ly:music?) +displayMusic = #(def-music-function (parser location music) (ly:music?) (display-music music) music) -applyoutput = #(def-music-function (location proc) (procedure?) +applyoutput = #(def-music-function (parser location proc) (procedure?) (make-music 'ApplyOutputEvent 'origin location 'procedure proc)) -breathe = #(def-music-function (location) () +breathe = #(def-music-function (parser location) () (make-music 'EventChord 'origin location 'elements (list (make-music 'BreathingSignEvent)))) -unfoldrepeats = #(def-music-function (location music) (ly:music?) +unfoldrepeats = #(def-music-function (parser location music) (ly:music?) (unfold-repeats music)) compressmusic = #(def-music-function - (location fraction music) (number-pair? ly:music?) + (parser location fraction music) (number-pair? ly:music?) (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction)))) makeClusters = #(def-music-function - (location arg) (ly:music?) + (parser location arg) (ly:music?) (music-map note-to-cluster arg)) removeWithTag = #(def-music-function - (location tag music) (symbol? ly:music?) + (parser location tag music) (symbol? ly:music?) (music-filter (lambda (m) (let* ((tags (ly:music-property m 'tags)) @@ -62,7 +62,7 @@ removeWithTag = keepWithTag = #(def-music-function - (location tag music) (symbol? ly:music?) + (parser location tag music) (symbol? ly:music?) (music-filter (lambda (m) (let* ((tags (ly:music-property m 'tags)) @@ -79,7 +79,7 @@ keepWithTag = cueDuring = #(def-music-function - (location what dir main-music) + (parser location what dir main-music) (string? ly:dir? ly:music?) (make-music 'QuoteMusic 'element main-music @@ -92,7 +92,7 @@ cueDuring = quoteDuring = # (def-music-function - (location what main-music) + (parser location what main-music) (string? ly:music?) (make-music 'QuoteMusic 'element main-music @@ -104,7 +104,7 @@ quoteDuring = # killCues = #(def-music-function - (location music) + (parser location music) (ly:music?) (music-map (lambda (mus) diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf index 4c656d8e59..e14b4e6cc3 100644 --- a/mf/feta-test-generic.mf +++ b/mf/feta-test-generic.mf @@ -4,6 +4,43 @@ % % + +fet_beginchar("espr", "espr", "espressivo") + set_char_box(.9 staff_space#, .9 staff_space#, .5 staff_space#, .5 staff_space#); + save thickness, diminish; + thickness = 0.05 staff_space + linethickness; + pickup pencircle scaled thickness; + t = thickness; + diminish = .75; + top z1 =(0.2 staff_space,h); + rt z3 =(w*2,0); + bot y5 =-h; + x5 = x1; + x2 = .5[x1,x3]; + x4 = .5[x5,x3]; + z2 = whatever[z1,z3]; + z4 = whatever[z5,z3]; + penpos1(t,90); + penpos2(t,90); + penpos5(t,90); + penpos4(t,90); + penpos3(diminish*t,90); + draw z1 .. z2; + draw z5 .. z4; + penstroke z4e .. z3e; + penstroke z2e .. z3e; + draw (z1 .. z2) xscaled -1; + draw (z5 .. z4) xscaled -1; + penstroke (z4e .. z3e) xscaled -1; + penstroke (z2e .. z3e) xscaled -1; + penlabels(1,2,3,4,5); + pickup pencircle scaled (diminish* thickness); + draw z3; + draw z3 xscaled -1; + +fet_endchar; + + input feta-bolletjes; %input feta-banier; %input feta-slag; diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 36886996d6..fd1dfb5c27 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -451,7 +451,7 @@ and/or @code{extra-offset} properties. " (stem-length (* (magstep size) (max 3 (- log 1)))) (head-glyph (ly:find-glyph-by-name font - (string-append "noteheads-" (number->string (min log 2))))) + (string-append "noteheads-s" (number->string (min log 2))))) (stem-thickness 0.13) (stemy (* dir stem-length)) (attachx (if (> dir 0) diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 9068ce5539..626ecfca65 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -191,7 +191,7 @@ (string-append "%!PS-Adobe-2.0 EPSF-2.0\n" "%%Creator: creator time-stamp\n" "%%BoundingBox: " - (string-join (map number->string bbox) " ") "\n" + (string-join (map ly:number->string bbox) " ") "\n" "%%Orientation: " (if (eq? (ly:output-def-lookup paper 'landscape) #t) "Landscape\n" @@ -252,7 +252,15 @@ (map ly:paper-system-stencil (append titles (list non-title))))) (xext (ly:stencil-extent dump-me X)) - (yext (ly:stencil-extent dump-me Y))) + (yext (ly:stencil-extent dump-me Y)) + (bbox + (map + (lambda (x) + (if (or (nan? x) (inf? x)) + 0.0 x)) + (list (car xext) (car yext) + (cdr xext) (cdr yext))) + )) (for-each (lambda (x) @@ -263,8 +271,7 @@ (lambda (x) (inexact->exact (round (* x scale mm-to-bigpoint)))) - (list (car xext) (car yext) - (cdr xext) (cdr yext)))) + bbox)) (preamble paper))) diff --git a/scm/page-layout.scm b/scm/page-layout.scm index 89ef9a7d8d..1c23ce46c2 100644 --- a/scm/page-layout.scm +++ b/scm/page-layout.scm @@ -372,7 +372,7 @@ CURRENT-BEST is the best result sofar, or #f." #:penalty total-penalty) current-best))) - (if #t ;; debug + (if #f ;; debug (display (list "\nuser pen " user-penalty diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index a152e28e0b..22cfdc3500 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -139,7 +139,6 @@ installextradoc: $(foreach i, $(EXTRA_DOC_FILES),\ cp -r $(i) $(prefix)/doc/$(package) &&) true - include $(outdir)/dummy.dep $(wildcard $(outdir)/*.dep) # expect a warning here $(outdir)/dummy.dep: -- 2.39.5