On Fri, 2024-05-03 at 13:04 +0200, Xavier Scheuer wrote:
> On Fri, 3 May 2024 at 12:43, Richard Shann <rich...@rshann.plus.com>
> wrote:
> > 
> > In earlier versions of LilyPond I avoided the use of \repeat
> > percent 2
> > {} syntax by overwriting the stencil for a whole bar rest:
> > 
> > \version "2.20.0"
> > { c c c c
> > \once \override MultiMeasureRest.stencil  = #ly:multi-measure-
> > rest::percent
> > \once \override MultiMeasureRest #'thickness = #0.48
> > R1*4/4
> > }
> > 
> > The stencil ly:multi-measure-rest::percent has gone in versin 2.24
> > and
> > I see that the symbol ly:percent-repeat-interface::percent at the
> > same
> > place in the source code. However this results in the "%" glyph not
> > being centered as was the old one:
> > 
> > \version "2.24.0"
> > { c c c c
> > \once \override MultiMeasureRest.stencil  = #ly:percent-repeat-
> > interface::percent
> > \once \override MultiMeasureRest #'thickness = #0.48
> > R1*4/4
> > }
> > 
> > Is there an easy fix - the extra-offset needed varies according to
> > the
> > width of the bar...
> 
> Hello,
> 
> Not replying to your question but is there a reason you don't use
> \repeat percent in the first place ?
It's easier for users of Denemo to have a single piece of LilyPond
syntax at the place they want to see the "%"
> And what about using "makePercent" as described in NR 1.4.2?
> 
> makePercent =
> #(define-music-function (note) (ly:music?)
>    "Make a percent repeat the same length as NOTE."
>    (make-music 'PercentEvent
>                'length (ly:music-length note)))
> 
> \relative c'' {
>   \makePercent s1
> }

That's perfect - a great improvement over the original :)
Thank you very much.
Richard

> 
> Kind regards,
> Xavier


Reply via email to