[NTG-context] catch % in gsub("%", "\\letterpercent")

Pablo Rodriguez oinos at gmx.es
Thu Aug 27 17:11:32 CEST 2020


Dear list,

I have and \xmlraw command that gives some text with percent signs.
ConTeXt parses them as comments (so no output).

Using Lua gsub(), I need to replace something like:

  string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")

How do I need to invoke % to get the character found?

Many thanks for your help,

Pablo
--
http://www.ousia.tk


More information about the ntg-context mailing list