Am Sa., 20. Okt. 2018 um 23:11 Uhr schrieb Jean-Julien Fleck <jeanjulien.fl...@gmail.com>: > > Hi everyone, > > I have been searching how to indicate some optionnal finger indication in > parenthesis but found no direct way. I ended up using some quite complicated > hack: > > doigte = \markup { \halign #-0.5 \override #'(font-encoding . fetaText) > \magnify #0.5 (4)} > > and then {re-0-\doigte}. > It worked not so bad on the main score of the instrument but when I try to > use the same code in smaller size to get the piano part with a construct like > > \new Staff \with { > \magnifyStaff #5/7 > } { ... } > > it does not adapt using the same reduction factor. > I've gathered an example on http://lilybin.com/lm06kb/1 > with the finger indication occurence on third time of the second bar. As you > can see, it's too big compared to the rest over the piano staff. > > Any advice welcome on how to add parenthesis to the finger indication in a > way that would be easily reduced on the piano part. > > Cheers, > > -- > JJ Fleck
Use \fontsize instead of \magnify. Also, use either \fontsize #(magnification->font-size 0.5), if you really want to keep the numerical value for some reason. Though, (magnification->font-size 0.5) evaluates to -6.0. Thus \fontsize #-6.0 would do the trick as well. Btw, no reason to use \override #'(font-encoding . fetaText) here. \number is does the same and is shorter. For aligning I'd use \center-align in \markup and a tweak for parent-alignment-X. Furthermore I think the parens are little too tall. I made them smaller. \version "2.19.82" doigte = -\tweak parent-alignment-X #CENTER -\markup { \center-align \number \fontsize #-6.0 %"(4)" \concat { \fontsize #-2 "(" "4" \fontsize #-2 ")" } } \new Staff \with { \magnifyStaff 1 } { c''1^1-\doigte } \new Staff \with { \magnifyStaff #5/7 } { c''1^1-\doigte } \new Staff \with { \magnifyStaff 2 } { c''1^1-\doigte } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user