I have a ConTeXt document containing many special characters. I have followed the instructions at Which symbols need to be escaped in ConTeXt? to ensure they can all display properly in the document, however, as most of my text is processed by Lua, I found some problems. When \#
appears in the document, because I want the symbol "#" to be displayed, Lua cannot compile. Also, when double quotes appear in the document, e.g. "
, Lua cannot compile.
- How can I get these symbols to be displayed in ConTeXt when used with Lua?
- What other special characters need special treatment when used with Lua?
Update:
Here is some example code:
\define[2]\showtext{%
\startlua
if #1 < 2 then
context("#2")
end
\stoplua%
}
\starttext
\showtext{1}{This is text \#1.}
\stoptext