Alexander Kobel schrieb:
Hi, all,
anyone knows how to write a G clef, like in
\clef "treble_8"
but with the octavation "8" in parentheses? (It's for a staff with a
solo voice sung by either alto or baritone, and thus the octavation is
optional.)
This solution (with a callback created by Neil Puttock) works fine:
#(define-public (parenthesize-me grob)
(let* ((font (ly:grob-default-font grob))
(open (stencil-whiteout (ly:font-get-glyph font
"accidentals.leftparen")))
(close (stencil-whiteout (ly:font-get-glyph font
"accidentals.rightparen")))
(me (ly:text-interface::print grob)))
(ly:stencil-combine-at-edge
(ly:stencil-combine-at-edge
me X LEFT open)
X RIGHT close)))
test = \relative c, {
\override Staff.OctavateEight #'stencil = #parenthesize-me
\clef "treble_8"
c4 d e f
g a b c
}
\score { \test }
Marc
Thanks,
Alexander
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user