Hi Jun,

Am 01.11.20 um 14:07 schrieb 田村淳:
Hello,

I’m looking for a “bracket” version of “\parenthesize” function to enclose an articulation or ornamentation mark within a pair of square brackets. I’d like to use parenthesis and brackets to indicate two different types of editorial additions. I achieved the same for dynamics marks by slightly modifying the LSR code “Creating "real" parenthesized dynamics”
http://lsr.di.unimi.it/LSR/Item?id=382
http://lsr.di.unimi.it/LSR/Snippet?id=382
Is there an easy way to create “\bracketize” function?

Thanks in advance and best regards.

It's not ideal since the X-extent is hardcoded, but as a starting point:

\version "2.20"

bracketify =
  \tweak ParenthesesItem.stencil #ly:text-interface::print
  \tweak ParenthesesItem.font-size -3.7
  \tweak ParenthesesItem.text \markup \general-align #Y #CENTER {
    \hspace #0.6  \center-align \line { [ \hspace #1 ] } }
  \parenthesize \etc

\relative {
  c'4 \bracketify d \parenthesize e f
  e\bracketify --
}

Lukas


Reply via email to