From d80b4fa420adc32460606cecffd66fca8cc1b83d Mon Sep 17 00:00:00 2001 From: hanwen Date: Fri, 16 Jan 2004 19:42:30 +0000 Subject: [PATCH] * scm/paper.scm (set-staff-size): new function: set default staff-size. * scm/paper.scm: new file. (set-staff-size): new function (set-paper-size): new function * Documentation/user/refman.itely (Fermatas): document \lyricsto --- ChangeLog | 2 ++ Documentation/topdocs/NEWS.texi | 4 ++-- Documentation/user/internals.itely | 9 +++++---- Documentation/user/refman.itely | 6 ++++-- ly/declarations-init.ly | 2 +- scm/paper.scm | 10 ++++++++-- 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f84162eb71..1aea67579f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-01-16 Han-Wen Nienhuys + * scripts/convert-ly.py (conv): add \include "paper" rule. + * ly/paper*.ly: remove files. * scm/paper.scm (set-staff-size): new function: set default diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 8794234d05..bdb6407484 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -22,9 +22,9 @@ setting staff sizes is, both demonstrated in this fragment @example #(set-staff-size 15) - \paper { + \paper @{ #(paper-set-staff-size (* 15 pt)) - } + @} @end example @noindent diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index 6d3c2ab7af..edb79eb3f6 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -304,9 +304,10 @@ music to be interpreted. The @var{context modifications} property settings and @code{\remove}, @code{\consists} and @code{\consistsend} commands. The syntax is similar to the @code{\translator} block. -The following example shows how a staff is created with bigger spaces: +The following example shows how a staff is created with bigger spaces, +and without a @code{Clef_engraver}. -@lilypond[relative=1,fragment] +@lilypond[relative=1,fragment,verbatim] << \new Staff { c4 es4 g2 } \new Staff \with { @@ -320,8 +321,8 @@ The following example shows how a staff is created with bigger spaces: @refbugs -@code{\with} has no effect on contexts that already exist. Neither can -it be used for @internalsref{Score} contexts. +The command @code{\with} has no effect on contexts that already +exist. Neither can it be used for @internalsref{Score} contexts. @node Engravers and performers diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 581b0afeea..724dd4adde 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -7329,6 +7329,7 @@ entering the chant, as the following short excerpt demonstrates: @lilypond[raggedright,verbatim,noindent] \include "gregorian-init.ly" \score { +<< \context VaticanaVoice { \property Score.BarNumber \set #'transparent = ##t \notes { @@ -7339,7 +7340,8 @@ entering the chant, as the following short excerpt demonstrates: } \lyricsto "" \new LyricsVoice \lyrics { San- ctus, San- ctus, San- ctus - } + } >> + } @end lilypond @@ -8454,7 +8456,7 @@ sizes. Each font is tuned for a different staff size: at smaller sizes the font gets heavier, to match the relatively heavier staff lines. The recommended font sizes are listed in the following table: -@multitable @columnfractions .3 .3 .4 +@multitable @columnfractions .25 .25 .25 .25 @item @b{name} @tab @b{staff height (pt)} diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 48986498b9..a622b8b44a 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -62,7 +62,6 @@ melismaEnd = \property Staff.melismaBusy = ##f (font-series . medium) )) - #(set-paper-size "a4") \include "engraver-init.ly" } @@ -108,6 +107,7 @@ paperTwentysix = \paper { } \paper { \paperTwenty } +#(set-paper-size "a4") \include "dynamic-scripts-init.ly" \include "spanners-init.ly" diff --git a/scm/paper.scm b/scm/paper.scm index 7987d8f021..56110a32bf 100644 --- a/scm/paper.scm +++ b/scm/paper.scm @@ -50,7 +50,7 @@ ;; todo: take dimension arguments. -(define (set-paper-dimensions m h w) +(define (set-paper-dimensions m w h) (let* ( (mm (eval 'mm m)) ) @@ -65,7 +65,9 @@ (define-public (set-paper-size name) (let* ((entry (assoc name paper-alist)) - (m (current-module)) + (pap (eval '$defaultpaper (current-module))) + (new-paper (ly:output-def-clone pap)) + (m (ly:output-def-scope new-paper)) (mm (eval 'mm m)) ) @@ -73,6 +75,10 @@ (begin (set! entry (eval (cdr entry) m)) (set-paper-dimensions m (car entry) (cdr entry)) + (module-define! m 'papersize name) + (module-define! m 'papersizename name) + (set-paper-dimensions m (car entry) (cdr entry)) + (module-define! (current-module) '$defaultpaper new-paper) ) (ly:warning (string-append "Unknown papersize: " name)) ))) -- 2.39.5