Le 03/11/2021 à 04:26, Aaron Hill a écrit :
Okay, would text replacement be viable as opposed to writing a bunch of individual functions?%%%% feminine = #'(("man/woman" . "woman") ("his/her" . "her") ("he/she" . "she")) \markup \replace \feminine { The man/woman, tightly clutching his/her jacket, braved the bitter cold as he/she searched for his/her missing dog. } %%%%Note that you can install such text replacements at the global level to affect all markup without needing the explicit call to \replace:%%%% neutral = #'(("man/woman" . "person") ("his/her" . "their") ("he/she" . "they")) \paper { #(add-text-replacements! neutral) } \markup { The man/woman, tightly clutching his/her jacket, braved the bitter cold as he/she searched for his/her missing dog. } %%%%
The original spec was putting "man/men" in italic — but typographically, the comma should stay upright. If one can give up on that, text replacements are certainly the simplest solution. (I guess you could also write a function to do the replacements yourself.)
Perhaps we should take this thread as a feature request for replacing strings with arbitrary markups rather than just strings?
Best, Jean
