Better handling of `DynamicText` grobs in `StaffGroup`
This code
<<
\new Staff { f'1 | f'1 }
\new Staff { f'1 |
\key f\minor \time 2/2
f'1 \tweak X-offset #-5 \pp }
>>
\new StaffGroup <<
\new Staff { f'1 | f'1 }
\new Staff { f'1 |
\key f\minor \time 2/2
f'1 \tweak X-offset #-5 \pp }
>>
gives this:
As can be seen, the presence of StaffGroup
prevents the dynamics to be positioned under the time signature. This is caused by the following code in engraver-init.ly
for the definition of StaffGroup
:
%% The default for DynamicText.extra-spacing-width causes dynamics to
%% be placed across span bars, so switch it off:
\override DynamicText.extra-spacing-width = ##f
However, this special DynamicText
override within StaffGroup
is an ad-hoc, brute-force solution, causing too much collateral damage IMHO: There is zero reason to prevent dynamics be positioned under time or key signatures, which is quite important for full scores with scarce vertical space.