The scheme funct. places text outside the hairpin. I was looking for some command for either hairpin or text that would turn off collision avoidance, and allow overlaying one over the other, but didn't succeed in my search. I can imagine creating scheme for inside the hairpin would be a challenge, as text fontsize would need to scale to available vertical space inside center of hairpin, which depends on both hairpin height, length as well as text length. As a workaround, I typeset the TextScript above the staff, where it didn't push other objects apart, then used extra-offset to bring it to the desired position in the center of the hairpin below the staff.
-----Original Message----- From: Janek Warchoł There's a snippet doing this in OpenLilyLib: https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/hairpin-with-text 2014-06-29 18:36 GMT+02:00 Pierre Perol-Schneider <pierre.schneider.pa...@gmail.com>: > 2014-06-29 17:12 GMT+02:00 Javier Ruiz-Alma <jav...@ruiz-alma.com>: > > >> How can text be placed inside a hairpin? See image for sample. > > > %%%%%%%%%%%%%%%%%%%%%%%%%%% > \version "2.18.2" > > { > \once\override Hairpin.height = #1.2 > c''\< > c'' > \once\override TextScript.extra-offset = #'(0 . 2) > > c''-\markup \teeny \italic "cresc." > c''\! > } > > \layout { > \context { > \Staff > \hide KeySignature > \omit TimeSignature > \omit Clef > } > } > > \relative c'' { > \key g\minor > \once\override Hairpin.height = #1.2 > b!8*2/3[ \<[c cis d ees d] > \once\override TextScript.extra-offset = #'(0 . 1.7) > c[ _\markup\tiny\italic "cresc." cis d e e f\!] } > %%%%%%%%%%%%%%%%%%%%%%%%%% > > Cheers, > Pierre > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user