]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/paper.scm (set-staff-size): new function: set default
authorhanwen <hanwen>
Fri, 16 Jan 2004 19:25:35 +0000 (19:25 +0000)
committerhanwen <hanwen>
Fri, 16 Jan 2004 19:25:35 +0000 (19:25 +0000)
staff-size.

* scm/paper.scm: new file.
(set-staff-size): new function
(set-paper-size): new function

* Documentation/user/refman.itely (Fermatas): document \lyricsto

29 files changed:
Documentation/topdocs/NEWS.texi
Documentation/user/refman.itely
input/ascii-art/as-email.ly
input/ascii-art/as2.ly
input/ascii-art/asciiscript5.ly
input/ascii-art/asciiscript9.ly
input/ascii-art/r-as.ly
input/ascii-art/standchen-as5.ly
input/ascii-art/standchen-as9.ly
input/ascii-art/twinkle-as5.ly
input/mutopia/F.Schubert/standchen.ly
input/mutopia/J.S.Bach/wtk1-fugue2.ly
input/mutopia/R.Schumann/romanze-op28-2.ly
input/no-notation/denneboom.ly
input/no-notation/midi-volume-equaliser.ly
input/puer-fragment.ly
input/regression/size11.ly
input/regression/size13.ly
input/regression/size16.ly
input/regression/size20.ly
input/regression/size23.ly
input/regression/size26.ly
input/template/jazz-combo.ly
input/test/coriolan-margin.ly
input/test/fill-a4.ly
ly/book-init-init.ly
ly/center-init.ly
scm/paper.scm
scripts/lilypond-book.py

index f85b750578ee6d1c8b7482aa58421b2647543db1..8794234d050aad19d948591083c873baa92b9985 100644 (file)
@@ -17,6 +17,27 @@ Version 2.1.9
 @end ignore
 
 @itemize @bullet
+@item Default staff sizes are now scalable. There are two new mechanisms for
+setting staff sizes is, both demonstrated in this fragment
+
+@example
+  #(set-staff-size 15)
+  \paper {
+    #(paper-set-staff-size (* 15 pt))
+  }   
+@end example
+
+@noindent
+Both have  the same effect on the global layout  of a
+piece. Similarly, the paper size may be changed as follows
+
+@example
+  #(set-paper-size "a4")
+@end example 
+
+@item
+ The black note head was made a little rounder, which causes a less
+ frantic graphic impression.
 
 @item
 A more concise syntax for checking octaves was introduced. A note may
index 61f9ac868b799dc5095f5399c63c43279af2dfe8..581b0afeea69190352728a24db11d6c26afbae3c 100644 (file)
@@ -8450,8 +8450,9 @@ There is no convenient mechanism to manually override spacing.
 @cindex @code{paper} file
 
 The Feta font provides musical symbols at eight seven different
-sizes. Each font is tuned for a different staff size, which are listed
-in the following table:
+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  
 
@@ -8503,32 +8504,19 @@ in the following table:
 
 @end multitable
 
-These standard sizes can be used by including the file @file{paperSZ.ly}, where
-@code{SZ} is one of 11, 13, 16, 20, 23 and 26.  If you include any
-of these files, the variables @code{paperEleven},
-@code{paperThirteen}, @code{paperSixteen},  @code{paperEightteen}, 
-@code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
-are defined respectively.  The default @code{\paper} block is also
-set. These files should be imported at toplevel, i.e.
+These fonts are available in any sizes. The context property
+@code{fontSize} and the layout property @code{staff-space} (in
+@internalsref{StaffSymbol}) can be used to tune size for individual
+staffs. The size of individual staffs are relative to the global size,
+which can be set   in the following manner:
+
 @example
-        \include "paper26.ly"
-        \score @{  ... @}
+  #(set-staff-size 14)
 @end example
 
-Sizes can also be
-
-
-The default font size settings for each staff heights are generated
-from the 20pt style sheet. For more details, see the file
-@file{scm/font.scm}.
-
+This sets the global default size to 14pt staff height, and scales all
+fonts accordingly.
 
