[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LP 2.24.0 How to Set default colours for sectionLabel, Coda, Segno s

From: Laurie Savage
Subject: Re: LP 2.24.0 How to Set default colours for sectionLabel, Coda, Segno symbols
Date: Tue, 21 Mar 2023 16:38:41 +1100

Thank you! I tried wading through the internals reference this morning but it was intimidating to a non programmer. 

I tried using \override but had no idea what arguments to pass to it . Your solution worked perfectly, and your guide to the internals reference will come in handy.

On Tue, 21 Mar 2023 at 14:48, Michael Werner <> wrote:
Hi Laurie - 

On Mon, Mar 20, 2023 at 6:11 PM Laurie Savage <> wrote:
Good morning,

I am preparing charts and want my Coda/Segno symbols and section labels to all be red. I can do this via the \markup \with-color #red in each case but is there a global default I can set in my JazzStyle.ily file? I have been reading the documentation but have obviously missed something.

For this you want the Internals Reference. It's a bit indirect to get what you want, but it goes something like this. Being first alphabetically we'll start with the Coda symbol, but the process is the same for all of them.

In the Internals Reference there's a section labelled All layout objects - this is where we're going to start as the coda mark is indeed a layout object. A look down the list of the CodaMark's properties shows there's no color property directly associated. But at the bottom of the listing there's a number of other items listed. These are the various interfaces that can be used. Basically each interface is a group of common properties that are shared among various objects. And instead of constantly recreating these properties the interface is used instead - sorta kinda in a way a bit similar to setting up an include file with common settings.

Looking through the various interfaces we find that the grob-interface has listed a color property. As this interface is listed as being associated with the CodaMark layout object we should be able to make use of this property. To put them together is simply the name of the layout object followed by the property separated by a period. In this example we would have CodaMark.color

Another thing to consider is what scope this applies to. For that we return to the CodaMark page, where we see that it is created by the mark_engraver. Different engravers live in varying contexts, and if the property doesn't get addressed in the correct context it simply gets silently ignored. Going to the mark_engraver page and scrolling to the bottom we see the list of contexts where it lives by default. One of these is the Score context. This gives us the last piece we need. 

Putting all of that together we get the entry you would need to put into your include file as (we'll go ahead and show 'em all here):

\layout {
   \context {
      \override CodaMark.color = #red
      \override SegnoMark.color = #red
      \override SectionLabel.color = #red

The Internals Reference can be a bit confusing at first, but once you get the hang of it there's a ton of info in there.  This should at least be enough to get you started. I hope, anyway. If my explanation was muddled somewhere just let me know - the whole using words thing to explain stuff is a skill I'm not all that great at - and I'll try to unmuddle things as best I can.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]