Jean,

Am 01.04.2023 um 21:13 schrieb Jean Abou Samra:

Le samedi 01 avril 2023 à 21:02 +0200, Stephan Schöll a écrit :

Hi Ponders

In earlier scores of mine I used

/mark /markup {  /box "Mark Label" }

Now that I'm migrating (some of) those to /sectionLabel (yes, I can
simply replace /mark by /sectionLabel) I wonder how I could add the
box globally. I know that I could accomplish that with a
substitution function like

sctLbl = #(define-music-function    (label)    (markup?)    #{     
\sectionLabel \markup {\box #label }    #})

\relative c' { \sctLbl "Hello" c d e f }

But my programmer's gut feeling tells me that a configuration
approach would be the preferred one. I guess the solution looks
something like this

\layout {

   \context {

     \Score

     \set Score.markFormatter = ...

   }

}

Try

|\version "2.24.1" \layout { \context { \Score \override
SectionLabel.stencil = #(make-stencil-boxer 0.15 0.5
ly:text-interface::print) } } { c'1 \sectionLabel "Coda" c' }|

perfetto, thanks a lot!

||

Also, consider using |\textMark| rather than |\sectionLabel| in case
your text is not semantically a section label.

sure! That's why I like the ability to introduce semantic structure with
section / sectionLabel :-)

Best,

Jean

Reply via email to