-  of starting from 11 point
-(.  These fonts are 11 point, 13 point, 16 point, 20 point, 23 point,
-and 26 point.  The point size of a font is the height of the
-corresponding staff (excluding line thicknesses).
-
-Definitions for these sizes are the files
 
 
 @node Line breaking
@@ -8637,21 +8625,13 @@ The predefined command @code{\newpage} also does this.
 @cindex page size
 @cindex @code{papersize}
 
-To change the paper size, you must first set the @code{papersize} paper 
-variable variable as in the example below.  Set it to
-the strings @code{a4}, @code{letter}, or @code{legal}.  After this
-specification, you must set the font as described above.  If you want
-the default font, then use the 20 point font.
-
+To change the paper size, use the following Scheme code:
 @example
-        \paper@{ papersize = "a4" @}
-        \include "paper16.ly"
+        \paper@{
+           #(set-paper-size "a4")
+        @}
 @end example
 
-The file @code{paper16.ly}  will now include a file named @file{a4.ly}, which
-will set the paper variables @code{hsize} and @code{vsize} (used by
-@code{lilypond-book} and @code{lilypond}).
-
 
 @refcommands
 
index 41c2418e14476d27cc7ca384b593bb89b75e0312..cc6cb7d45116c4834bd24001478dc366987c0989 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index f9ec2a13892437db487d82600110e132e66503c6..bce52f684618fb27ffc90aa6c0d56e919de6759c 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 
 % test for ascii-art output
 
index ae4c9715a71c80d53025e2fceda7fc70636ef3a1..4055f90a9b2695bacbd468816248ef9a41320982 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index 900e93acdde63100600feabac0dd08d7a9b8e6a9..c5b211e1c4ea732f7b3c9b0ea9d5a97ee2ea0bf8 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index f098bfa4f534107cf36a0f59395bc35c6fde72b7..d5ac0c9ad158280aab9a0bde5ccdb9a4add5318d 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index 1b94836dc5ea3c304cafcd61d0341449119b432a..5f5739c14fb41070a2e3205937739432c3f82980 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index 3bd6706447149f42924f64ddeea8344a12bad3eb..18a7044f2ba40fa40642a1dcd6c143222b7d68fe 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 
 % Process as:
index ebf0bbf5deb179d33642922a3ce40c2ea9a61be6..75e962f04bec11de722cdc6d446650c51da1de5a 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 % ASCII Art output
 %
 % Process as:
index 4532361861e966d093b530ca0916f695364bcc8f..0576ff65a2526bdf7cb336c649d37365a2223eb0 100644 (file)
@@ -42,12 +42,12 @@ instrument = "Piano"
  footer = "Mutopia-2001/04/27-xx"
 } 
 
-\version "2.1.10"
+\version "2.1.11"
 
 dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
 dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
 
