Vertically aligned dynamics and textscripts: Difference between revisions
Appearance
Import snippet from LSR |
m New category Tags: Mobile edit Mobile web edit |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
The same idea, together with <code>\textLengthOn</code>, is used to align the text scripts along their baseline. | The same idea, together with <code>\textLengthOn</code>, is used to align the text scripts along their baseline. | ||
<lilypond version="2.24 | <lilypond version="2.24" full> | ||
music = \relative c' { | music = \relative c' { | ||
a'2\p b\f | a'2\p b\f | ||
| Line 26: | Line 26: | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Workaround]] | [[Category:Workaround]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:22, 21 November 2025
All DynamicLineSpanner objects (hairpins and dynamic texts) are placed with their reference line at least 'staff-padding from the staff, unless other notation forces them to be farther. Setting 'staff-padding to a sufficiently large value aligns the dynamics.
The same idea, together with \textLengthOn, is used to align the text scripts along their baseline.
\version "2.24"
music = \relative c' {
a'2\p b\f
e4\p f\f\> g, b\p
c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
}
{
\music
\break
\override DynamicLineSpanner.staff-padding = 3
\textLengthOn
\override TextScript.staff-padding = 1
\music
}
\paper { tagline = ##f }