Common TeX codes

Updated 30 Aug 2024

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

For example:
C12

_ subscript for single digit subscripts

-OR-

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

Superscript

For example:
C12

^ superscript for single digit superscripts

-OR-

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

Stacked superscripts and subscripts

For example:
sample isotope C

^{superscript}_{subscript}
Offset superscripts and subscripts

For example:
HSO4-

_ {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

 

See also: