Preventing long \mark objects to stretch a measure: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
No edit summary |
||
| Line 43: | Line 43: | ||
[[Category:Text]] | [[Category:Text]] | ||
[[Category:Spacing]] | [[Category:Spacing]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]][[Category:Snippet]] | ||
Revision as of 22:58, 21 November 2025
When you put a long \markup text in a \mark object, LilyPond stretches the measure to encompass the complete markup. This can be avoided by overriding the 'X-extent property of the RehearsalMark object, as demonstrated in this snippet.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=301
\paper{
indent = 0
}
\new PianoStaff <<
\new Staff {
\override Score.RehearsalMark.self-alignment-X = #left
R1 R1
\mark \markup { "long markup with default horizontal extent" }
R1*2
}
\new Staff {
\repeat unfold 16 {
\clef F
c4
}
}
>>
\new PianoStaff <<
\new Staff {
\override Score.RehearsalMark.self-alignment-X = #left
R1 R1
\mark \markup { "long markup with default horizontal extent" }
\override Score.RehearsalMark.X-extent = #'(0 . 0)
R1*2
}
\new Staff {
\repeat unfold 16 {
\clef F
c4
}
}
>>