-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.15.31
-\version "2.15.31"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
\header {
- lsrtags = "text, tweaks-and-overrides, contexts-and-engravers"
+ lsrtags = "contexts-and-engravers, text, tweaks-and-overrides"
+
texidoc = "
For technical reasons, text scripts attached to note heads cannot
easily be centered on a note head's width, unlike articulations.
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}. This also allows text to follow note heads which have
-been shifted via @code{force-hshift}.
+@code{NoteColumn}. This also allows text to follow note heads which
+have been shifted via @code{force-hshift}.
+
+
+
"
doctitle = "Centering markup on note heads automatically"
} % begin verbatim
-
#(define (Text_align_engraver ctx)
(let ((scripts '())
(note-column #f))
\context {
\Voice
\consists #Text_align_engraver
- \override TextScript #'X-offset =
+ \override TextScript.X-offset =
#ly:self-alignment-interface::aligned-on-x-parent
- \override TextScript #'self-alignment-X = #CENTER
+ \override TextScript.self-alignment-X = #CENTER
}
}
\new Staff <<
\relative c'' {
- \override NoteColumn #'force-hshift = #3
+ \override NoteColumn.force-hshift = #3
c1-\markup { \arrow-head #Y #DOWN ##t }
}
\\