Aligning text marks to notes: Difference between revisions
Appearance
m added "really simple" cat |
Add 'snippet' category; indent=0 is the default; minor extensions |
||
| Line 1: | Line 1: | ||
By default, <code>TextMark</code> objects are aligned to the left edge of the staff. They can be aligned to | By default, <code>TextMark</code> objects are aligned to so-called <code>NonMusicalPaperColumn</code> grobs, like the left edge of the staff or a bar line. They can be aligned to a note instead by setting the <code>non-musical</code> property to <code>#f</code>. | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
\ | \layout { | ||
line-length = 80\mm | |||
} | } | ||
{ | { | ||
\textMark "mark a" | \textMark "mark a" c'1 | | ||
c'1 | | \textMark "mark b" c'1 | | ||
\break | \break | ||
\override Score.TextMark.non-musical = ##f | \override Score.TextMark.non-musical = ##f | ||
\textMark "mark | \textMark "mark c" c'1 | | ||
c' | | \textMark "mark d" c'1 | | ||
} | } | ||
</lilypond> | </lilypond> | ||
[[Category:Really simple]] | |||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Text]] | [[Category:Text]] | ||
[[Category: | [[Category:Snippet]] | ||
Revision as of 05:09, 24 December 2025
By default, TextMark objects are aligned to so-called NonMusicalPaperColumn grobs, like the left edge of the staff or a bar line. They can be aligned to a note instead by setting the non-musical property to #f.
\version "2.24"
\layout {
line-length = 80\mm
}
{
\textMark "mark a" c'1 |
\textMark "mark b" c'1 |
\break
\override Score.TextMark.non-musical = ##f
\textMark "mark c" c'1 |
\textMark "mark d" c'1 |
}