The following three items are consequences of this change.
+@item
+The repetitive chord entry aid @code{q} has been reimplemented.
+Repeated chords are now replaced right before interpreting a music
+expression. In case the user wants to retain some events of the
+original chord, he can run the repeat chord replacement function
+@code{\chordRepeats} manually.
+
+@item
+String numbers and right hand fingerings on single notes now appear
+without having to be written inside of chord brackets.
+
@item
Music functions now work the same when used inside or outside of chords,
including all the possibilities of argument parsing. Music variables
events and lyrics is now possible, but not likely to give results yet.
@item
-The repetitive chord entry aid @code{q} has been reimplemented.
-Repeated chords are now replaced right before interpreting a music
-expression. In case the user wants to retain some events of the
-original chord, he can run the repeat chord replacement function
-@code{\chordRepeats} manually.
-
-@item
-String numbers and right hand fingerings on single notes now appear
-without having to be written inside of chord brackets.
+@code{\tweak} now takes an optional layout object specification. It can
+be used for tweaking layout objects that are only indirectly caused by
+the tweaked event, like accidentals, stems, and flags:
+
+@lilypond[verbatim,quote,ragged-right,relative=2]
+<\tweak Accidental #'color #red cis4
+ \tweak Accidental #'color #green es
+ g>
+@end lilypond
@item
Scheme expressions inside of embedded Lilypond (@code{#@{@dots{}#@}})
during line breaking, for example, when we want to estimate the Y-extent
of a spanner broken at given starting and ending columns.
-If the pure function you're writing takes more than three arguments
-(say, for example, a chained offset callback), this is not a problem:
-just make sure that the grob is the first argument and that start and
-end are the last two arguments.
-
@node How purity is defined and stored
@subsection How purity is defined and stored
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote #'(0.5 . -2) #'NoteHead
- \markup { Die erste Note }
+ \footnote #'(0.5 . -2) #'NoteHead
+ \markup { Die erste Note } \default
a'4 b8
- <>\footnote #'(0.5 . 1) #'NoteHead
- \markup { Die dritte Note }
+ \footnote #'(0.5 . 1) #'NoteHead
+ \markup { Die dritte Note } \default
e c4 d4
}
}
\header { tagline = ##f }
\relative c' {
<
- c\footnote #'(1 . -1.25) "Hier ein C"
- es\footnote #'(2 . -0.25) \markup { \italic "Ein Es" }
- g\footnote #'(2 . 3) \markup { \bold "Das ist ein G" }
+ c-\footnote #'(1 . -1.25) "Hier ein C" \default
+ es-\footnote #'(2 . -0.25) \markup { \italic "Ein Es" } \default
+ g-\footnote #'(2 . 3) \markup { \bold "Das ist ein G" } \default
>1
}
}
\book {
\header { copyright = \markup { "Copyright 1970" } }
\relative c' {
- <>\footnote #'(-3 . 0) #'DynamicText
- \markup { \bold Forte }
+ \footnote #'(-3 . 0) #'DynamicText
+ \markup { \bold Forte } \default
- <>\footnote #'(0 . 1.5) #'Slur
- \markup { Ein Bogen }
+ \footnote #'(0 . 1.5) #'Slur
+ \markup { Ein Bogen } \default
a'4\f(
- <>\footnote #'(0 . -2) #'Beam
- \markup { Balken }
+ \footnote #'(0 . -2) #'Beam
+ \markup { Balken } \default
b8)[ e]
- <>\footnote #'(1 . -1) #'Stem
- \markup { \teeny { Das ist ein Hals } }
+ \footnote #'(1 . -1) #'Stem
+ \markup { \teeny { Das ist ein Hals } } \default
c4
- <>\footnote #'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { Ein Warnungsversetzungszeichen }
+ \footnote #'(0 . 0.5) #'AccidentalCautionary
+ \markup \italic { Ein Warnungsversetzungszeichen } \default
- <>\footnote #'(0.5 . -0.5) #'TextScript
- \markup \italic { Langsamer hier }
+ \footnote #'(0.5 . -0.5) #'TextScript
+ \markup \italic { Langsamer hier } \default
dis?4_"rit."
}
}
\book {
\header { tagline = ##f }
\relative c' {
- a'4\footnote
- "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. Die erste Note" }
+ a'4-\footnote
+ "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. Die erste Note" } \default
b8
- e\footnote
- \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. Die zweite Note"
+ e-\footnote
+ \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. Die zweite Note" \default
c4
- d\p\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano"
+ d\p-\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano" \default
}
}
@end lilypond
\header { tagline = ##f }
\relative c' {
<
- c\footnote "1" #'(1 . -1.25) "1. C"
- es\footnote
- \markup { \bold "b" } #'(2 . -0.25) "b. Es"
- g\footnote "3" #'(2 . 3) \markup { \italic "iii. G" }
+ \footnote "1" #'(1 . -1.25) "1. C" c
+ \footnote
+ \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" es
+ \footnote "3" #'(2 . 3) \markup { \italic "iii. G" } g
>1
}
}
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote
+ \footnote
\markup { \teeny 1 } #'(-3 . 0) #'DynamicText
- \markup { 1. \bold Forte }
+ \markup { 1. \bold Forte } \default
- <>\footnote
+ \footnote
\markup { \teeny b } #'(0 . 1.5) #'Slur
- \markup { b. Ein Bogen }
+ \markup { b. Ein Bogen } \default
a'4\f(
- <>\footnote
+ \footnote
\markup { \teeny 3 } #'(0 . -2) #'Beam
- \markup { 3. Balken }
+ \markup { 3. Balken } \default
b8)[ e]
- <>\footnote
+ \footnote
\markup { 4 } #'(1 . -1) #'Stem
- \markup { \bold 4. { Das ist ein Hals } }
+ \markup { \bold 4. { Das ist ein Hals } } \default
c4
- <>\footnote
+ \footnote
\markup \concat \teeny { "sharp (v)" } #'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { v. Ein Warnungsversetzungszeichen }
+ \markup \italic { v. Ein Warnungsversetzungszeichen } \default
- <>\footnote
+ \footnote
\markup \concat \teeny { "a" } #'(0.5 . -0.5) #'TextScript
- \markup \italic { a. Langsamer hier }
+ \markup \italic { a. Langsamer hier } \default
dis?4_"rit."
\breathe
- <>\footnote
+ \footnote
\markup { \teeny \musicglyph #"rests.4" } #'(1.5 . -0.25) #'BreathingSign
- \markup { \null }
+ \markup { \null } \default
}
}
@end lilypond
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote #'(0.5 . -2) #'NoteHead
- \markup { The first note }
+ \footnote #'(0.5 . -2) #'NoteHead
+ \markup { The first note } \default
a'4 b8
- <>\footnote #'(0.5 . 1) #'NoteHead
- \markup { The third note }
+ \footnote #'(0.5 . 1) #'NoteHead
+ \markup { The third note } \default
e c4 d4
}
}
\header { tagline = ##f }
\relative c' {
<
- c\footnote #'(1 . -1.25) "Here is a C"
- es\footnote #'(2 . -0.25) \markup { \italic "An E-flat" }
- g\footnote #'(2 . 3) \markup { \bold "This is a G" }
+ c-\footnote #'(1 . -1.25) "Here is a C" \default
+ es-\footnote #'(2 . -0.25) \markup { \italic "An E-flat" } \default
+ g-\footnote #'(2 . 3) \markup { \bold "This is a G" } \default
>1
}
}
\book {
\header { copyright = \markup { "Copyright 1970" } }
\relative c' {
- <>\footnote #'(-3 . 0) #'DynamicText
- \markup { \bold Forte }
+ \footnote #'(-3 . 0) #'DynamicText
+ \markup { \bold Forte } \default
- <>\footnote #'(0 . 1.5) #'Slur
- \markup { A slur }
+ \footnote #'(0 . 1.5) #'Slur
+ \markup { A slur } \default
a'4\f(
- <>\footnote #'(0 . -2) #'Beam
- \markup { Beam }
+ \footnote #'(0 . -2) #'Beam
+ \markup { Beam } \default
b8)[ e]
- <>\footnote #'(1 . -1) #'Stem
- \markup { \teeny { This is a stem } }
+ \footnote #'(1 . -1) #'Stem
+ \markup { \teeny { This is a stem } } \default
c4
- <>\footnote #'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { A cautionary accidental }
+ \footnote #'(0 . 0.5) #'AccidentalCautionary
+ \markup \italic { A cautionary accidental } \default
- <>\footnote #'(0.5 . -0.5) #'TextScript
- \markup \italic { Slow Down }
+ \footnote #'(0.5 . -0.5) #'TextScript
+ \markup \italic { Slow Down } \default
dis?4_"rit."
}
}
\book {
\header { tagline = ##f }
\relative c' {
- a'4\footnote
- "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" }
+ a'4-\footnote
+ "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" } \default
b8
- e\footnote
- \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note"
+ e-\footnote
+ \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note" \default
c4
- d\p\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano"
+ d\p-\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano" \default
}
}
@end lilypond
\header { tagline = ##f }
\relative c' {
<
- c\footnote "1" #'(1 . -1.25) "1. C"
- es\footnote
- \markup { \bold "b" } #'(2 . -0.25) "b. E-flat"
- g\footnote "3" #'(2 . 3) \markup { \italic "iii. G" }
+ c-\footnote "1" #'(1 . -1.25) "1. C" \default
+ es-\footnote
+ \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" \default
+ g-\footnote "3" #'(2 . 3) \markup { \italic "iii. G" } \default
>1
}
}
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote
+ \footnote
\markup { \teeny 1 } #'(-3 . 0) #'DynamicText
- \markup { 1. \bold Forte }
+ \markup { 1. \bold Forte } \default
- <>\footnote
+ \footnote
\markup { \teeny b } #'(0 . 1.5) #'Slur
- \markup { b. A slur }
+ \markup { b. A slur } \default
a'4\f(
- <>\footnote
+ \footnote
\markup { \teeny 3 } #'(0 . -2) #'Beam
- \markup { 3. Beam }
+ \markup { 3. Beam } \default
b8)[ e]
- <>\footnote
+ \footnote
\markup { 4 } #'(1 . -1) #'Stem
- \markup { \bold 4. { This is a stem } }
+ \markup { \bold 4. { This is a stem } } \default
c4
- <>\footnote
+ \footnote
\markup \concat \teeny { "sharp (v)" }
#'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { v. A cautionary accidental }
+ \markup \italic { v. A cautionary accidental } \default
- <>\footnote
+ \footnote
\markup \concat \teeny { "a" } #'(0.5 . -0.5) #'TextScript
- \markup \italic { a. Slow Down }
+ \markup \italic { a. Slow Down } \default
dis?4_"rit."
\breathe
- <>\footnote
+ \footnote
\markup { \teeny \musicglyph #"rests.4" }
#'(1.5 . -0.25) #'BreathingSign
- \markup { \null }
+ \markup { \null } \default
}
}
@end lilypond
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote #'(0.5 . -2) #'NoteHead
- \markup { La première note }
+ \footnote #'(0.5 . -2) #'NoteHead
+ \markup { La première note } \default
a'4 b8
- <>\footnote #'(0.5 . 1) #'NoteHead
- \markup { La troisième note }
+ \footnote #'(0.5 . 1) #'NoteHead
+ \markup { La troisième note } \default
e c4 d4
}
}
\header { tagline = ##f }
\relative c' {
<
- c\footnote #'(1 . -1.25) "Voici un do"
- es\footnote #'(2 . -0.25) \markup { \italic "Un mi bémol" }
- g\footnote #'(2 . 3) \markup { \bold "Ceci est un sol" }
+ c-\footnote #'(1 . -1.25) "Voici un do" \default
+ es-\footnote #'(2 . -0.25) \markup { \italic "Un mi bémol" } \default
+ g-\footnote #'(2 . 3) \markup { \bold "Ceci est un sol" } \default
>1
}
}
\book {
\header { copyright = \markup { "Copyright 1970" } }
\relative c' {
- <>\footnote #'(-3 . 0) #'DynamicText
- \markup { \bold Forte }
+ \footnote #'(-3 . 0) #'DynamicText
+ \markup { \bold Forte } \default
- <>\footnote #'(0 . 1.5) #'Slur
- \markup { A slur }
+ \footnote #'(0 . 1.5) #'Slur
+ \markup { A slur } \default
a'4\f(
- <>\footnote #'(0 . -2) #'Beam
- \markup { Beam }
+ \footnote #'(0 . -2) #'Beam
+ \markup { Beam } \default
b8)[ e]
- <>\footnote #'(1 . -1) #'Stem
- \markup { \teeny { This is a stem } }
+ \footnote #'(1 . -1) #'Stem
+ \markup { \teeny { This is a stem } } \default
c4
- <>\footnote #'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { A cautionary accidental }
+ \footnote #'(0 . 0.5) #'AccidentalCautionary
+ \markup \italic { A cautionary accidental } \default
- <>\footnote #'(0.5 . -0.5) #'TextScript
- \markup \italic { Slow Down }
+ \footnote #'(0.5 . -0.5) #'TextScript
+ \markup \italic { Slow Down } \default
dis?4_"rit."
}
}
\book {
\header { tagline = ##f }
\relative c' {
- a'4\footnote
- "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" }
+ a'4-\footnote
+ "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" } \default
b8
- e\footnote
- \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note"
+ e-\footnote
+ \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note" \default
c4
- d\p\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano"
+ d\p-\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano" \default
}
}
@end lilypond
\header { tagline = ##f }
\relative c' {
<
- c\footnote "1" #'(1 . -1.25) "1. C"
- es\footnote
- \markup { \bold "b" } #'(2 . -0.25) "b. E-flat"
- g\footnote "3" #'(2 . 3) \markup { \italic "iii. G" }
+ c-\footnote "1" #'(1 . -1.25) "1. C" \default
+ es-\footnote
+ \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" \default
+ g-\footnote "3" #'(2 . 3) \markup { \italic "iii. G" } \default
>1
}
}
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote
+ \footnote
\markup { \teeny 1 } #'(-3 . 0) #'DynamicText
- \markup { 1. \bold Forte }
+ \markup { 1. \bold Forte } \default
- <>\footnote
+ \footnote
\markup { \teeny b } #'(0 . 1.5) #'Slur
- \markup { b. A slur }
+ \markup { b. A slur } \default
a'4\f(
- <>\footnote
+ \footnote
\markup { \teeny 3 } #'(0 . -2) #'Beam
- \markup { 3. Beam }
+ \markup { 3. Beam } \default
b8)[ e]
- <>\footnote
+ \footnote
\markup { 4 } #'(1 . -1) #'Stem
- \markup { \bold 4. { This is a stem } }
+ \markup { \bold 4. { This is a stem } } \default
c4
- <>\footnote
+ \footnote
\markup \concat \teeny { "sharp (v)" }
#'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { v. A cautionary accidental }
+ \markup \italic { v. A cautionary accidental } \default
- <>\footnote
+ \footnote
\markup \concat \teeny { "a" } #'(0.5 . -0.5) #'TextScript
- \markup \italic { a. Slow Down }
+ \markup \italic { a. Slow Down } \default
dis?4_"rit."
\breathe
- <>\footnote
+ \footnote
\markup { \teeny \musicglyph #"rests.4" }
#'(1.5 . -0.25) #'BreathingSign
- \markup { \null }
+ \markup { \null } \default
}
}
@end lilypond
Attempts to compile LilyPond natively on Windows have been
unsuccessful, though a workaround is available (see
-@rcontrib{Lilydev}).
+@rcontrib{LilyDev}).
@node Requirements
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote #'(0.5 . -2) #'NoteHead
- \markup { The first note }
+ \footnote #'(0.5 . -2) #'NoteHead
+ \markup { The first note } \default
a'4 b8
- <>\footnote #'(0.5 . 1) #'NoteHead
- \markup { The third note }
+ \footnote #'(0.5 . 1) #'NoteHead
+ \markup { The third note } \default
e c4 d4
}
}
\header { tagline = ##f }
\relative c' {
<
- c\footnote #'(1 . -1.25) "Here is a C"
- es\footnote #'(2 . -0.25) \markup { \italic "An E-flat" }
- g\footnote #'(2 . 3) \markup { \bold "This is a G" }
+ c-\footnote #'(1 . -1.25) "Here is a C" \default
+ es-\footnote #'(2 . -0.25) \markup { \italic "An E-flat" } \default
+ g-\footnote #'(2 . 3) \markup { \bold "This is a G" } \default
>1
}
}
\book {
\header { copyright = \markup { "Copyright 1970" } }
\relative c' {
- <>\footnote #'(-3 . 0) #'DynamicText
- \markup { \bold Forte }
+ \footnote #'(-3 . 0) #'DynamicText
+ \markup { \bold Forte } \default
- <>\footnote #'(0 . 1.5) #'Slur
- \markup { A slur }
+ \footnote #'(0 . 1.5) #'Slur
+ \markup { A slur } \default
a'4\f(
- <>\footnote #'(0 . -2) #'Beam
- \markup { Beam }
+ \footnote #'(0 . -2) #'Beam
+ \markup { Beam } \default
b8)[ e]
- <>\footnote #'(1 . -1) #'Stem
- \markup { \teeny { This is a stem } }
+ \footnote #'(1 . -1) #'Stem
+ \markup { \teeny { This is a stem } } \default
c4
- <>\footnote #'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { A cautionary accidental }
+ \footnote #'(0 . 0.5) #'AccidentalCautionary
+ \markup \italic { A cautionary accidental } \default
- <>\footnote #'(0.5 . -0.5) #'TextScript
- \markup \italic { Slow Down }
+ \footnote #'(0.5 . -0.5) #'TextScript
+ \markup \italic { Slow Down } \default
dis?4_"rit."
}
}
\book {
\header { tagline = ##f }
\relative c' {
- a'4\footnote
- "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" }
+ a'4-\footnote
+ "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" } \default
b8
- e\footnote
- \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note"
+ e-\footnote
+ \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note" \default
c4
- d\p\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano"
+ d\p-\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano" \default
}
}
@end lilypond
\header { tagline = ##f }
\relative c' {
<
- c\footnote "1" #'(1 . -1.25) "1. C"
- es\footnote
- \markup { \bold "b" } #'(2 . -0.25) "b. E-flat"
- g\footnote "3" #'(2 . 3) \markup { \italic "iii. G" }
+ c-\footnote "1" #'(1 . -1.25) "1. C" \default
+ es-\footnote
+ \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" \default
+ g-\footnote "3" #'(2 . 3) \markup { \italic "iii. G" } \default
>1
}
}
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote
+ \footnote
\markup { \teeny 1 } #'(-3 . 0) #'DynamicText
- \markup { 1. \bold Forte }
+ \markup { 1. \bold Forte } \default
- <>\footnote
+ \footnote
\markup { \teeny b } #'(0 . 1.5) #'Slur
- \markup { b. A slur }
+ \markup { b. A slur } \default
a'4\f(
- <>\footnote
+ \footnote
\markup { \teeny 3 } #'(0 . -2) #'Beam
- \markup { 3. Beam }
+ \markup { 3. Beam } \default
b8)[ e]
- <>\footnote
+ \footnote
\markup { 4 } #'(1 . -1) #'Stem
- \markup { \bold 4. { This is a stem } }
+ \markup { \bold 4. { This is a stem } } \default
c4
- <>\footnote
+ \footnote
\markup \concat \teeny { "sharp (v)" }
#'(0 . 0.5) #'AccidentalCautionary
- \markup \italic { v. A cautionary accidental }
+ \markup \italic { v. A cautionary accidental } \default
- <>\footnote
+ \footnote
\markup \concat \teeny { "a" } #'(0.5 . -0.5) #'TextScript
- \markup \italic { a. Slow Down }
+ \markup \italic { a. Slow Down } \default
dis?4_"rit."
\breathe
- <>\footnote
+ \footnote
\markup { \teeny \musicglyph #"rests.4" }
#'(1.5 . -0.25) #'BreathingSign
- \markup { \null }
+ \markup { \null } \default
}
}
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.15.10"
+@c \version "2.15.39"
@node Tweaking output
@chapter Tweaking output
which occur at the same musical moment as the @code{\override}
command itself.
-The @code{\tweak} command operates in a different way. It acts
-on the immediately following item in the input stream. However,
-it is effective only on objects which are created directly from
-the input stream, essentially note heads and articulations;
-objects such as stems and accidentals are created later and
-cannot be tweaked in this way.
+The @code{\tweak} command operates in a different way. It acts on
+the immediately following item in the input stream. In its simplest
+form, it is effective only on objects which are created directly
+from the following item, essentially note heads and articulations.
So to return to our example, the size of the middle note of
a chord would be changed in this way:
<c \tweak #'font-size #-3 e g>4
@end lilypond
-Note that the syntax of @code{\tweak} is different from that
-of the @code{\override} command. Neither the context nor the
-layout object should be specified; in fact, it would generate
-an error to do so. These are both implied by the following
-item in the input stream. Note also that an equals sign should
-not be present. So the general syntax of the
-@code{\tweak} command is simply
+Note that the syntax of @code{\tweak} is different from that of the
+@code{\override} command. The context should not be specified; in
+fact, it would generate an error to do so. Both context and layout
+object are implied by the following item in the input stream. Note
+also that an equals sign should not be present. So the simple form
+of the @code{\tweak} command is
@example
\tweak #'@var{layout-property} #@var{value}
itself. In case of multiple direction overrides (@code{^} or @code{_}),
the leftmost override wins since it is applied last.
+@cindex @code{\tweak}, Accidental
+@cindex @code{\tweak}, specific layout object
+
+Objects such as stems and accidentals are created later, and not
+directly from the following event. It is still possible to use
+@code{\tweak} on such indirectly created objects by explicitly naming
+the layout object, provided that LilyPond can trace its origin back to
+the original event:
+
+@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
+<\tweak Accidental #'color #red cis4
+ \tweak Accidental #'color #green es
+ g>
+@end lilypond
+
+This long form of the @code{\tweak} command can be described as
+@example
+\tweak @var{layout-object} #'@var{layout-property} @var{value}
+@end example
+
@cindex tuplets, nested
@cindex triplets, nested
@cindex bracket, tuplet
% Stem on the d2 must be down to permit merging
\stemDown
% Stem on the d2 should be invisible
- \once \override Stem #'transparent = ##t
- \once \override Flag #'transparent = ##t
+ \tweak Stem #'transparent ##t
+ \tweak Flag #'transparent ##t
d2
}
\new Voice {
% Stem on the d2 must be down to permit merging
\stemDown
% Stem on the d2 should be invisible
- \once \override Stem #'transparent = ##t
- \once \override Flag #'transparent = ##t
+ \tweak Stem #'transparent ##t
+ \tweak Flag #'transparent ##t
d2
}
\new Voice {
@lilypond[quote,fragment,relative=2,verbatim]
<<
{
- \once \override Stem #'transparent = ##t
- \once \override Flag #'transparent = ##t
+ \tweak Stem #'transparent ##t
+ \tweak Flag #'transparent ##t
b8~ b\noBeam
}
\\
@lilypond[quote,fragment,relative=2,verbatim]
<<
{
- \once \override Stem #'transparent = ##t
- \once \override Flag #'transparent = ##t
- \once \override Stem #'length = #8
+ \tweak Stem #'transparent ##t
+ \tweak Flag #'transparent ##t
+ \tweak Stem #'length #8
b8~ b\noBeam
}
\\
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.15.20"
+@c \version "2.15.39"
@node Changing defaults
@chapter Changing defaults
syntax:
@example
-\tweak #'@code{grob-property} #@code{value}
+\tweak @var{layout-object} #'@var{grob-property} @var{value}
@end example
-The @code{\tweak} command applies to the object that immediately
-follows @code{value} in the music stream.
+Specifying @var{layout-object} is optional.
+The @code{\tweak} command applies to the music object that immediately
+follows @var{value} in the music stream.
@ignore
In some cases, it is possible to take a short-cut for tuning
For the @code{\tweak} command to work, it must
remain immediately adjacent to the object to which it is
to apply after the input file has been converted to a music stream.
-At times, LilyPond may insert additional items into the music stream
-during the parsing process. For example, when a note that is not
-explicitly part of a chord will be placed in a chord by LilyPond,
-so notes to be modified with @code{\tweak} must be placed inside
-a chord construct:
+Tweaking a whole chord does not do anything since its music event
+only acts as a container, and all layout objects are created from events
+inside of the @code{EventChord}:
@lilypond[relative=2,verbatim,quote]
\tweak #'color #red c4
-<\tweak #'color #red c>4
+\tweak #'color #red <c e>4
+<\tweak #'color #red c e>4
@end lilypond
-The @code{\tweak} command cannot be used to modify any item
-that does not appear explicitly in the input file. In particular
-it cannot be used to modify stems,
-beams or accidentals directly, since these are generated later by
-note heads, rather than by music elements in the input stream.
-Nor can @code{\tweak} be used to modify clefs or time
+The simple @code{\tweak} command cannot be used to modify any object
+that is not directly created from the input. In particular
+it will not affect stems, automatic
+beams or accidentals, since these are generated later by
+\@code{NoteHead} layout objects rather than by music elements in the
+input stream.
+
+Such indirectly created layout objects can be tweaked using the explicit
+form of the @code{\tweak} command:
+
+@lilypond[relative=2,verbatim,quote]
+\tweak Stem #'color #red
+\tweak Beam #'color #green c8 e
+<c e \tweak Accidental #'font-size #-3 ges>4
+@end lilypond
+
+@code{\tweak} cannot be used to modify clefs or time
signatures, since these become separated from any preceding
@code{\tweak} command in the input stream by the automatic
insertion of extra elements required to specify the context.
@rextend{Displaying music expressions}.
@knownissues
-@cindex tweaks in a variable
-
-The @code{\tweak} command cannot be used inside a variable.
-
-@cindex tweaks in lyrics
-The @code{\tweak} commands cannot be used in @code{\lyricmode}.
@cindex tweaking control points
@cindex control points, tweaking
In addition to numbers, we can use music expressions such
as notes for arguments to music functions:
-@c TODO: use a better example (the music argument is redundant).
-
@lilypond[quote,verbatim,ragged-right]
custosNote =
#(define-music-function
(parser location note)
(ly:music?)
#{
- \once \override Voice.NoteHead #'stencil =
- #ly:text-interface::print
- \once \override Voice.NoteHead #'text =
- \markup \musicglyph #"custodes.mensural.u0"
- \once \override Voice.Stem #'stencil = ##f
+ \tweak NoteHead #'stencil #ly:text-interface::print
+ \tweak NoteHead #'text
+ \markup \musicglyph #"custodes.mensural.u0"
+ \tweak Stem #'stencil ##f
$note
#})
tempoPadded =
#(define-music-function
(parser location padding tempotext)
- (number? string?)
+ (number? markup?)
#{
\once \override Score.MetronomeMark #'padding = #padding
\tempo \markup { \bold #tempotext }
\relative c'' {
\tempo \markup { "Low tempo" }
c4 d e f g1
- \tempoPadded #4.0 #"High tempo"
+ \tempoPadded #4.0 "High tempo"
g4 f e d c1
}
@end lilypond
@cindex fret
@funindex minimumFret
+@funindex restrainOpenStrings
By default pitches are assigned to the lowest playing position on the
fret-board (first position). Open strings are automatically preferred.
comfortable to define the playing position by using the value of
@code{minimumFret}. The default value for minimumFret is 0.
+Even when @code{minimumFret} is set, open strings are used whenever
+possible. This behaviour can be changed by setting @code{restrainOpenStrings}
+to @code{#t}.
@lilypond[quote,ragged-right,verbatim]
\layout { \override Voice.StringNumber #'stencil = ##f }
c16 d e f g4
c,16\5 d\5 e\4 f\4 g4\4
\set TabStaff.minimumFret = #5
+ \set TabStaff.restrainOpenStrings = ##t
c,16 d e f g4
}
>>
@node Footnotes overview
@unnumberedsubsubsec Footnotes overview
-Automatic footnotes create incrementing, numerical indicators and
-manual footnotes allow a custom indicator to be created instead. All
-grobs, top-level @code{\markup} and chorded notes can be annotated.
+Automatic footnotes create incrementing numerical indicators and manual
+footnotes allow a custom indicator to be created instead. Footnotes are
+normally applied like @code{\tweak} and consequently can be placed
+directly on grobs (graphical objects) created by most music elements and
+post-events. In cases where this does not work (like with bar lines and
+meter changes, where the grobs are produced as a consequence of property
+changes), footnotes can also be specified as a standalone music event
+affecting all grobs of a given type at a particular time step.
-The order in which each grob is drawn determines the order in which each
-indicator and so footnotes are created during compilation.
+The full form of a footnote command is
+@example
+\footnote @var{mark} @var{offset} @var{grob-name} @var{footnote}
+@var{music}
+@end example
+
+The elements are as follows:
+
+@table @var
+@item mark
+is a markup or string specifying the footnote mark which is used for
+both marking the reference point as well as the footnote itself at the
+bottom of the page. It can be omitted (or equivalently replaced with
+@code{\default}) in which case a number in sequence will be generated.
+@item offset
+is a number pair such as @samp{#(2 . 1)} specifying the X and Y offset
+from the reference point where the mark will be placed.
+@item grob-name
+specifies a type of grob to mark (like @samp{#'Flag}). If it is given,
+the respective grob will be used as a reference point even in case that
+its @q{cause} is not the referenced @var{music} itself but a grob
+created from it. It can be omitted (or replaced with @code{\default}),
+and then only a directly created grob will be annotated.
+@item footnote
+This markup or string specifies the footnote text to use at the bottom
+of the page.
+@item music
+This is the item, a music event or chord constituent or post-event, that
+is being annotated. While it cannot be omitted, it @emph{can} be
+replaced by @code{\default} in which case the footnote is not attached
+to a music expression in particular, but rather to a moment of time. It
+is mandatory in this case to use the @var{grob-name} argument for
+selecting an affected grob type, like @samp{#'TimeSignature}.
+@end table
+
+Like with @code{\tweak}, if your @code{\footnote} is applied to a
+post-event or articulation, it will itself have to be preceded with
+@code{-} to make the parser attach the result to the preceding note or
+rest.
@node Automatic footnotes
@unnumberedsubsubsec Automatic footnotes
-Automatic footnotes take three arguments; the @var{Layout Object} to be
-annotated, the @samp{(x . y)} position of the indicator and a
-@code{\markup} that will appear in the footnote at the bottom of the
-page.
-
-The command @code{\footnote} must come @emph{before} the grob that the
-footnote is being attached to:
+Automatic footnotes take four arguments: the @samp{(x . y)} position of
+the indicator, the optional @var{grob-name} specifying the layout object
+to be annotated, the @var{footnote} markup itself that will appear at
+the bottom of the page, and of course the @var{music} to attach the
+footnote to.
@lilypond[verbatim,quote,ragged-right,papersize=a8]
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote #'(0.5 . -2) #'NoteHead
+ \footnote #'(0.5 . -2)
\markup { The first note }
a'4 b8
- <>\footnote #'(0.5 . 1) #'NoteHead
+ \footnote #'(0.5 . 1) #'Flag
\markup { The third note }
- e c4 d4
+ e\noBeam c4 d4
}
}
@end lilypond
-To annotate chorded notes, the @code{\footnote} must come @emph{after}
-the note to which the footnote is being attached as a @code{TextScript}:
+Chorded notes pose no particular difficulty:
@lilypond[verbatim,quote,ragged-right,papersize=a8]
\book {
\header { tagline = ##f }
\relative c' {
<
- c\footnote #'(1 . -1.25) "Here is a C"
- es\footnote #'(2 . -0.25) \markup { \italic "An E-flat" }
- g\footnote #'(2 . 3) \markup { \bold "This is a G" }
+ \footnote #'(1 . -1.25) "Here is a C" c
+ \footnote #'(2 . -0.25) \markup { \italic "An E-flat" } es
+ \footnote #'(2 . 3) \markup { \bold "This is a G" } g
>1
}
}
\book {
\header { copyright = \markup { "Copyright 1970" } }
\relative c' {
- <>\footnote #'(-3 . 0) #'DynamicText
- \markup { \bold Forte }
-
- <>\footnote #'(0 . 1.5) #'Slur
- \markup { A slur }
- a'4\f(
-
- <>\footnote #'(0 . -2) #'Beam
- \markup { Beam }
- b8)[ e]
-
- <>\footnote #'(1 . -1) #'Stem
+ a'4-\footnote #'(-3 . 0) \markup { \bold Forte } \f
+ -\footnote #'(0 . 1.5) \markup { A slur } (
+ b8)-\footnote #'(0 . -2) \markup { Beam } [ e]
+ \footnote #'(1 . -1) #'Stem
\markup { \teeny { This is a stem } }
c4
-
- <>\footnote #'(0 . 0.5) #'AccidentalCautionary
+ \footnote #'(0 . 0.5) #'AccidentalCautionary
\markup \italic { A cautionary accidental }
-
- <>\footnote #'(0.5 . -0.5) #'TextScript
- \markup \italic { Slow Down }
- dis?4_"rit."
+ \footnote #'(1 . 1) "The note itself"
+ dis?4-\footnote #'(0.5 . -0.5) \markup \italic { Slow Down }
+ _"rit."
}
}
@end lilypond
@cindex footnotes, manual
-Manual footnotes takes four arguments; the @var{Layout Object} to be
-annotated, the @samp{(x . y)} position of the indicator and two
-@code{\markup} commands; the first is the indicator attached to the note
-or grob and the second is the footnote at the bottom of the page.
+Manually marked footnotes take an additional first markup argument
+@var{mark} for making the reference mark. In contrast to automatically
+generated footnote marks, they will not appear before the @var{footnote}
+markup at the bottom of the page: establishing the visual connection is
+left to the user. LilyPond will only make sure that the corresponding
+markup appears on the bottom of the same page.
-Like automatic footnotes, manual @code{\footnote} commands must come
-@emph{before} the grob that the footnote is annotating and attached as a
-@code{TextScript}:
+Other than that, the use is identical to that of automatically numbered
+footnotes.
@lilypond[verbatim,quote,ragged-right,papersize=a8]
\book {
\header { tagline = ##f }
\relative c' {
- a'4\footnote
- "1" #'(0.5 . -2) #'NoteHead \markup { \italic "1. The first note" }
+ \footnote
+ "1" #'(0.5 . -2)
+ \markup { \italic "1. The first note" }
+ a'4
b8
- e\footnote
- \markup { \bold "2" } #'(0.5 . 1) #'NoteHead "2. The second note"
+ \footnote
+ \markup { \bold "2" } #'(0.5 . 1)
+ "2. The second note"
+ e
c4
- d\p\footnote "3" #'(0.5 . -1) #'DynamicText "3. Piano"
+ d-\footnote "3" #'(0.5 . -1) "3. Piano" \p
}
}
@end lilypond
\header { tagline = ##f }
\relative c' {
<
- c\footnote "1" #'(1 . -1.25) "1. C"
- es\footnote
- \markup { \bold "b" } #'(2 . -0.25) "b. E-flat"
- g\footnote "3" #'(2 . 3) \markup { \italic "iii. G" }
+ \footnote "1" #'(1 . -1.25) "1. C" c
+ \footnote
+ \markup { \bold "b" } #'(2 . -0.25) "b. E-flat" es
+ \footnote "3" #'(2 . 3) \markup { \italic "iii. G" } g
>1
}
}
\book {
\header { tagline = ##f }
\relative c' {
- <>\footnote
- \markup { \teeny 1 } #'(-3 . 0) #'DynamicText
- \markup { 1. \bold Forte }
-
- <>\footnote
- \markup { \teeny b } #'(0 . 1.5) #'Slur
- \markup { b. A slur }
- a'4\f(
-
- <>\footnote
- \markup { \teeny 3 } #'(0 . -2) #'Beam
- \markup { 3. Beam }
- b8)[ e]
-
- <>\footnote
+ a'4-\footnote
+ \markup { \teeny 1 } #'(-3 . 0)
+ \markup { 1. \bold Forte } \f
+ -\footnote
+ \markup { \teeny b } #'(0 . 1.5)
+ \markup { b. A slur } (
+ b8)-\footnote
+ \markup { \teeny 3 } #'(0 . -2)
+ \markup { 3. Beam } [
+ e]
+ \footnote
\markup { 4 } #'(1 . -1) #'Stem
\markup { \bold 4. { This is a stem } }
c4
-
- <>\footnote
+ \footnote
\markup \concat \teeny { "sharp (v)" }
#'(0 . 0.5) #'AccidentalCautionary
\markup \italic { v. A cautionary accidental }
-
- <>\footnote
- \markup \concat \teeny { "a" } #'(0.5 . -0.5) #'TextScript
- \markup \italic { a. Slow Down }
- dis?4_"rit."
-
- \breathe
- <>\footnote
+ dis?4-\footnote
+ \markup \concat \teeny { "a" } #'(0.5 . -0.5)
+ \markup \italic { a. Slow Down } _"rit."
+ \footnote
\markup { \teeny \musicglyph #"rests.4" }
- #'(1.5 . -0.25) #'BreathingSign
- \markup { \null }
+ #'(1.5 . -0.25)
+ \markup { \null } \breathe
}
}
@end lilypond
@cindex scaling durations
@cindex durations, scaling
-You can alter the duration of single notes, rests or chords by a
+The duration of single notes, rests or chords may be multiplied by a
fraction @code{N/M} by appending @code{*N/M} (or @code{*N} if @code{M}
is 1) to the duration. This will not affect the appearance of the
notes or rests produced, but the altered duration will be used in
calculating the position within the measure and setting the duration
in the MIDI output. Multiplying factors may be combined like
-@code{*L*M/N}. Factors are part of the duration: if
-you don't specify a duration for subsequent notes, the default
-duration taken from the preceding note includes any scaling factor.
+@code{*L*M/N}. Factors are part of the duration: if a duration is
+not specified for subsequent notes, the default duration taken from
+the preceding note will include any scaling factor.
In the following example, the first three notes take up exactly
two beats, but no triplet bracket is printed.
lsrtags = "rhythms"
texidoc = "
-<code>shiftDurations</code> can be used to change the note lengths of a
+@code{shiftDurations} can be used to change the note lengths of a
piece of music. It takes two arguments - the scaling factor as a power
of two, and the number of dots to be added as a positive integer.
@ref{Development}: for contributors and testers.
@item
-@ref{GSoC}: list of projects for Google Summer of Code.
+@ref{GSoC 2012}: our ideas for 2012 edition of Google Summer of Code.
@item
@ref{Authors}: the people who made LilyPond what it is today.
* Help us::
* Sponsoring::
* Development::
-* GSoC::
+* GSoC 2012::
* Authors::
* Publications::
* Old news::
-@node GSoC
-@unnumberedsec GSoC
+@node GSoC 2012
+@unnumberedsec GSoC 2012
@divClass{column-center-top}
@subheading What is Google Summer of Code?
-Quoting
-@uref{http://www.google-melange.com/gsoc/homepage/google/gsoc2012,
-GSoC website},
-@qq{Google Summer of Code is a global program that offers students
-stipends to write code for open source projects. Google has worked
-with the open source community to identify and fund exciting projects
-for the upcoming summer.}
+It is a global program run by Google that offers students stipends
+for working on open source software projects during summer vacations.
The LilyPond Team decided that this is an excellent opportunity to find
-new contributors, encourage students already participating in LilyPond
-development to become more involved, and - last but not least - write
-some great code for the benefit of all!
-
-We are participating in GSoC as a part of GNU Project. See
-@uref{http://www.gnu.org/software/soc-projects/guidelines.html,
-GNU GSoC webpage} for information on how to participate.
+new contributors and encourage students already participating in LilyPond
+development to become more involved. One of our contributors was accepted
+for 2012 edition of the program as part of the
+@uref{http://www.gnu.org/, GNU project};
+we hope to participate in future editions as well.
@divEnd
@divClass{column-center-bottom}
-@subheading Our Ideas List
+@subheading Our 2012 Ideas List
-Below is a list of projects suggested for GSoC students. If you don't
-see a project that suits you, feel free to suggest your own!
-It's also possible to scale down a project if you feel it's too big.
+Below is a list of projects that we suggested for GSoC 2012 students.
+Although the application period is over, we decided to keep this webpage
+online as an inpiration for anyone who is interested in developing LilyPond.
+Some members of the development team are willing to help people who would like
+to tackle these projects.
-We require that every student has basic @code{git} knowledge, and
-recommend that everyone applying for projects other than the last one
-have basic music notation knowledge.
+Of course, there are many more things to improve in LilyPond, including
+very small ones. A full list of all known issues can be found
+@uref{http://code.google.com/p/lilypond/issues/list, here}.
@subheading Grace notes
@strong{Mentor(s):} Mike Solomon, Carl Sorensen
-@subheading Better tablature support
-
-@divClass{keep-bullets}
-@itemize
-
-@item
-Non-monotonic string tunings, like Ukulele
-
-@item
-Create tablature input mode (currently musical information is entered
-in western-common-music-notation-terms, i.e. @qq{a quarter f sharp note}
-and then converted to tablature) for transcribing medieval lute
-tablature
-
-@item
-Implement modern tablature features, such as bends, pull-off, hammer-on
-
-@item
-If a fretboard shape is defined for a given chord, use this information
-when displaying the chord on the staff (and not just display a default
-chord shape)
-
-@end itemize
-@divEnd
-
-@strong{Difficulty:} easy
-
-@strong{Requirements:} C++
-
-@strong{Recommended knowledge:} tablature notation familiarity
-
-@strong{Mentor(s):} Carl Sorensen
-
@subheading Clean up various compilation warnings
Clean up compiler warnings, static code analysis, and valgrind warnings.
@c used for news about the upcoming release; see CG 10.2
-
@newsItem
-@subsubheading Release candidate 6 of 2.16 - LilyPond 2.15.38 released! @emph{May 3, 2012}
+@subsubheading Release candidate 7 of 2.16 - LilyPond 2.15.39 released! @emph{May 22, 2012}
-LilyPond 2.15.38 is out; this is the sixth release candidate of
+LilyPond 2.15.39 is out; this is the seventh release candidate of
the upcoming 2.16 stable release. All users are invited to
experiment with this version. New features since 2.14.2 are
listed in the @qq{Changes} manual on the website section about
There are no known Critical issues with this release. If no
Critical bugs are found, then the official 2.16.0 release will be
-on 17 May 2012. If you discover any problems, please send us
+on 05 June 2012. If you discover any problems, please send us
@ref{Bug reports}.
@newsEnd
+
+@newsItem
+@subsubheading The LilyPond Report #26. @emph{May 22, 2012}
+
+The @emph{LilyPond Report} is back, with a new editor on board -
+Pavel Roskin, who tells us about his adventures in strange lands
+of compiler bugs! There is also a detailed report about current
+development status, and an analysis of example LilyPond output -
+see for yourself how close (or how far?) are we from matching
+the quality of hand-engraved scores.
+
+Come
+@uref{http://news.lilynet.net/?The-LilyPond-Report-26, read
+LilyPond Report 26} now; comments and contributions are
+warmly encouraged!
+
+@newsEnd
+
+
+@newsItem
+@subsubheading Release candidate 6 of 2.16 - LilyPond 2.15.38 released! @emph{May 3, 2012}
+
+LilyPond 2.15.38 is out; this is the sixth release candidate of
+the upcoming 2.16 stable release. All users are invited to
+experiment with this version. New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
+
+@strong{Update:} Due to a few Critical bugs, another release
+candidate will be required.
+
+@newsEnd
+
+
@newsItem
@subsubheading LilyPond takes part in Google Summer of Code 2012! @emph{April 25, 2012}
<tweet>
The Ensemble 101 is going on a European tour where they'll sing music
typeset using LilyPond. Click <a target="_blank"
-href="http://www.kickstarter.com/projects/751757415/ensemble-101"
+href="http://www.kickstarter.com/projects/751757415/ensemble-101-get-a-singtone"
>here</a> to learn more!
</tweet>
<tweet>
L'Ensemble 101 part en <a target="_blank"
-href="http://www.kickstarter.com/projects/751757415/ensemble-101"
+href="http://www.kickstarter.com/projects/751757415/ensemble-101-get-a-singtone"
>tournée</a> en France et en Irlande où ils chanteront
des partitions gravées avec LilyPond.
</tweet>
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=15
-PATCH_LEVEL=39
+PATCH_LEVEL=40
MY_PATCH_LEVEL=
VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.38
+VERSION_DEVEL=2.15.39
-\version "2.14.0"
+\version "2.15.34"
\header {
texidoc = "Seconds do not confuse the collision algorithm.
\version "2.14.0"
\header {
- texidoc = "Mixed collisions with whole notes require asymmetric shifts."
+ texidoc = "Mixed collisions with whole and longer notes
+ require asymmetric shifts."
}
\layout{ragged-right=##t}
\relative c'' {
+ \override Score.NoteHead #'style = #'altdefault
<<
- { c1 c2 s2 c1 c4 s2. }
+ { c1 c2*2 c1 c4*4 c1 c\breve*1/2 c\breve*1/2 b\breve*1/2 }
\\
- { c2 s2 c1 c4 s2. c1 }
+ { c2*2 c1 c4*4 c1 c\breve*1/2 c1 b\breve*1/2 c\breve*1/2 }
>>
}
\test ##[ < c \tweak #'transparent ##t e > #]
\test ##[ < \tweak #'color #'(1.0 0.0 0.0) \tweak #'duration-log #2 c > #]
\test ##[ c-\tweak #'font-size #3 -> #]
+\test ##[ < \tweak Accidental #'color #'(1.0 0.0 0.0) cis eis g > #]
%% end test.
texidoc = "It is possible to associate
fingerings uniquely with notes. This makes it possible to add
-horizontal fingerings to notes.
-
+horizontal fingerings to notes. Fingering clears stems and flags
+if @code{'add-stem-support} is set.
"
}
\once \override Fingering #'staff-padding = #'()
< c-1 e-2 g-3 b-5 > 4
- \set fingeringOrientations = #'(up left)
- < c-1 e-2 g-3 b-5 > 4
+ \set fingeringOrientations = #'(up right)
+ < c-1 e-2 g-3 b-5 > 4.
\set fingeringOrientations = #'(right)
- < c-1 e-2 g-3 b-5 > 4
+ < c-1 e-2 g-3 b-5 > 8
+
+ \override Fingering #'add-stem-support = ##t
+ \set fingeringOrientations = #'(up right)
+ < c-1 e-2 g-3 b-5 > 4.
+
+ \set fingeringOrientations = #'(right)
+ < c-1 e-2 g-3 b-5 > 8
}
\markup { h i }
\relative c' {
-<>\footnote #'(1 . -1) #'NoteHead \markup { j }
+\footnote #'(1 . -1) #'NoteHead \markup { j } \default
a b c d }
\pageBreak
\relative c' {
d4 e
- < f a\footnote #'(1 . -1) \markup { n } c >
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ < f \footnote #'(1 . -1) \markup { n } a c >
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c |
d a b c |
d a b c |
d a b c\f |
d4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 0))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 2 4)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c\f |
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c\f |
d a b c |\break
d,4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 6))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 8 10)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c |
d a b c\f |\pageBreak
d,4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 12))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 14 16)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) #'Beam \markup { o } [ b c d ] a4 b c |
d a b c\! |\break
}
\new Staff \relative c' {
d4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 1))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 3 5)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c\f |
+ a8-\footnote #'(1 . 1) #'Hairpin \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c\f |
d a b c |\break
d,4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 7))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 9 11)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c |
d a b c\f |\pageBreak
d,4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 13))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 15 17)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ a8-\footnote #'(1 . 1) #'Hairpin \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c |
d a b c\! |\break
}
>>
\relative c' {
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 3))
- <>\footnote #'(1 . -1) #'NoteHead \markup { j }
+ \footnote #'(1 . -1) #'NoteHead \markup { j } \default
a b c d
}
d4 e
\once \override FootnoteItem #'numbering-assertion-function =
#(lambda (grob) (make-footnote-numbering-assertion-function 5))
- < f a\footnote #'(1 . -1) \markup { n } c >
+ < f \footnote #'(1 . -1) \markup { n } a c >
\once \override FootnoteSpanner #'numbering-assertion-function =
#(simultaneous-footnote-numbering-assertion-function 6 7)
- <>\footnote #'(1 . 1) #'Beam \markup { o }
- <>\footnote #'(1 . 1) #'Hairpin \markup { p }
- a8\< [ b c d ] a4 b c |
+ a8-\footnote #'(1 . 1) \markup { p } \<
+ -\footnote #'(1 . 1) \markup { o } [ b c d ] a4 b c |
d a b c |
d a b c |
d a b c\f |
{
\relative c' {
c1
- <>\footnote "foo" #'(0 . 2) #'TimeSignature "bar"
+ \footnote "foo" #'(0 . 2) #'TimeSignature "bar" \default
\time 3/4
\break \pageBreak
c2.
\once \override Staff . FootnoteItem #'break-visibility = ##(#f #f #t)
- <>\footnote "foo" #'(0 . 2) #'TimeSignature "bar"
+ \footnote "foo" #'(0 . 2) #'TimeSignature "bar" \default
\time 4/4
\break \pageBreak
c1 \bar "|."
texidoc = "The padding between a footnote and the footer can be tweaked."
}
+% TODO: then why isn't it tweaked?
+
#(set-default-paper-size "a6")
\book {
\relative c' {
- <>\footnote
+ \footnote
\markup { \tiny 1 }
- #'(1 . -1) #'NoteHead
+ #'(1 . -1)
\markup { 1. Tiny space below. }
e1
- <>\footnote
+ \footnote
\markup { \tiny 2 }
- #'(1 . -1) #'NoteHead
+ #'(1 . -1)
\markup { 2. Tiny space below. }
e1
- <>\footnote
+ \footnote
\markup { \tiny 3 }
- #'(1 . -1) #'NoteHead
+ #'(1 . -1)
\markup { 3. Big space below. }
e1
}}
\book {
\relative c'' {
-<>\footnote
+b4-\footnote
\markup { \tiny "1." }
#'(0.5 . 0.5) #'Hairpin
\markup { 1. \justify { Goes to the first broken spanner. } }
-b4\< c d a
+ \<
+c d a
b c d a
b c d a
b c d a
b c d a\!
\once \override FootnoteSpanner #'spanner-placement = #RIGHT
-<>\footnote
+b4-\footnote
\markup { \tiny "2." }
#'(0.5 . 0.5) #'Hairpin
\markup { 2. \justify { Goes to the last broken spanner. } }
-b4\< c d a
+ \<
+c d a
b c d a
b c d a
b c d a
\markup { h i }
\relative c' {
-<>\footnote \markup { \tiny 4 } #'(1 . -1) #'NoteHead \markup { 4. j }
+\footnote \markup { \tiny 4 } #'(1 . -1) \markup { 4. j }
a b c d }
\pageBreak
\relative c' {
d4 e
- < f a\footnote \markup { \tiny 6 } #'(1 . -1) \markup { 6. n } c >
- <>\footnote \markup { \tiny 7 } #'(1 . 1) #'Beam \markup { 7. o }
- <>\footnote \markup { \tiny 8 } #'(1 . 1) #'Hairpin \markup { 8. p }
- a8\< [ b c d\f ] r2. |
+ < f \footnote \markup { \tiny 6 } #'(1 . -1) \markup { 6. n } a c >
+ a8-\footnote \markup { \tiny 8 } #'(1 . 1) \markup { 8. p } \<
+ -\footnote \markup { \tiny 7 } #'(1 . 1) \markup { 7. o }
+ [ b c d\f ] r2. |
}}
--- /dev/null
+\header
+{
+
+ texidoc = "With the full form of the @code{\\tweak} function,
+individual grobs that are indirectly caused by events may be tuned."
+
+}
+
+\version "2.15.39"
+\paper {
+ ragged-right = ##t
+}
+
+\relative c''
+{
+ <
+ \tweak Accidental #'color #red cis4
+ \tweak Accidental #'color #green es
+ g
+ >4
+}
--- /dev/null
+\version "2.15.37"
+
+\header {
+ texidoc = "Hairpins in @code{Dynamics} contexts do not collide with
+arpeggios.
+"
+}
+
+\new PianoStaff<<
+ \set PianoStaff.connectArpeggios = ##t
+ { c''\arpeggio c'' }
+ \new Dynamics { s\< s\! }
+ { c'\arpeggio c'' }
+>>
\relative c' {
\repeat unfold 5 {
\once \override FootnoteItem #'footnote = ##f
- <>\footnote
- "" #'(0 . 0) #'NoteHead \markup { \box \fill-line { "this is a test" } }
+ \footnote
+ "" #'(0 . 0) #'NoteHead
+ \markup { \box \fill-line { "this is a test" } } \default
\repeat unfold 5 { a\< b c d\! }
- <>\footnote #'(-1 . 1) #'NoteHead "foobar"
+ \footnote #'(-1 . 1) #'NoteHead "foobar" \default
\repeat unfold 5 { a\< b c d\! }
}
}
--- /dev/null
+\version "2.15.37"
+
+\header {
+ texidoc = "Lyrics should still slide under @code{TimeSignature} when an
+@code{OctaveEight} is present.
+"
+}
+
+\new Staff {
+ \clef "treble_8"
+ b
+}
+\addlyrics {
+ \set stanza = "1."
+ aaa
+}
--- /dev/null
+\header
+{
+ texidoc = "The @code{\\tweak} function can be used in Lyrics."
+}
+
+\version "2.15.39"
+\paper {
+ ragged-right = ##t
+}
+
+\new Lyrics \lyricmode
+{
+ \markup \raise #1 \rotate #30 One 4
+ \tweak #'extra-offset #'(0 . 2) fish,
+ \markup \raise #1 \rotate #-30 two fish,
+ \tweak #'color #red red fish,
+ \tweak #'color #blue blue fish.
+}
melodic_ = 0;
accidental_ = 0;
origin_ = 0;
+ origin_engraver_ = 0;
head_ = 0;
}
#include "engraver.hh"
+#include "music.hh"
#include "stream-event.hh"
+#include "international.hh"
#include "item.hh"
#include "pointer-group-interface.hh"
#include "spanner.hh"
void stop_translation_timestep ();
void finalize ();
+ virtual void derived_mark () const;
void footnotify (Grob *, Stream_event *);
};
void
Footnote_engraver::finalize ()
{
- annotated_spanners_.resize (0);
+ annotated_spanners_.clear ();
+}
+
+void
+Footnote_engraver::derived_mark () const
+{
+ for (vsize i = 0; i < events_.size (); ++i)
+ scm_gc_mark (events_[i]->self_scm ());
}
Footnote_engraver::Footnote_engraver ()
void
Footnote_engraver::acknowledge_grob (Grob_info info)
{
+ Music *mus = unsmob_music (info.grob ()->get_property ("footnote-music"));
+
+ if (mus)
+ {
+ if (!mus->is_mus_type ("footnote-event")) {
+ mus->origin ()->programming_error (_ ("Must be footnote-event."));
+ return;
+ }
+ Stream_event *ev = mus->to_event (context ());
+ footnotify (info.grob (), ev);
+ ev->unprotect ();
+ return;
+ }
+
+ // The following performance hog should eventually be removed:
+ // instead of adding a -\footnote ... \default articulation at the
+ // end of a note, you can perfectly well use \footnote ... before
+ // the note. This is just for the sake of automatic convert-ly
+ // rules.
+
Stream_event *cause = info.event_cause ();
SCM arts = cause ? cause->get_property ("articulations") : SCM_EOL;
footnotify (info.grob (), e);
}
+ // In contrast, the following code is only called when actual
+ // footnote events have been listened to. It should not affect
+ // performance.
+
for (vsize i = 0; i < events_.size (); i++)
{
if (info.grob ()->name () == ly_symbol2string (events_[i]->get_property ("symbol")))
"extra-X-extent "
"extra-Y-extent "
"extra-offset "
+ "footnote-music "
"forced-spacing "
"interfaces "
"layer "
for (LEFT_and_RIGHT (d))
{
Item *b = bounds[d];
- Interval e = (Paper_column::has_interface (b) && b->break_status_dir ())
- ? Axis_group_interface::generic_bound_extent (b, common, X_AXIS)
- : robust_relative_extent (b, common, X_AXIS);
+ Interval e = Axis_group_interface::generic_bound_extent (b, common, X_AXIS);
x_points[d] = b->relative_coordinate (common, X_AXIS);
if (broken [d])
Interval ledger_extent_;
Interval head_extent_;
int position_;
- bool excentric_;
Ledger_request ()
{
ledger_extent_.set_empty ();
Interval span_points;
for (LEFT_and_RIGHT (d))
{
- Interval iv = bounds[d]->break_status_dir ()
- ? Axis_group_interface::generic_bound_extent (bounds[d], common, X_AXIS)
- : robust_relative_extent (bounds[d], common, X_AXIS);
+ Interval iv = Axis_group_interface::generic_bound_extent (bounds[d], common, X_AXIS);
span_points[d] = iv.is_empty ()
? bounds[d]->relative_coordinate (common, X_AXIS)
{
for (vsize i = 0; i < scripts->size (); i++)
if (stem_ && to_boolean (scripts->at (i).script_->get_property ("add-stem-support")))
- Side_position_interface::add_support (scripts->at (i).script_, stem_);
+ {
+ Side_position_interface::add_support (scripts->at (i).script_, stem_);
+ if (Grob *flag = unsmob_grob (stem_->get_object ("flag")))
+ Side_position_interface::add_support (scripts->at (i).script_, flag);
+ }
/*
This is not extremely elegant, but we have to do a little
Grob *head_up = Note_column::first_head (clash_up);
Grob *head_down = Note_column::first_head (clash_down);
+ Interval extent_up = head_up->extent (head_up, X_AXIS);
+ Interval extent_down = head_down->extent (head_down, X_AXIS);
+
/* Staff-positions of all noteheads on each stem */
vector<int> ups = Stem::note_head_positions (stems[UP]);
vector<int> dps = Stem::note_head_positions (stems[DOWN]);
}
full_collide = full_collide || (close_half_collide
- && distant_half_collide);
+ && distant_half_collide)
+ || ( distant_half_collide // like full_ for wholes and longer
+ && (up_ball_type <= 0 || down_ball_type <= 0));
/* Determine which chord goes on the left, and which goes right.
Up-stem usually goes on the right, but if chords just 'touch' we can put
*/
if (Stem::duration_log (stems[DOWN]) == 1
&& Stem::duration_log (stems[UP]) >= 3)
- shift_amount = (1 - head_up->extent (head_up, X_AXIS).length ()
- / head_down->extent (head_down, X_AXIS).length ()) * 0.5;
+ shift_amount = (1 - extent_up[RIGHT] / extent_down[RIGHT]) * 0.5;
}
if (dot_wipe_head)
else
shift_amount *= 0.17;
- /*
- */
- if (full_collide
- && down_ball_type *up_ball_type == 0)
- {
- if (up_ball_type == 0 && down_ball_type == 1)
- shift_amount *= 1.25;
- else if (up_ball_type == 0 && down_ball_type == 2)
- shift_amount *= 1.35;
- else if (down_ball_type == 0 && up_ball_type == 1)
- shift_amount *= 0.7;
- else if (down_ball_type == 0 && up_ball_type == 2)
- shift_amount *= 0.75;
- }
+ /* The offsets computed in this routine are multiplied,
+ in calc_positioning_done(), by the width of the downstem note.
+ The shift required to clear collisions, however, depends on the extents
+ of the note heads on the sides that interfere. */
+ if (shift_amount < 0.0) // Down-stem shifts right.
+ shift_amount *= (extent_up[RIGHT] - extent_down[LEFT]) / extent_down.length ();
+ else // Up-stem shifts right.
+ shift_amount *= (extent_down[RIGHT] - extent_up[LEFT]) / extent_down.length ();
/* If any dotted notes ended up on the left,
tell the Dot_Columnn to avoid the note heads on the right.
%type <scm> function_arglist_optional
%type <scm> function_arglist_backup
%type <scm> function_arglist_nonbackup
+%type <scm> function_arglist_nonbackup_common
+%type <scm> function_arglist_closed_nonbackup
%type <scm> function_arglist_skip
%type <scm> function_arglist_bare
%type <scm> function_arglist_closed
;
-function_arglist_nonbackup:
+function_arglist_nonbackup_common:
EXPECT_OPTIONAL EXPECT_PITCH function_arglist pitch_also_in_chords {
$$ = scm_cons ($4, $3);
}
| EXPECT_OPTIONAL EXPECT_DURATION function_arglist_closed duration_length {
$$ = scm_cons ($4, $3);
}
- | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg_closed
- {
- $$ = check_scheme_arg (parser, @4, $4, $3, $2);
- }
- | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number_closed
- {
- $$ = check_scheme_arg (parser, @4, $4, $3, $2);
- }
| EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed FRACTION
{
$$ = check_scheme_arg (parser, @4, $4, $3, $2);
}
;
+function_arglist_closed_nonbackup:
+ function_arglist_nonbackup_common
+ | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg_closed
+ {
+ $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+ }
+ | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number_closed
+ {
+ $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+ }
+ ;
+
+function_arglist_nonbackup:
+ function_arglist_nonbackup_common
+ | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg
+ {
+ $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+ }
+ | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number
+ {
+ $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+ }
+ ;
function_arglist_keep:
function_arglist_common
function_arglist_closed:
function_arglist_closed_common
- | function_arglist_nonbackup
+ | function_arglist_closed_nonbackup
;
function_arglist_closed_common:
pure_relevants_.push_back (i.item ());
}
+bool
+in_same_column (Grob *g1, Grob *g2)
+{
+ return (g1->spanned_rank_interval ()[LEFT]
+ == g2->spanned_rank_interval ()[LEFT])
+ && (g1->spanned_rank_interval ()[RIGHT]
+ == g2->spanned_rank_interval ()[RIGHT])
+ && (g1->spanned_rank_interval ()[LEFT]
+ == g1->spanned_rank_interval ()[RIGHT]);
+}
+
void
Pure_from_neighbor_engraver::acknowledge_pure_from_neighbor (Grob_info i)
{
temp.push_back (need_pure_heights_from_neighbors_[l]);
for (;
(l < need_pure_heights_from_neighbors_.size () - 1
- && (need_pure_heights_from_neighbors_[l]->spanned_rank_interval ()[LEFT]
- == need_pure_heights_from_neighbors_[l + 1]->spanned_rank_interval ()[LEFT]));
+ && ((need_pure_heights_from_neighbors_[l]
+ ->spanned_rank_interval ()[LEFT])
+ == (need_pure_heights_from_neighbors_[l + 1]
+ ->spanned_rank_interval ()[LEFT])));
l++)
temp.push_back (need_pure_heights_from_neighbors_[l + 1]);
need_pure_heights_from_neighbors.push_back (temp);
{
while (pos[1] < (int) need_pure_heights_from_neighbors.size ()
&& (pure_relevants_[i]->spanned_rank_interval ()[LEFT]
- > need_pure_heights_from_neighbors[pos[1]][0]->spanned_rank_interval ()[LEFT]))
+ > (need_pure_heights_from_neighbors[pos[1]][0]
+ ->spanned_rank_interval ()[LEFT])))
{
pos[0] = pos[1];
pos[1]++;
}
for (int j = 0; j < 2; j++)
- if (pos[j] >= 0 && pos[j] < (int) need_pure_heights_from_neighbors.size ())
- for (vsize k = 0; k < need_pure_heights_from_neighbors[pos[j]].size (); k++)
- Pointer_group_interface::add_grob (need_pure_heights_from_neighbors[pos[j]][k], ly_symbol2scm ("neighbors"), pure_relevants_[i]);
+ if (pos[j] >= 0 && pos[j]
+ < (int) need_pure_heights_from_neighbors.size ())
+ for (vsize k = 0;
+ k < need_pure_heights_from_neighbors[pos[j]].size ();
+ k++)
+ if (!in_same_column(need_pure_heights_from_neighbors[pos[j]][k],
+ pure_relevants_[i]))
+ Pointer_group_interface::add_grob
+ (need_pure_heights_from_neighbors[pos[j]][k],
+ ly_symbol2scm ("neighbors"),
+ pure_relevants_[i]);
}
need_pure_heights_from_neighbors_.clear ();
if (start && end)
s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
else if (start)
- s = "|:";
+ s = robust_scm2string (get_property ("startRepeatType"), "|:");
else if (end)
- s = ":|";
+ s = robust_scm2string (get_property ("endRepeatType"), ":|");
/*
TODO: line breaks might be allowed if we set whichBar to "".
Interval x_span;
for (LEFT_and_RIGHT (d))
{
- x_span[d] = bounds[d]->break_status_dir ()
- ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[d]
- : robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
+ x_span[d] = Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[d];
+
if (connect_to_other[d])
{
Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
void
Tweak_engraver::acknowledge_grob (Grob_info info)
{
- if (Stream_event *ev = info.event_cause ())
+ Stream_event *ev = info.event_cause ();
+ bool direct = ev;
+ SCM grobname = SCM_UNDEFINED;
+ if (!direct)
+ ev = info.ultimate_event_cause ();
+ if (ev)
{
for (SCM s = ev->get_property ("tweaks");
scm_is_pair (s); s = scm_cdr (s))
{
- info.grob ()->set_property (scm_caar (s), scm_cdar (s));
+ if (scm_is_pair (scm_caar (s))) {
+ if (SCM_UNBNDP (grobname))
+ grobname = scm_from_locale_symbol (info.grob ()->name ().c_str ());
+ if (scm_is_eq (scm_caaar (s), grobname))
+ info.grob ()->set_property (scm_cdaar (s), scm_cdar (s));
+ } else if (direct)
+ info.grob ()->set_property (scm_caar (s), scm_cdar (s));
}
}
}
\consists "Lyric_engraver"
\consists "Extender_engraver"
\consists "Hyphen_engraver"
+ \consists "Tweak_engraver"
\consists "Stanza_number_engraver"
\consists "Instrument_name_engraver"
\consists "Font_size_engraver"
defaultBarType = #"|"
doubleRepeatType = #":|:"
+ startRepeatType = #"|:"
+ endRepeatType = #":|"
barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
barNumberFormatter = #robust-bar-number-function
automaticBars = ##t
argument))
footnote =
-#(define-event-function (parser location text offset grob-name footnote)
- ((markup?) number-pair? (symbol? '()) markup?)
- (_i "Attach @var{text} at @var{offset} with @var{text} referring to
-@var{footnote}. If @var{text} is given as @code{\\default}, use
-autonumbering instead. Note that, for this to take effect,
-auto-numbering must be turned on in the paper block. Otherwise, no
-number will appear. Footnotes are applied like articulations. If a
-symbol @var{grob-name} is specified, all grobs of that kind at the
-current time step are affected.")
- (make-music
- 'FootnoteEvent
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'automatically-numbered (not text)
- 'text (or text (make-null-markup))
- 'footnote-text footnote
- 'symbol grob-name))
+#(define-music-function (parser location mark offset grob-name footnote music)
+ ((markup?) number-pair? (symbol?) markup? (ly:music?))
+ (_i "Make the markup @var{footnote} a footnote on @var{music}. The
+footnote is marked with a markup @var{mark} moved by @var{offset} with
+respect to the marked music.
+
+If @var{mark} is not given or specified as @var{\\default}, it is
+replaced by an automatically generated sequence number. If a symbol
+@var{grob-name} is specified, then grobs of that type will be marked
+if they have @var{music} as their ultimate cause; by default all grobs
+having @var{music} as their @emph{direct} cause will be marked,
+similar to the way @code{\\tweak} works.
+
+If @var{music} is given as @code{\\default}, a footnote event
+affecting @emph{all} grobs matching @var{grob-name} at a given time
+step is generated. This may be required for creating footnotes on
+time signatures, clefs, and other items not cooperating with
+@code{\\tweak}.
+
+Like with @code{\\tweak}, if you use a footnote on a following
+post-event, the @code{\\footnote} command itself needs to be attached
+to the preceding note or rest as a post-event with @code{-}.")
+ (let ((mus (make-music
+ 'FootnoteEvent
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'automatically-numbered (not mark)
+ 'text (or mark (make-null-markup))
+ 'footnote-text footnote
+ 'symbol (or grob-name '()))))
+ (if music
+ (begin
+ (set! (ly:music-property music 'tweaks)
+ (acons (if grob-name
+ (cons grob-name 'footnote-music)
+ 'footnote-music)
+ mus
+ (ly:music-property music 'tweaks)))
+ music)
+ mus)))
grace =
#(def-grace-function startGraceMusic stopGraceMusic
'Staff))
tweak =
-#(define-music-function (parser location sym val arg)
- (symbol? scheme? ly:music?)
- (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.")
-
- (if (equal? (object-property sym 'backend-type?) #f)
+#(define-music-function (parser location grob prop value music)
+ ((string?) symbol? scheme? ly:music?)
+ (_i "Add a tweak to the following @var{music}.
+Layout objects created by @var{music} get their property @var{prop}
+set to @var{value}. If @var{grob} is specified, like with
+@example
+\\tweak Accidental #'color #red cis'
+@end example
+an indirectly created grob (@samp{Accidental} is caused by
+@samp{NoteHead}) can be tweaked; otherwise only directly created grobs
+are affected.")
+ (if (not (object-property prop 'backend-type?))
(begin
- (ly:input-warning location (_ "cannot find property type-check for ~a") sym)
+ (ly:input-warning location (_ "cannot find property type-check for ~a") prop)
(ly:warning (_ "doing assignment anyway"))))
(set!
- (ly:music-property arg 'tweaks)
- (acons sym val
- (ly:music-property arg 'tweaks)))
- arg)
-
-
+ (ly:music-property music 'tweaks)
+ (acons (if grob (cons (string->symbol grob) prop) prop)
+ value
+ (ly:music-property music 'tweaks)))
+ music)
unfoldRepeats =
#(define-music-function (parser location music) (ly:music?)
def link_all_output_files (self, output_dir, output_dir_files, destination):
existing, missing = self.all_output_files (output_dir, output_dir_files)
if missing:
- print '\nMissing', missing
+ error (_ ('Missing files: %s') % ', '.join (missing))
raise CompileError(self.basename())
for name in existing:
if (self.global_options.use_source_file_names
except AttributeError:
shutil.copyfile (src, dst)
except OSError:
- print '\nCould not overwrite file', dst
+ error (_ ('Could not overwrite file %s') % dst)
raise CompileError(self.basename())
def additional_files_to_consider (self, base, full):
sub_tempo, str)
return str
-@rule((2, 15, 39), r"\footnote -> <>\footnote, -\footnote -> \footnote")
+@rule((2, 15, 39), r"\footnote ... -> \footnote ... \default")
def conv (str):
def not_first (s):
def match_fun (m):
return m.expand (s)
return match_fun
str = re.sub ("(" + matchmarkup + ")|"
- + r"(?<![-_^])((?:[-_^][-_^])*)(\\footnote(?:\s*"
+ + r"(\\footnote(?:\s*"
+ matchmarkup + ")?" + matcharg + "(?:" + matcharg
+ ")?\s+" + matchmarkup + ")",
- not_first (r"\2<>\3"), str)
- str = re.sub ("(" + matchmarkup + ")|"
- + r"(?<![-_^])((?:[-_^][-_^])*)-(\\footnote(?:\s*"
- + matchmarkup + ")?" + matcharg + "(?:" + matcharg
- + ")?\s+" + matchmarkup + ")",
- not_first (r"\2\3"), str)
+ not_first (r"\2 \\default"), str)
return str
# Guidelines to write rules (please keep this at the end of this file)
@code{(@var{notehead-style} @var{script} @var{vertical-position})} as
values.")
-
+ (endRepeatType ,string? "Set the default bar line for the ending
+of repeats.")
(explicitClefVisibility ,vector? "@samp{break-visibility}
function for clef changes.")
(explicitCueClefVisibility ,vector? "@samp{break-visibility}
@code{traditional}, or @code{semitone}.")
(stanza ,markup? "Stanza @q{number} to print before the start of a
verse. Use in @code{Lyrics} context.")
+ (startRepeatType ,string? "Set the default bar line for the beginning
+of repeats.")
(stemLeftBeamCount ,integer? "Specify the number of beams to draw
on the left side of the next note. Overrides automatic beaming. The
value is only used once, and then it is erased.")
approximately 12% larger; 6@tie{}steps are exactly a factor@tie{}2
larger. Fractional values are allowed.")
(footnote ,boolean? "Should this be a footnote or in-note?")
+ (footnote-music ,ly:music? "Music creating a footnote.")
(footnote-text ,markup? "A footnote for the grob.")
(force-hshift ,number? "This specifies a manual shift for notes
in collisions. The unit is the note head width of the first voice
(FootnoteEvent
. ((description . "Footnote a grob.")
- (types . (general-music event post-event footnote-event))
+ (types . (general-music event footnote-event))
))
(GlissandoEvent
(define* (tweaks->lily-string expr #:optional (post-event? #f))
(format #f "~{~a ~}"
(map (lambda (tweak)
- (format #f "~a\\tweak #'~a #~a"
+ (format #f "~a\\tweak ~a #~a"
(if post-event? "-" "")
- (car tweak)
+ (if (pair? (car tweak))
+ (format #f "~a #'~a"
+ (caar tweak) (cdar tweak))
+ (format #f "#'~a" (car tweak)))
(scheme-expr->lily-string (cdr tweak))))
(ly:music-property expr 'tweaks))))
else:
progress (_ ("All snippets are up to date..."))
- if options.lily_output_dir != options.output_dir:
- output_files = split_output_files (options.lily_output_dir)
+ progress (_ ("Linking files..."))
+ abs_lily_output_dir = os.path.join (options.original_dir, options.lily_output_dir)
+ abs_output_dir = os.path.join (options.original_dir, options.output_dir)
+ if abs_lily_output_dir != abs_output_dir:
+ output_files = split_output_files (abs_lily_output_dir)
for snippet in snippets:
- snippet.link_all_output_files (options.lily_output_dir,
+ snippet.link_all_output_files (abs_lily_output_dir,
output_files,
- options.output_dir)
+ abs_output_dir)
###
global_options.output_dir = os.path.expanduser (global_options.output_dir)
global_options.include_path.insert (0, inverse_relpath (original_dir, global_options.output_dir))
+ global_options.include_path.insert (0, ".%s" % os.path.sep)
+
# Load the python packages (containing e.g. custom formatter classes)
# passed on the command line
nr = 0