]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/refman.itely (Rehearsal marks): document new
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 18 Jan 2004 12:14:43 +0000 (12:14 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 18 Jan 2004 12:14:43 +0000 (12:14 +0000)
functionality.

* input/regression/rehearsal-mark-number.ly: new file.

* input/regression/rehearsal-mark-letter.ly: new file.

ChangeLog
Documentation/user/refman.itely
input/regression/rehearsal-mark-letter.ly
input/regression/rehearsal-mark-number.ly

index 4dcc8561a1a40740dea94426ce31713ff3627ff4..a74997b4c5e25359a3c102084c25d9578e68efb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-01-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * Documentation/user/refman.itely (Rehearsal marks): document new
+       functionality.
+
        * input/regression/rehearsal-mark-number.ly: new file.
 
        * input/regression/rehearsal-mark-letter.ly: new file.
index 54cee83ff84fd637f316b4ca287e838d3a95d163..c8bd42b319a8d3f0e5503fe936844dc92fa8e068 100644 (file)
@@ -4180,17 +4180,41 @@ for the score.
 To print a  rehearsal mark, use the @code{\mark} command:
 @lilypond[fragment,verbatim]
 \relative c'' {
-  c1 \mark "A"
-  c1 \mark "B"
-  c1 \mark "12"
-  c1 \mark "13"
-  c1
+  c1 \mark \default
+  c1 \mark \default
+  c1 \mark #8 
+  c1 \mark \default
+  c1 \mark \default
 }
 @end lilypond
 
 The mark is incremented automatically if you use @code{\mark
-\default}. The value to use is stored in the property
-@code{rehearsalMark} is used and automatically incremented.
+\default}, but you can also use an integer argument to set the mark
+manually.  The value to use is stored in the property
+@code{rehearsalMark}.
+
+The style is defined by the property @code{markFormatter}. It is a
+function taking the current mark (an integer) and the current context
+as argument. It should return a markup object. In the following
+example, @code{markFormatter} is set to a canned procedure. After a
+few measures, it is set to function that produces a boxed number. 
+
+@lilypond[verbatim,fragment,relative 2]
+  \property Score.markFormatter = #format-mark-numbers 
+  c1 \mark \default
+  c1 \mark \default
+  \property Score.markFormatter
+    = #(lambda (mark  context)
+       (make-bold-markup (make-box-markup (number->string mark))))
+  c1 \mark \default
+  c1 \mark \default
+@end lilypond
+
+The file @file{scm/translation-functions.scm} contains the definitions
+of @code{format-mark-numbers} (the default format) and
+@code{format-mark-letters}. They can be used as inspiration for other
+formatting functions.
+
 
 @cindex coda on bar line
 @cindex segno on bar line
@@ -4206,17 +4230,14 @@ to access the appropriate symbol:
   c1
 @end lilypond
 
-In this case, during line breaks,
-marks must also be printed at the end of the line, and not at the
-beginning. Use the following to force that behavior:
+In this case, during line breaks, marks must also be printed at the
+end of the line, and not at the beginning. Use the following to force
+that behavior:
 @example
 \property Score.RehearsalMark \override
   #'break-visibility = #begin-of-line-invisible
 @end example
 
-See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
-around the marks.
-
 @cindex fermatas
 @cindex coda
 @cindex segno
@@ -4226,7 +4247,13 @@ around the marks.
 
 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}
 
-Examples: @inputfileref{input/test,boxed-molecule.ly}.
+Init files: @file{scm/translation-functions.scm} contains the
+definition of @code{format-mark-numbers} and
+@code{format-mark-letters}. They can be used as inspiration for other
+formatting functions.
+
+Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
+@inputfileref{input/regression,rehearsal-mark-number.ly}.
 
 
 @node Bar numbers
index 3ee5d35e9e92fba8151b4d64347f12c8530ce187..48fbe8176678256958daa6297a19788f34204dda 100644 (file)
@@ -6,25 +6,13 @@ with @code{\mark NUMBER}, or with @code{Score.rehearsalMark}."
       }
 
 \version "2.1.7"
-
-
-global =  \notes {
-  s1 | \mark #6
-  s1 | \mark \default
-  s1 | \mark \default
-  s1 | \mark \default
+\score {  \notes \relative c'' {
+  c1 | \mark #6
+  c1 | \mark \default
+  c1 | \mark \default
+  c1 | \mark \default
   \property Score.rehearsalMark = #24
-  s1 | \mark \default
-  s1 | \mark \default
+  c1 | \mark \default
+  c1 | \mark \default
   }
-
-
-one =  \notes \relative c {
-  c''1 c c c c c c 
 }
-
-
-\score{
-\context Staff << \global \one >>
-}
-
index b48fddb6e5917c0f66446d945a77c5cb8dab924b..8b8d3f4bcc3de256cdfaaf4691e8aabb3bd62bf8 100644 (file)
@@ -6,28 +6,18 @@ By setting @code{markFormatter} we may choose a different style of mark printing
       }
 
 \version "2.1.7"
-
-
-global =  \notes {
+\score {
+  \notes \relative c''{
     \property Score.markFormatter = #format-mark-numbers 
-  s1 | \mark \markup { \musicglyph #"scripts-coda" }
-  s1 | \mark \default
-  s1 | \mark \default
+  c1 | \mark \markup { \musicglyph #"scripts-coda" }
+  c1 | \mark \default
+  c1 | \mark \default
     \property Score.markFormatter
     = #(lambda (mark  context)
        (make-bold-markup (make-box-markup (number->string mark))))
        
-    s1 | \mark \default
-    s1 | \mark \default
+    c1 | \mark \default
+    c1 | \mark \default
   }
-
-
-one =  \notes \relative c {
-  c''1 c c c c c c 
-}
-
-
-\score{
-\context Staff << \global \one >>
 }