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