TeX/string

From Wikibooks, open books for an open world
< TeX
Jump to: navigation, search

< TeX

Synopsis[edit]

\string

Description[edit]

\string accepts a single token (a command sequence, a letter, a other character, including special characters like {, $, } and converts it into a string of characters. The escape character is controlled by the register \escapechar and is "\" in standard TeX. If it's equal -1 \string outputs nothing as escape character.

All characters except the space (code=32) are output with category 12 (other character), even if they're letters or special characters. As an exception space gets the category 10 (space character) but still concatenated spaces are not merged to one space