|
From: | Stephan Schöll |
Subject: | Re: sectionLabel with box - global formatting |
Date: | Sat, 1 Apr 2023 22:19:27 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 |
Jean,
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!
sure! That's why I like the ability to introduce semantic structure with section / sectionLabel :-)
Also, consider using
\textMark
rather than\sectionLabel
in case your text is not semantically a section label.
Best,
Jean
[Prev in Thread] | Current Thread | [Next in Thread] |