lilypond-user
[Top][All Lists]
Advanced

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

Re: Use markup in \replace when lilypond is expecting a string?


From: Valentin Petzel
Subject: Re: Use markup in \replace when lilypond is expecting a string?
Date: Thu, 16 Jun 2022 02:36:25 +0200

Hello PJ,

\replace does simply add to the  prop 'replacement-alist. This is then used in 
text-interface.cc to replace substrings of string with other strings. This 
means you can only use \replace to substitute strings. Of course it would 
theoretically be possible to define a custom replace command that allows for 
this.

Cheers,
Valentin

Am Mittwoch, 15. Juni 2022, 20:41:23 CEST schrieb P J:
> Sorry if this is a silly question... but I am struggling with the
> \replace function.
> 
> Let's take this example:
> 
> -----------
> 
> \markup \replace #'(("100" . "hundred")
>                     ("dpi" . "dots per inch")) "A 100 dpi."
> 
> -----------
> 
> What code should I use if rather than replacing "100" with "hundred" I
> want, say, to replace "100" with a markup, for instance:
> 
> \markup \concat { "1" \translate-scaled #' (-0.5 . 0) "00" }
> 
> I have not been able to figure this out!
> 
> Thank you
> 
> PJ

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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