Aligning text marks to notes: Difference between revisions

m added "really simple" cat
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
By default, <code>TextMark</code> objects are aligned to the left edge of the staff. They can be aligned to the first note of the line instead by setting the <code>non-musical</code> property to false.
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">
\paper {
\layout {
   indent = #0
   line-length = 80\mm
  ragged-right = ##t
}
}


{
{
   \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 b"
   \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:Really simple]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]