lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print Double Percent Repeat inside a markup


From: tisimst
Subject: Re: Print Double Percent Repeat inside a markup
Date: Fri, 28 Aug 2015 11:12:21 -0700 (MST)

Caio,

On 8/28/2015 9:14 AM, Caio Barros [via Lilypond] wrote:
Hello!

I want to print a double percent repeat inside a markup so I can use it as a graphic in a footnote. How can I do that?

I read in the manual -  lilypond.org/doc/v2.19/Documentation/notation/short-repeats  under "Isolated percent repeats" - that it is possible to print a single percent as a note but that doesn't seems to help.

any hints?

Try this one out (solutions for single and double percent repeat symbols):

%%%%%%%%%%%%

percentRepeat = \markup {
  \lower #0.05
  \with-dimensions #'(-0.25 . 2.25) #'(0 . 1.6)
  \postscript #"
  % left slash
  0.25 setlinewidth
  0 0 newpath moveto
  1.65 1.6 lineto
  2 1.6 lineto
  0.35 0 lineto
  closepath
  gsave
  0 setgray fill
  grestore
  stroke
 
  % left dot
  0.3 1.3 0.23 0 360 arc closepath
  0 setgray fill

  % right dot
  1.95 0.3 0.23 0 360 arc closepath
  0 setgray fill"
}

doublePercentRepeat = \markup {
  \lower #0.05
  \with-dimensions #'(-0.25 . 3.3) #'(0 . 1.6)
  \postscript #"
  % left slash
  0.25 setlinewidth
  0 0 newpath moveto
  1.65 1.6 lineto
  2 1.6 lineto
  0.35 0 lineto
  closepath
  gsave
  0 setgray fill
  grestore
  stroke
 
  % right slash
  0.25 setlinewidth
  1.05 0 newpath moveto
  2.7 1.6 lineto
  3.05 1.6 lineto
  1.4 0 lineto
  closepath
  gsave
  0 setgray fill
  grestore
  stroke

  % left dot
  0.3 1.3 0.23 0 360 arc closepath
  0 setgray fill

  % right dot
  3 0.3 0.23 0 360 arc closepath
  0 setgray fill"
}

\markup { The OE is missing \percentRepeat and \doublePercentRepeat symbols. }


%%%%%%%%%%%%


The result:



I tried some other things using a \score block within a \markup, but they just kept throwing "programming errors" (and logically so). If anyone is interested in seeing them, I'll gladly share, but using the above code is probably the best option what you need.

- Abraham


View this message in context: Re: Print Double Percent Repeat inside a markup
Sent from the User mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]