|
From: | Jean Abou Samra |
Subject: | Re: sectionLabel with box - global formatting |
Date: | Sat, 01 Apr 2023 21:13:59 +0200 |
User-agent: | Evolution 3.46.4 (3.46.4-1.fc37) |
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'
}
Also, consider using \textMark
rather than \sectionLabel
in case your text is not semantically a section label.
Best,
Jean
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] | Current Thread | [Next in Thread] |