Jump to content

Breaking vertical alignment of dynamics and textscripts: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
By default, LilyPond uses <code>DynamicLineSpanner</code> grobs to vertically align successive dynamic objects like hairpins and dynamic text. However, this is not always wanted. By inserting <code>\breakDynamicSpan</code>, which ends the alignment spanner prematurely, this vertical alignment can be avoided.
By default, LilyPond uses <code>DynamicLineSpanner</code> grobs to vertically align successive dynamic objects like hairpins and dynamic text. However, this is not always wanted. By inserting <code>\breakDynamicSpan</code>, which ends the alignment spanner prematurely, this vertical alignment can be avoided.


<lilypond version="2.24.0" full>
<lilypond version="2.24">
{ g1\< |
{ g1\< |
   e''\f\> |
   e''\f\> |
Line 9: Line 9:
   e''\breakDynamicSpan\f\> |
   e''\breakDynamicSpan\f\> |
   c'\p }
   c'\p }
\paper { tagline = ##f }
</lilypond>
</lilypond>


[[Category:Spacing]]
[[Category:Spacing]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Workaround]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Workaround]]
[[Category:Snippet]]

Latest revision as of 21:23, 17 December 2025

By default, LilyPond uses DynamicLineSpanner grobs to vertically align successive dynamic objects like hairpins and dynamic text. However, this is not always wanted. By inserting \breakDynamicSpan, which ends the alignment spanner prematurely, this vertical alignment can be avoided.

\version "2.24"

{ g1\< |
  e''\f\> |
  c'\p }

{ g1\< |
  e''\breakDynamicSpan\f\> |
  c'\p }