Special characters
You have seen that ConTeXt commands are preceded by a \
(backslash). This means that \
has a special meaning to ConTeXt. Aside from \
, there are other characters that need special attention when you want them to appear in verbatim mode or in text mode. See below an overview of these special characters and what you have to type to produce them.
A short focus a the %
character. All text between \starttext...\stoptext
will be processed while running ConTeXt. Sometimes however you may have text fragments you don’t want to be processed or you want to comment on your ConTeXt commands. If you preceed your text with the percentage sign %
it will not be processed
Special character | Verbatim | Text | ||||
---|---|---|---|---|---|---|
Character | Name | Feature | Type | Generates | Type | Generates |
\ |
backslash | to start a command | \type{\} |
\ |
\backslash |
\
|
% |
percent | to start comments | \type{%} |
% |
\% |
%
|
{ |
right curly brace | to open a group | \type+{+ |
{ |
\{ |
{
|
} |
left curly brace | to close a group | \type+}+ |
} |
\} |
}
|
~ |
tilde | to insert a non-breaking space | \type{~} |
~ |
\lettertilde |
~
|
$ |
dollar | to switch math mode on/off | \type{$} |
$ |
\$ |
$
|
_ |
underscore | for subscript in math mode | \type{_} |
_ |
\_ |
_
|
^ |
caret | for superscript in math mode | \type{^} |
^ |
\letterhat |
^
|
| |
vertical bar | for compound words and some options | \type{|} |
| |
\| |
|
|
# |
hashtag | to refer to macro's arguments | \type{#} |
# |
\# |
#
|
Other special characters have a meaning in typesetting mathematical expressions and some can be used in math mode only (see Mathematics and Equations).
Special character | Verbatim | Text | ||
---|---|---|---|---|
Character | Type | Generates | Type | Generates |
+ |
\type{+} |
+ |
$+$ |
+
|
- |
\type{-} |
- |
$-$ |
-
|
= |
\type{=} |
= |
$=$ |
=
|
< |
\type{<} |
< |
$<$ |
<
|
> |
\type{>} |
> |
$>$ |
>
|