Common TeX codes

This table provides commonly used TeX codes that you can enter using the Simple Editor or Advanced Editor. How to add or edit TeX (Simple Editor)

To add this

Enter this

Roman font

\rm text

To combine several fonts, use {\rm text} to specify Roman.

Italic font

\it text

To combine several fonts, use {\it text} to specify Italic.

Extra space

~ or \;

Negative space, to close gaps \!
Percent symbol (%) <tex>\%</tex>
Subtraction sign (–) <tex>-</tex>
Multiplication

\cdot or \times

Use \cdot for multiplication between variables.

For example: w = Fd is F \cdot d

If explicit multiplication needs to be emphasized, do not use \times.

Use × (\times in TeX) for scientific notation, dimensional analysis, and equations involving words.

l \ell

Subscript

Example: c subscript 12

_ subscript for single digit subscripts

-OR-

_{subscript} for double digit subscripts as in C_{12}

Superscript

Example: C superscript 12

^ superscript for single digit superscripts

-OR-

^{superscript} for double digit superscripts as in C^{12}

Stacked superscripts and subscripts

Example: sample isotope C

^{superscript}_{subscript}

Offset superscripts and subscripts

Example: my_se_tex_supersub_offset

_ {subscript} ^

-OR-

{^{superscript}}{_{subscript}} as in HSO{_{4}}{^{-}}

Lowercase Greek letter

\lower_Greek_letter

For example: \alpha

Uppercase Greek letter

 

\upper_Greek_letter

For example: \Alpha

Fraction

""

 

{x \over y}

-OR-

{\frac {x}{y}}

Infinity symbol

infinity symbol

\infty

Vector arrow over xy

""

\vec {xy}

Chemistry reaction arrow

""

\rightarrow

Chemistry equilibrium arrow

equilibrium arrow symbol

\rightleftharpoons


For a complete listing of TeX codes, see the TeX cookbook. If you use the cookbook, be aware of the following:

See also:

Basic ChemTeX codes

ChemTeX answer examples