Many thanks for this which worked like a charm.Apologies for the delay in
replying caused by a misconfiguration of my settings.
Michael

On Fri, 27 Jun 2025 at 14:40, Kieren MacMillan <[email protected]>
wrote:

> Hi Michael,
>
> > I am making a reduction of a Berg song & trying to horizontally align
> tempo indications (langsamer etc) & modifications (rit etc). The example
> shows two ways I have tried: the first using a text spanner for the rit;
> the second placing the rit after \tempo. The results could be individually
> padded into alignment (laboriously) but is there a solution akin to a
> dynamics context fot piano notation? Ideally one needs the extenders of the
> first solution which are absent from the second. Any ideas?
>
> 1. I always put all score-level marks in a separate variable — usually
> called global — and then <<>> it in where necessary.
>
> 2. I always include a custom context (I call it ScoreMarks) where I want
> such things to appear in my system/score. In the snippet below, you’ll see
> my template ScoreMarks context definition (which is usually \include-d in
> to the file from a separate .ily file in my library).
>
> 3. In this case, because you’re using a TextSpanner, I had to use tags (to
> keep the rit from showing up twice!); you could also \remove that engraver
> from Staff if you weren’t using any non-ScoreMarks spanners.
>
> Hope this helps point you in the right direction!
> Kieren
> _____________________________________
>
> %%%  SNIPPET BEGINS
> \version "2.24.4"
>
> #(set-default-paper-size "a4")
>
> \layout {
>   ragged-right = ##f
>   \context {
>     \type "Engraver_group"
>     \name ScoreMarks
>     keepAliveInterfaces = #'( metronome-mark-interface )
>     rehearsalMarkFormatter = #format-mark-box-alphabet
>     \consists "Axis_group_engraver"
>     \override VerticalAxisGroup.staff-affinity = #DOWN
>     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>         #'((basic-distance . 3) (minimum-distance . 2) (padding . 1))
>     \consists "Metronome_mark_engraver"
>     \override MetronomeMark.Y-offset = #0
>     \override MetronomeMark.outside-staff-priority = #50
>     \override MetronomeMark.break-align-symbols =
>       #'(left-edge staff-bar clef time-signature key-signature)
>     \override MetronomeMark.non-break-align-symbols =
>       #'(paper-column-interface)
>     \consists "Mark_engraver"
>     \override RehearsalMark.Y-offset = #0
>     \override RehearsalMark.outside-staff-priority = #100
>     \override RehearsalMark.break-align-symbols =
>       #'(left-edge staff-bar clef time-signature key-signature)
>     \override RehearsalMark.self-alignment-X = #CENTER
>     \override RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
>     \consists "Text_spanner_engraver"
>     \override TextSpanner.font-size = #1
>     \consists "Time_signature_engraver"
>     \override TimeSignature.stencil = #point-stencil
>   }
>   \context {
>     \Staff
>     \consists "Staff_collecting_engraver"
>   }
>   \context {
>     \Score
>     \remove "Metronome_mark_engraver"
>     \remove "Mark_engraver"
>     \accepts ScoreMarks
>   }
> }
>
> global = {
>   \key c \major
>   \numericTimeSignature
>   \time 4/4
>   \tempo "Ein wenig bewegt"
>   s1
>   s2 s2 -\tag #'marks -\tweak bound-details.left.text \markup { \bold
> \upright "rit." } -\tag #'marks -\startTextSpan
>   s2 -\tag #'marks -\stopTextSpan
>   \tempo "langsamer"
> }
>
> theMusic = \relative c'' {
>   \override Stem.neutral-direction = #UP
>   \dynamicUp
>   \autoBeamOff r4 bes4. b8 \tuplet 3/2 { g8 fis f }
>   ees'4. bes8
>   a! e! r d
>   cis4( eis)  r8 fis4 e8
> }
>
> <<
>   \new ScoreMarks \global
>   \new Staff \removeWithTag #'marks << \global \theMusic >>
> >>
> %%%  SNIPPET ENDS
>
> __________________________________________________
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>

Reply via email to