Join our WikiEducator discussion group or Register now for free skills training.
Help:LaTeX Symbol Tables - Body-Text Symbols
From WikiEducator
LaTeX reserved ASCII characters
Some ASCII characters are interpreted as special command names or arguments causing them not appearing in the output or returning "Failed to parse (syntax error / lexing error)" error outputs. For displaying them as symbols (escaping LaTeX command names or arguments), correct syntax is adding a backslash (\) in front of character.
| Symbol | LaTeX Usage | Error Output if mising backslash (without a backslash in front) | Correct syntax (adding backslash in front) |
|---|---|---|---|
| Start a command name | Failed to parse (lexing error): \ | <math>\backslash\,</math> |
| Start a command argument. | Failed to parse (syntax error): { | <math>\{\,</math> |
| End a command argument. | Failed to parse (syntax error): } | <math>\}\,</math> |
| Subscript. | Failed to parse (syntax error): _ | <math>\_\,</math> |
| Superscript. | Failed to parse (syntax error): ^ | <math>\wedge</math> |
| Refer to arguments in macro definitions. | Failed to parse (lexing error): # | <math>\#</math> |
| Tie words with unbreakable space. |
| <math>\sim\,</math> |
| Separate column entries in tables. | Failed to parse (syntax error): & | <math>\And</math> |
| Ends a row in tables. | Failed to parse (syntax error): \\ | <math>\backslash\backslash</math> |
Subscripts & Superscripts
To get an expression exp to appear as a subscript, you just type _{exp}. To get exp to appear as a superscript, you type ^{exp}. LaTeX handles superscripted superscripts and all of that stuff in the natural way. It even does the right thing when something has both a subscript and a superscript.
Spacing and Forced PNG rendering
LaTeX markup ignores the spaces you type and puts in the spacing that it thinks is best.
Example 3:
| Spacing | LaTeX command | Output |
|---|---|---|
| no space | <math>\alpha \beta \gamma</math> | αβγ |
| text space without forced PNG | <math>\alpha \mbox{ }\beta \mbox{ }\gamma</math> | α β γ |
| negative thin space - \! | <math>\alpha\!\beta\!\gamma</math> |
|
| thin space - \, | <math>\alpha\,\beta\,\gamma</math> |
|
| thick space - \; | <math>\alpha\;\beta\;\gamma</math> |
|
| text space - \ | <math>\alpha \ \beta \ \gamma</math> |
|
| quad space (1em) - \quad | <math>\alpha\quad\beta\quad\gamma</math> |
|
| double quad space (2em) - \qquad | <math>\alpha\qquad\beta\qquad\gamma</math> |
|
To force the formula to render as PNG, add \, (thin space) at the end of the formula (where it is not rendered). This will force PNG if the user is in "HTML if simple" mode, but not for "HTML if possible" mode (math rendering settings in preferences). See your preferences tab.
You can also use \,\! (thin space and negative space, which cancel out) anywhere inside the math tags. This does force PNG even in "HTML if possible" mode, unlike \,. See your preferences tab.
Example 5:
For rendering the square root of five, do this (in editing mode):
- Click on button
- Text <math>Insert formula here</math> will be added to your edition
- Substitute "Insert formula here" by TeX code: <math>\sqrt{5}\,\!</math>
-
symbol
will be rendered in your text.
Example 6:
- Typing <math>a^{c+2}</math> you may get (depending on your preferences): ac + 2
- But typing <math>a^{c+2}\,\!</math> you will get
Vertical alignment
| Value | Output |
|---|---|
| no value | Science more text here
|
| 0% | Science more text here
|
| -25% | Science more text here
|
| -50% | Science more text here
|
| -75% | Science more text here
|
| -100% | SCIENCE x human progress
|
Table 1:
Escapable "Special" Characters
| Code | Output | Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|---|---|
| \$ |
| \% |
| \_ | _ * | \} | } |
| \& | Failed to parse (lexing error): \& | \# |
| \{ | { |
* The underscore package redefines \_" to produce an underscore in text mode (i.e., it makes it unnecessary to escape the underscore character).
Table 2: Predefined
Text-mode Commands
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
Table 3:
Commands Defined to Work in Both Math and Text Mode
| Code | Output | Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|---|---|
| \$ |
| \_ | _ | \ddag | Failed to parse (unknown function\ddag): \ddag | \{ | { |
| \P |
| \copyright | Failed to parse (unknown function\copyright): \copyright | \dots |
| \} | } |
| \S |
| \dag | Failed to parse (unknown function\dag): \dag | \pounds | Failed to parse (unknown function\pounds): \pounds |
Where two symbols are present, the left one is the "\faked" symbol that
provides by default, and the right one is the \true" symbol that textcomp makes
available.
Table 4:
Commands Defined to Work in Both Math and Text Mode
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
| \checkmark |
| \circledR | Failed to parse (unknown function\circledR): \circledR | \maltese | Failed to parse (unknown function\maltese): \maltese |
Table 5: Non-ASCII Letters (Excluding Accented Letters)
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
| \aa | Failed to parse (unknown function\aa): \aa | \DH | Failed to parse (unknown function\DH): \DH | \L | Failed to parse (unknown function\L): \L |
| \o | Failed to parse (unknown function\o): \o |
Table
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
Table
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
Table
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
Table
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
Table
| Code | Output | Code | Output | Code | Output |
|---|---|---|---|---|---|
| Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. |
more text here

