![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
27 Aug
2020
27 Aug
'20
11:16 a.m.
On 8/27/20 6:16 PM, Wolfgang Schuster wrote:
Pablo Rodriguez schrieb am 27.08.2020 um 17:56:
[...] \startxmlsetups xml:special \startitem \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%", "\\letterpercent")} \stopitem \stopxmlsetups [...] and to escape special characters you can use context.escape()
Many thanks for your reply, Wolfgang. I’m afraid that I need to keep $ in order to get some formulas: \cldcontext{(string.gsub([[\xmlraw{#1}{.}]], '<span class="'..'math inline'..'">', '$'):gsub("</span>", "\\ifmmode $\\fi"))}} Actually this is way more complex, but I need to catch % and have to substitution above. Many thanks for your help, Pablo -- http://www.ousia.tk