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:
>
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
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
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
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