Join our WikiEducator discussion group or Register now for free skills training.

Help:LaTeX Symbol Tables - Body-Text Symbols

From WikiEducator

Jump to: navigation, search
\mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \text{ Symbol Tables for WikiEducator}\,
Home Body-Text Mathematics Science and Technology Dingbats Miscellaneous


Contents

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)
\backslash\, 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>
\wedge Superscript. Failed to parse (syntax error): ^ <math>\wedge</math>
\# Refer to arguments in macro definitions. Failed to parse (lexing error): # <math>\#</math>
\sim\, Tie words with unbreakable space. ~ <math>\sim\,</math>
\And Separate column entries in tables. Failed to parse (syntax error): & <math>\And</math>
\backslash\backslash 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:

Displaying a set of the first 3 greek letters
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> \alpha\!\beta\!\gamma
thin space - \, <math>\alpha\,\beta\,\gamma</math> \alpha\,\beta\,\gamma
thick space - \; <math>\alpha\;\beta\;\gamma</math> \alpha\;\beta\;\gamma
text space - \ <math>\alpha \ \beta \ \gamma</math> \alpha \ \beta \ \gamma
quad space (1em) - \quad <math>\alpha\quad\beta\quad\gamma</math> \alpha\quad\beta\quad\gamma
double quad space (2em) - \qquad <math>\alpha\qquad\beta\qquad\gamma</math> \alpha\qquad\beta\qquad\gamma



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 Image: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. \mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \, symbol \sqrt{5}\,\! 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 a^{c+2}\,\!



Vertical alignment

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



Table 1: \mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,  2_{\displaystyle \varepsilon} 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 \mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,  2_{\displaystyle \varepsilon} Text-mode Commands

Code Output Code Output Code Output


Table 3: \mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,  2_{\displaystyle \varepsilon} 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 \P \copyright Failed to parse (unknown function\copyright): \copyright \dots \dots \} }
\S \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 \mathrm{L\!\!^{{}_{\scriptstyle A}} \!\!\!\!\!\;\; T\!_{\displaystyle E} \! X} \,  2_{\displaystyle \varepsilon} provides by default, and the right one is the \true" symbol that textcomp makes available.


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

Code Output Code Output Code Output
\checkmark \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.
Personal tools