From: Han-Wen Nienhuys Date: Tue, 15 Jun 2004 22:07:51 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.2.3~1^2~28 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8fc0b9a4a716de24d4764f9f7be386341f1d9768;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index a007122d10..49830343d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,17 @@ 2004-06-15 Han-Wen Nienhuys + * scm/page-layout.scm (default-page-make-stencil): add + raggedbottom, raggedlastbottom. + + * Documentation/user/changing-defaults.itely (Page layout): add doc. + + * scm/framework-tex.scm (define-fonts): fix export of + papersize. + + * lily/paper-book.cc (classic_output): strip suffixes from + framework functions. + * lily/tuplet-bracket.cc (before_line_breaking): do not return SCM_UNDEFINED to Scheme. diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 0983403d65..6c1d9b417f 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -2209,6 +2209,10 @@ The default layout responds to the following settings in the Distance between top-most music system and the page header @item foot-sep Distance between bottom-most music system and the page footer +@item raggedbottom + If set to true, systems will not be spread across the page. +@item raggedlastbottom + If set to true, systems will not be spread to fill the last page. @end table The default page header puts the page number and the @code{instrument} diff --git a/VERSION b/VERSION index 2d2e4da5de..933162c39e 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=3 PATCH_LEVEL=4 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=hwn1 diff --git a/input/mutopia/F.Schubert/morgenlied.ly b/input/mutopia/F.Schubert/morgenlied.ly index 1860063d4f..098897324f 100644 --- a/input/mutopia/F.Schubert/morgenlied.ly +++ b/input/mutopia/F.Schubert/morgenlied.ly @@ -32,8 +32,10 @@ manuscriptBreak = { \break } -\paper { - #(paper-set-staff-size (* 5.8 mm)) +#(set-global-staff-size (/ (* 5.8 72.27) 25.4)) + +\bookpaper { +%#(set-global-staff-size (* 5.8 mm)) linewidth = #(* mm 160) indent = 8\mm interscoreline = 2.\mm diff --git a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly index 926ca7aec2..0e42c30e38 100644 --- a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly +++ b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly @@ -165,14 +165,16 @@ smallerPaper = \paper { baerPaper = \paper { indent = 7. \mm linewidth =183.5 \mm - interscoreline=4.0\mm +% interscoreline=4.0\mm \context { \Score % \override System #'print-function = #box-grob-stencil } } - +\bookpaper { + raggedbottom = ##t +} \score{ \sarabandeCelloStaff \paper{ diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 30ccabda81..0c0a0629fc 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -133,12 +133,10 @@ Paper_book::output (String outname) if (ly_c_module_p (header_)) scopes = scm_cons (header_, scopes); - String func_nm = format; - func_nm = "output-framework-" + func_nm; String mod_nm = "scm framework-" + format; SCM mod = scm_c_resolve_module (mod_nm.to_str0 ()); - SCM func = scm_c_module_lookup (mod, func_nm.to_str0 ()); + SCM func = scm_c_module_lookup (mod, "output-framework"); func = scm_variable_ref (func); scm_apply_0 (func, scm_list_n (out->self_scm (), @@ -173,12 +171,10 @@ Paper_book::classic_output (String outname) for (int i = 0; i < output_formats.size (); i++) { String format = output_formats[i]; - String func_nm = format; - func_nm = "output-classic-framework-" + func_nm; String mod_nm = "scm framework-" + format; SCM mod = scm_c_resolve_module (mod_nm.to_str0 ()); - SCM func = scm_c_module_lookup (mod, func_nm.to_str0 ()); + SCM func = scm_c_module_lookup (mod, "output-classic-framework"); func = scm_variable_ref (func); diff --git a/scm/framework-gnome.scm b/scm/framework-gnome.scm index 8857f55b5c..23f6cf0934 100644 --- a/scm/framework-gnome.scm +++ b/scm/framework-gnome.scm @@ -16,7 +16,7 @@ (use-modules (gnome gw canvas)) (use-modules (gnome gw libgnomecanvas))) -(define-public (output-framework-gnome outputter book scopes fields basename) +(define-public (output-framework outputter book scopes fields basename) (let* ((bookpaper (ly:paper-book-book-paper book)) (pages (list->vector (ly:paper-book-pages book)))) diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index a87c2bcf44..7753ec07ed 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -167,7 +167,7 @@ (ly:outputter-dump-stencil outputter page) (ly:outputter-dump-string outputter "} stop-system \nshowpage\n")) -(define-public (output-framework-ps outputter book scopes fields basename) +(define-public (output-framework outputter book scopes fields basename) (let* ((bookpaper (ly:paper-book-book-paper book)) (pages (ly:paper-book-pages book)) (page-number 0) @@ -197,7 +197,7 @@ pages) (ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n"))) -(define-public (output-classic-framework-ps outputter book scopes fields +(define-public (output-classic-framework outputter book scopes fields basename) (let* ((bookpaper (ly:paper-book-book-paper book)) (lines (ly:paper-book-lines book)) diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 5b157a7202..8fa0c17e6b 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -59,7 +59,7 @@ (tex-number-def "lilypondpaper" 'outputscale (number->string (exact->inexact (ly:bookpaper-outputscale bookpaper)))) - (tex-string-def "lilypondpapersize" 'papersize + (tex-string-def "lilypondpaper" 'papersize (eval 'papersize (ly:output-def-scope bookpaper))) (apply string-append @@ -149,7 +149,7 @@ "}\\vss\n}\n\\vfill\n" "}\\vss\n}\n\\vfill\\lilypondpagebreak\n"))) -(define-public (output-framework-tex outputter book scopes fields basename) +(define-public (output-framework outputter book scopes fields basename) (let* ((bookpaper (ly:paper-book-book-paper book)) (pages (ly:paper-book-pages book)) (last-page (car (last-pair pages))) @@ -181,7 +181,7 @@ "}%\n" "}\\interscoreline\n"))) -(define-public (output-classic-framework-tex +(define-public (output-classic-framework outputter book scopes fields basename) (let* ((bookpaper (ly:paper-book-book-paper book)) (lines (ly:paper-book-lines book)) @@ -201,3 +201,21 @@ (lambda (line) (dump-line outputter line (eq? line last-line))) lines) (ly:outputter-dump-string outputter "\\lilypondend\n"))) + +(define-public (output-preview-framework + outputter book scopes fields basename) + (let* ((bookpaper (ly:paper-book-book-paper book)) + (lines (ly:paper-book-lines book))) + (for-each + (lambda (x) + (ly:outputter-dump-string outputter x)) + (list + ;;FIXME + (header "creator" "timestamp" bookpaper (length lines) #f) + "\\def\\lilypondclassic{1}%\n" + (output-scopes scopes fields basename) + (define-fonts bookpaper) + (header-end))) + + (dump-line outputter (car lines) #t) + (ly:outputter-dump-string outputter "\\lilypondend\n"))) diff --git a/scm/page-layout.scm b/scm/page-layout.scm index 1f94d74af8..1a00c37bdc 100644 --- a/scm/page-layout.scm +++ b/scm/page-layout.scm @@ -120,7 +120,7 @@ "Construct a stencil representing the page from LINES. " (let* ((top-margin (ly:output-def-lookup paper 'top-margin)) - + ;; TODO: naming vsize/hsize not analogous to TeX. (hsize (ly:output-def-lookup paper 'hsize)) @@ -135,14 +135,19 @@ (line-stencils (map ly:paper-system-stencil lines)) (height-proc (ly:output-def-lookup paper 'page-music-height)) (music-height (height-proc paper scopes number last?)) + (ragged (ly:output-def-lookup paper 'raggedbottom)) + (ragged-last (ly:output-def-lookup paper 'raggedlastbottom)) + (ragged-bottom (or (eq? #t ragged) + (and last? (eq? #t ragged-last)))) + (spc-left (- music-height (apply + (map (lambda (x) (interval-length (ly:stencil-extent x Y))) line-stencils)))) (stretchable-lines (remove ly:paper-system-title? (cdr lines))) (stretch (if (or (null? stretchable-lines) - (> spc-left (/ music-height 2))) - + (> spc-left (/ music-height 2)) + ragged-bottom) 0.0 (/ spc-left (length stretchable-lines))))