lilypond-user
[Top][All Lists]

## Re: Typesetting tweak with percent repeat

 From: Aaron Hill Subject: Re: Typesetting tweak with percent repeat Date: Wed, 25 Apr 2018 15:49:57 -0700 User-agent: Roundcube Webmail/1.3.6

On 2018-04-24 20:19, Evan Driscoll wrote:

For example, in the document below, I'd like an upbow over the percent in
measure 2. How can I get that? The \upbow on the s1 that's in there now
doesn't work.

Thanks,
Evan


From what I can tell, there are at least two issues you are fighting.


Firstly, adding \upbow to the spacer does not result in the articulation being applied to the PercentEvent. All the \makePercent music function does is use ly:music-length to measure the length of the music expression supplied. None of the content within that music is displayed.


Secondly, the documentation does mention that a PercentEvent consists only of the percent symbol stencil itself. The following theoretically could add the desired articulation, but as expected nothing else prints:

%%
(make-music 'PercentEvent
'length (ly:music-length note)
'articulations (list
(make-music 'ArticulationEvent 'articulation-type "upbow")))
%%


There is a simple workaround, however, which is to attach the articulation to an empty chord before the percent repeat:

%%
cello = \relative c {
a4(\downbow b c d) |
<>\upbow \makePercent s1 \bar "||"
}
%%


The resulting alignment might not be to your taste, as the articulation ends up positioned towards the left side of the measure, not centered above the percent symbol. But you should be able to tweak that manually as desired:

%%
<>-\tweak X-offset #1.5 \upbow
%%

-- Aaron Hill