--- /dev/null
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+ lsrtags = "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 accesses a
+note head (or rest) from the @code{TextScript} object's horizontal
+parent (a paper column), using its extent to correct the positioning.
+
+
+
+"
+ doctitle = "Centering markup on note heads automatically"
+} % begin verbatim
+
+textScriptCenterOnNote = \override TextScript #'X-offset =
+#(lambda (grob)
+ (let* ((paper-col (ly:grob-parent grob X))
+ (elts (ly:grob-object paper-col 'elements))
+ (rhythmic-head
+ (if (ly:grob-array? elts)
+ (let loop ((array-idx 0))
+ (call/cc
+ (lambda (return)
+ (let ((array-len (ly:grob-array-length elts)))
+ (if (< array-idx (1- array-len))
+ (let ((elt (ly:grob-array-ref elts array-idx)))
+ (if (grob::has-interface elt
+ 'rhythmic-head-interface)
+ (return elt)
+ (loop (1+ array-idx)))))
+ grob))))
+ grob)))
+
+ (+
+ (ly:self-alignment-interface::x-aligned-on-self grob)
+ (interval-center
+ (ly:grob-robust-relative-extent rhythmic-head rhythmic-head X)))))
+
+\relative c' {
+ \override TextScript #'self-alignment-X = #CENTER
+ \textScriptCenterOnNote
+ c1-\markup \arrow-head #Y #UP ##t
+}
+
doctitle = "Changing a single note's size in a chord"
} % begin verbatim
-\relative {
+\relative c' {
<\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup { A tiny e }_\markup { A big c }
}
\version "2.13.4"
\header {
-%% Translation of GIT committish: ca543ea73189a1e53af94973dad0b8a5042c130c
- texidocfr = "
-Modifier certaines des propriétés du cadrillage temporel aura pour effet
-d'en changer l'apparence.
-
-"
- doctitlefr = "Apparence du cadrillage temporel"
-
-
lsrtags = "editorial-annotations"
%% Translation of GIT committish: b2d4318d6c53df8469dfa4da09b27c15a374d0ca
"
doctitlede = "Gitternetzlinien: Aussehen verändern"
+%% Translation of GIT committish: ca543ea73189a1e53af94973dad0b8a5042c130c
+ texidocfr = "
+Modifier certaines des propriétés du cadrillage temporel aura pour effet
+d'en changer l'apparence.
+
+"
+ doctitlefr = "Apparence du cadrillage temporel"
+
texidoc = "
The appearance of grid lines can be changed by overriding some of their
+++ /dev/null
-%% Do not edit this file; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.13.4"
-
-\header {
- lsrtags = "text"
-
-%% Translation of GIT committish: b2d4318d6c53df8469dfa4da09b27c15a374d0ca
- texidoces = "
-Las marcas se pueden imprimir al final de la línea actual, en vez de
-al comienzo de la línea siguiente. Esto es útil principalmente cuando
-se tiene que añadir una marca al final de la partitura (donde no hay
-línea siguiente).
-
-En tales casos, el extremo derecho de la marca se tiene que alinear
-con la última línea divisoria, como muestra la segunda línea de este
-ejemplo.
-
-"
- doctitlees = "Imprimir marcas al final de la línea o de la partitura"
-
-%% Translation of GIT committish: d96023d8792c8af202c7cb8508010c0d3648899d
- texidocde = "
-Zeichen können auch am Ende der aktuellen Zeile ausgegeben werden, anstatt
-dass sie auf die folgende Zeile verschoben werden. Das ist nüztlich,
-wenn ein Zeichen am Ende einer Partitur eingefügt werden soll, wo
-gar keine nächste Zeile vorhanden ist.
-
-In derartigen Fällen muss die rechte Ecke des Zeichens an dem letzten
-Taktstrich ausgerichtet werden, wie die zweite Zeile des Beispiels zeigt.
-
-"
- doctitlede = "Zeichen am Ende einer Zeile oder Partitur setzen"
-
- texidoc = "
-Marks can be printed at the end of the current line, instead of the
-beginning of the following line. This is particularly useful when a
-mark has to be added at the end of a score -- when there is no next
-line.
-
-In such cases, the right end of the mark has to be aligned with the
-final bar line, as demonstrated on the second line of this example.
-
-"
- doctitle = "Printing marks at the end of a line or a score"
-} % begin verbatim
-
-\relative c'' {
- \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
- g2 c
- d,2 a'
- \mark \default
- \break
- g2 b,
- c1 \bar "||"
- \override Score.RehearsalMark #'self-alignment-X = #RIGHT
- \mark "D.C. al Fine"
-}
-
--- /dev/null
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+ lsrtags = "text"
+
+ texidoc = "
+Marks can be printed at the end of the current line, instead of the
+beginning of the following line. In such cases, it might be preferable
+to align the right end of the mark with the bar line.
+
+"
+ doctitle = "Printing marks at the end of a line"
+} % begin verbatim
+
+\relative c'' {
+ g2 c
+ d,2 a'
+ \once \override Score.RehearsalMark #'break-visibility = #end-of-line-visible
+ \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
+ \mark "D.C. al Fine"
+ \break
+ g2 b,
+ c1 \bar "||"
+}
+
} % begin verbatim
<<
- \relative { a'1 a }
+ \relative c'' { a1 | a }
\new Lyrics \lyricmode { \skip 1 bla1 }
>>
aligning-objects-created-with-the--mark-command.ly
blanking-staff-lines-using-the--whiteout-command.ly
center-text-below-hairpin-dynamics.ly
+centering-markup-on-note-heads-automatically.ly
changing-the-default-text-font-family.ly
combining-dynamics-with-markup-texts.ly
combining-two-parts-on-the-same-staff.ly
ottava-text.ly
outputting-the-version-number.ly
piano-template-with-centered-lyrics.ly
-printing-marks-at-the-end-of-a-line-or-a-score.ly
+printing-marks-at-the-end-of-a-line.ly
printing-marks-on-every-staff.ly
printing-text-from-right-to-left.ly
stand-alone-two-column-markup.ly
analysis-brackets-above-the-staff.ly
avoiding-collisions-with-chord-fingerings.ly
caesura-railtracks-with-fermata.ly
+centering-markup-on-note-heads-automatically.ly
changing-a-single-notes-size-in-a-chord.ly
changing-form-of-multi-measure-rests.ly
changing-properties-for-individual-grobs.ly