Centering markup on note heads automatically: Difference between revisions
Import snippet from LSR |
m New category |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
Instead of using trial-and-error offset tweaks, this snippet uses a Scheme engraver to reset the horizontal parent of each markup to a <code>NoteColumn</code>. This also allows text to follow note heads which have been shifted via <code>force-hshift</code>. | Instead of using trial-and-error offset tweaks, this snippet uses a Scheme engraver to reset the horizontal parent of each markup to a <code>NoteColumn</code>. This also allows text to follow note heads which have been shifted via <code>force-hshift</code>. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
#(define (Text_align_engraver ctx) | #(define (Text_align_engraver ctx) | ||
(let ((scripts '()) | (let ((scripts '()) | ||
| Line 63: | Line 63: | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Contexts and engravers]] | [[Category:Contexts and engravers]] | ||
[[Category:Snippet]] | |||