-\include "paper16.ly"
+#(set-staff-size 16)
 
 vocalVerse =  \notes\relative c''{
        \dynamicUp
index 14dfc673ed3c48728f80cb36e325591f0aadac70..8fdf10a48a9b60d73f39544bde047eab4f59ae7f 100644 (file)
@@ -1,4 +1,3 @@
-#(ly:set-option 'old-relative)
 \header {
   title =       "Fuga a 3 voci"
   opus =        "BWV 847-Fuga"
@@ -34,7 +33,6 @@
  the few forced linebreaks were an earlier attempt to get the spacing
  to match up.
 
-%\include "paper19.ly" 
 %}
 
 
index 34b0565b49d16cbc4c7789030b05924d3ab82319..f86b26c69316c26377ab0709930c46309244a7ec 100644 (file)
@@ -3,8 +3,8 @@
 
 \include "deutsch.ly"
 
-\include "paper16.ly"
-\version "2.1.7"
+#(set-staff-size 16)
+\version "2.1.11"
 
 \header {
   title = "Romanzen"
index 7902dd4de307ba402821f21e5ea537e8a467c2c1..254efb8aee45d6138bb2140d657e9efd2cbde74a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 \header{
 filename =      "denneboom.ly"
 enteredby =     "jcn"
@@ -6,7 +6,7 @@ copyright =      "public domain"
 }
 %{ file tests silly line shapes %}
 
-\include "paper20.ly"
+#(set-staff-size 20)
 
 
 
index be41ad5ac57c9989a99bc09edf3bf2372a4d4156..6e5bd7ec5f0fec3d1bc634a118bd992ae6aac822 100644 (file)
@@ -1,12 +1,12 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.11"
 \header {
 texidoc = "@cindex Midi Volume Equaliser
 The full orchestra plays a notes, where groups stop one after
 another. Use this to tune equalizer settings. "
 }
 
-\include "paper16-init.ly"
+#(set-staff-size 16)
 
 %{
 
index e0b87021b9284cc2dfc2fd2ab9674621eca2d0b0..c53c8e5912411e4a58cc07a97e2cd0e3d2094dd8 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 \header {
     title      = "Puer natus est nobis (excerptum)"
     subtitle   = "Antiphona ad introitum VII"
@@ -17,7 +17,7 @@ before the ligature (not demonstrated in this example)."
 
 }
 
-\include "paper26.ly"
+#(set-staff-size 26)
 \include "gregorian-init.ly"
 
 %%% N.B.: Yes, I know, the formatting of the following looks awful,
index a5515b365c55fb6b98d99ce43dbc7c2c0656b36c..e48b728fc5bd55d17cb1f9d76d451f4d5021fbd0 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 
 \header{
 texidoc="
@@ -14,5 +14,5 @@ foollilypondbook = "
 
 
 
-\include "paper11.ly"
+#(set-staff-size 11)
 \include "allfontstyle.lyinc"
index 2c2f95f101aea4de3403f4475871a40e71664062..d73d4337286c2439e6009f5a98f6333e3ef8458f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 foollilypondbook = "
 \score
 "
@@ -7,5 +7,5 @@ foollilypondbook = "
     texidoc ="Staff height 13 pt."
     }
 
-\include "paper13.ly"
+#(set-staff-size 13)
 \include "allfontstyle.lyinc"
index ffbbe417ba0e9c662be936495203438ecab4c9fd..6c7cea8f11801607676b58999a6bc074c164c497 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 foollilypondbook = "
 \score
 "
@@ -9,5 +9,5 @@ foollilypondbook = "
 
 
 
-\include "paper16.ly"
+#(set-staff-size 16)
 \include "allfontstyle.lyinc"
index 80369be2454570a3c337a805ec1dd33eb5a5c4ea..32f631b0accecfa7ef390db3a3391cd81af70b32 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 foollilypondbook = "
 \score
 "
@@ -9,5 +9,5 @@ foollilypondbook = "
 
 
 
-\include "paper20.ly"
+#(set-staff-size 20)
 \include "allfontstyle.lyinc"
index 6d8634c5a1b4f82b8b964ace0de578ad92a01a7c..880a54c7f0c23f6179e0164d951a1c91bff9fa13 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 foollilypondbook = "
 \score
 "
@@ -8,5 +8,5 @@ foollilypondbook = "
     }
 
 
-\include "paper23.ly"
+#(set-staff-size 23)
 \include "allfontstyle.lyinc"
index b36fa9ef56bbd35dea2f6b925b8cd8d7cf04f232..959fca5afd96e8e4944e0d60e08c9317ab3eff7d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 foollilypondbook = "
 \score
 "
@@ -9,5 +9,5 @@ foollilypondbook = "
 
 
 
-\include "paper26.ly"
+#(set-staff-size 26)
 \include "allfontstyle.lyinc"
index 5590889cf9ee86031f8ea6bcb0b2e9eb77528a82..16892572f53e386a358c5d923a045ff7f6319971 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 \header {
         title = "Song"
         subtitle = "(tune)"
@@ -9,7 +9,7 @@
        texidoc = "Jazz tune for combo (horns, piano, drums, bass, guitar)."
 }
 
-\include "paper16.ly"
+#(set-staff-size 16)
 \include "english.ly"
 
 %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
index de1ace728f6859db71c0af94286dc849ae13bf0e..28c03c601aa20b43e931e46579025d683cd85e8f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.1.7"
+\version "2.1.11"
 
 
 % Ugh, we need to override some LaTeX titling stuff
@@ -16,7 +16,7 @@ texidoc = "@cindex Orchestra Score
 Demonstration of how to set up an orchestral score (Beethoven's Coriolan overture).
 " }
 
-\include "paper16.ly"
+#(set-staff-size 16)
 
 raisedFlat = \markup { \raise #0.4 \smaller \smaller \musicglyph #"accidentals--1"  }
 
index ffdb9f4aaf0f0b3ca6a5cc95e5262aaca7d18f08..937e2a12b5f812209f2c3cade71c6d4cb20c39e0 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.11"
 %possible rename to paper-fill-a4.ly -gp
 % candidate for reg -gp
 % Han says no, but keeping this comment temporarily so that I don't
@@ -16,7 +16,7 @@
 This should fill a4 paper. "
 }
 
-\include "paper13.ly"
+#(set-staff-size 13)
 
 \score{
        \context Voice \notes\relative c'{
index 512e52ccdbdafc4f1c6602ddcc0e364fdf70df63..f07ec86ee5bafaa7142690948ce5c730ecefb573 100644 (file)
@@ -1,10 +1,10 @@
 % Toplevel initialisation file. 
        
-\version "1.9.8"
+\version "2.1.11"
 
 
 \include "declarations-init.ly"
-\include "paper16-init.ly"
+#(set-staff-size 16)
 
  \paper{
        \paperSixteen
index 2e6d56af77231ed3eddc1d2bf213d1e2405c4f0f..c2eaea47424701f91cbb1cd7056de5385346807f 100644 (file)
@@ -1,10 +1,10 @@
 % Toplevel initialisation file. 
        
-\version "1.9.8"
+\version "2.1.11"
 
 
 \include "declarations-init.ly"
-\include "paper16-init.ly"
+#(set-staff-size 16)
 
  \paper { 
   \paperSixteen
index b42e988c68fd07bc7157fc52aeae3ce2b58d93c2..7987d8f0218761af5d60b7a7a63cd2bee3a8021a 100644 (file)
@@ -17,6 +17,7 @@
     (module-define! m 'fonts (scale-font-list (/  sz (* 20 pt))))
     (module-define! m 'staffheight sz)
     (module-define! m 'staff-space ss)
+    (module-define! m 'staffspace ss)
     (module-define! m 'linethickness (* 0.5 pt))
     (module-define! m 'outputscale ss)
     (module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
 
 ;; todo: take dimension arguments.
 
+
+(define (set-paper-dimensions m h w)
+  (let*
+      ( (mm (eval 'mm m)) )
+
+    (module-define! m 'hsize w)
+    (module-define! m 'vsize h)
+    (module-define! m 'linewidth (- w (* 20 mm)))
+    (module-define! m 'raggedright #f)
+    (module-define! m 'packed #f)
+    (module-define! m 'indent (/ w 14)) ))
+
+
 (define-public (set-paper-size name)
   (let*
       ((entry (assoc name paper-alist))
     (if (pair? entry)
        (begin
          (set! entry (eval  (cdr entry) m))
-         (module-define! m 'papersize name)
-         (module-define! m 'papersizename name)
-         (module-define! m 'hsize (car entry))
-         (module-define! m 'vsize (cdr entry))
-         (module-define! m 'linewidth (- (car entry) (* 20 mm)))
-         (module-define! m 'raggedright #f)
-         (module-define! m 'packed #f)
-         (module-define! m 'indent (/ (car entry) 4)) )
+         (set-paper-dimensions m (car entry) (cdr entry))
+         )
        (ly:warning (string-append "Unknown papersize: " name))
        )))
index f6358cc133ca77c64a59393cad5ca4146e4414ef..10b5863d74321cb08e21436e7b85801ae0a5a991 100644 (file)
@@ -726,7 +726,8 @@ def compose_full_body (body, opts):
        body = r'''
 %% Generated automatically by: lilypond-book.py
 %% options are %s
-\include "paper%d.ly"
+#(set-staff-size %d)
+
 \paper  {
   %s
   %s