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

2022-06-17 Thread P J
Many thanks for your help! On Thu, 16 Jun 2022 at 08:16, Jean Abou Samra wrote: > > > Le 16/06/2022 à 02:36, Valentin Petzel a écrit : > > Of course it would > > theoretically be possible to define a custom replace command that allows > for > > this. > > > Let me throw in a possible solution: >

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

2022-06-16 Thread Jean Abou Samra
Le 16/06/2022 à 02:36, Valentin Petzel a écrit : Of course it would theoretically be possible to define a custom replace command that allows for this. Let me throw in a possible solution: \version "2.22.2" %% Also tested on 2.23.9 #(use-modules (ice-9 regex)) #(define cache

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

2022-06-15 Thread Valentin Petzel
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

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

2022-06-15 Thread David Kastrup
P J writes: > 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

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

2022-06-15 Thread 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