Help:LaTeX Symbol Tables - Body-Text Symbols

From WikiEducator
Jump to: navigation, search
Vista Community Help.png [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \text{ Symbol Tables for WikiEducator}\,[/math]
Home Body-Text Mathematics Science and Technology Dingbats Miscellaneous




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.

Title
Symbol LaTeX Usage Error Output if mising backslash
(without a backslash in front)
Correct syntax
(adding backslash in front)
[math]\backslash\,[/math] Start a command name [math]\[/math] <math>\backslash\,</math>
[math]\{\,[/math] Start a command argument. [math]{[/math] <math>\{\,</math>
[math]\}\,[/math] End a command argument. [math]}[/math] <math>\}\,</math>
[math]\_\,[/math] Subscript. [math]_[/math] <math>\_\,</math>
[math]\wedge[/math] Superscript. [math]^[/math] <math>\wedge</math>
[math]\#[/math] Refer to arguments in macro definitions. [math]#[/math] <math>\#</math>
[math]\sim\,[/math] Tie words with unbreakable space. [math]~[/math] <math>\sim\,</math>
[math]\And[/math] Separate column entries in tables. [math]&[/math] <math>\And</math>
[math]\backslash\backslash[/math] Ends a row in tables. [math]\\[/math] <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:

Displaying a set of the first 3 greek letters
Spacing LaTeX command Output
no space <math>\alpha \beta \gamma</math> [math]\alpha \beta \gamma[/math]
text space without forced PNG <math>\alpha \mbox{ }\beta \mbox{ }\gamma</math> [math]\alpha \mbox{ }\beta \mbox{ }\gamma[/math]
negative thin space - \! <math>\alpha\!\beta\!\gamma</math> [math]\alpha\!\beta\!\gamma[/math]
thin space - \, <math>\alpha\,\beta\,\gamma</math> [math]\alpha\,\beta\,\gamma[/math]
thick space - \; <math>\alpha\;\beta\;\gamma</math> [math]\alpha\;\beta\;\gamma[/math]
text space - \ <math>\alpha \ \beta \ \gamma</math> [math]\alpha \ \beta \ \gamma[/math]
quad space (1em) - \quad <math>\alpha\quad\beta\quad\gamma</math> [math]\alpha\quad\beta\quad\gamma[/math]
double quad space (2em) - \qquad <math>\alpha\qquad\beta\qquad\gamma</math> [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):

  1. Click on button Button math.png
  2. Text <math>Insert formula here</math> will be added to your edition
  3. Substitute "Insert formula here" by TeX code: <math>\sqrt{5}\,\!</math>
  4. [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,[/math] symbol [math]\sqrt{5}\,\![/math] will be rendered in your text.



Example 6:

  • Typing <math>a^{c+2}</math> you may get (depending on your preferences): [math]a^{c+2}[/math]
  • But typing <math>a^{c+2}\,\!</math> you will get [math]a^{c+2}\,\![/math]



Vertical alignment

Value Output
no value Science [math]\int_{-N}^{N} e^x\, dx[/math] more text here
0% Science [math]\int_{-N}^{N} e^x\, dx[/math] more text here
-25% Science [math]\int_{-N}^{N} e^x\, dx[/math] more text here
-50% Science [math]\int_{-N}^{N} e^x\, dx[/math] more text here
-75% Science [math]\int_{-N}^{N} e^x\, dx[/math] more text here
-100% SCIENCE [math]\int_{-N}^{N} e^x\, dx[/math] x human progress



Table 1: [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,[/math] [math] 2_{\displaystyle \varepsilon}[/math] Escapable "Special" Characters

Code Output Code Output Code Output Code Output
\$ [math]\$[/math] \% [math]\%[/math] \_ [math]\_[/math] * \} [math]\}[/math]
\& [math]\&[/math] \# [math]\#[/math] \{ [math]\{[/math] [math][/math]

* 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 [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,[/math] [math] 2_{\displaystyle \varepsilon}[/math] Text-mode Commands

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Table 3: [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,[/math] [math] 2_{\displaystyle \varepsilon}[/math] Commands Defined to Work in Both Math and Text Mode

Code Output Code Output Code Output Code Output
\$ [math]\$[/math] \_ [math]\_[/math] \ddag [math]\ddag[/math] \{ [math]\{[/math]
\P [math]\P[/math] \copyright [math]\copyright[/math] \dots [math]\dots[/math] \} [math]\}[/math]
\S [math]\S[/math] \dag [math]\dag[/math] \pounds [math]\pounds[/math] [math][/math]

Where two symbols are present, the left one is the "\faked" symbol that [math]\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,[/math] [math] 2_{\displaystyle \varepsilon}[/math] provides by default, and the right one is the \true" symbol that textcomp makes available.


Table 4: [math]{\mathcal{A}\!_{\displaystyle \mathcal{M}} \!\mathcal{S}} \!\!\;[/math] Commands Defined to Work in Both Math and Text Mode

Code Output Code Output Code Output
\checkmark [math]\checkmark[/math] \circledR [math]\circledR[/math] \maltese [math]\maltese[/math]


Table 5: Non-ASCII Letters (Excluding Accented Letters)

Code Output Code Output Code Output
\aa [math]\aa[/math] \DH [math]\DH[/math] \L [math]\L[/math]
\o [math]\o[/math] [math][/math] [math][/math]


Table

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Table

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Table

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Table

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Table

Code Output Code Output Code Output
[math][/math] [math][/math] [math][/math]
[math][/math] [math][/math] [math][/math]


Road Works.svg Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. Road Works.svg