[Tex/LaTex] Which symbols need to be escaped in ConTeXt

contextsymbols

When writing "$" or "%" in a document, one must used \$ and \% so that they will be interpreted as symbols which should be displayed along with the text.

  • What other symbols need to be escaped in ConTeXt? Where can I obtain a complete list?

I have also observed that documents containing "|" cannot be compiled, but `\|" does not help. Why does this prevent compilation and how can this be displayed as text?

Best Answer

Elaborating on @egreg's answer (sorry, too long for a comment): ConTeXt also has the \asciimode command. After that, only \, { and } have their typical category codes, all other special characters have catcode 12 (other). In that mode, to type in math, you need to elaborate as in \mathematics{a_2} (as dollar signs do not work any more) but it is really useful for some types of input file.

Special characters input list:

# is \#
$ is \textdollar
% is \percent
& is \&
\ is \textbackslash
^ is \textcircumflex
_ is \textunderscore
{ is \textbraceleft
| is \textbar
} is \textbraceright
~ is \textasciitilde

and low-level approaches like \char`| or \char`^ also work.