Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Useful Packages and Commands for LaTex

Math Packages

  1. \usepackage{amssymb}

    • popular math fonts

  2. \usepackage{dsfont}

    • \mathds font

  3. \usepackage{bm} % bold math symbols

    • bold math symbols

  4. \usepackage{amsmath}

    • math formulas.

  5. \usepackage{amsthm}

    • theorem environments

    • proof enviroment

List Packages

  1. \usepackage{enumerate}

    • universal list

Graphics Packages

  1. \usepackage{ifpdf}

    • allow including figures without extensions and select the right type of figures according to the compiler used

  2. \usepackage{graphicx}

    • for including pictures

    • the graphics driver is selected automatically if none is specified (via arguments of the package)

  3. \usepackage{psfrag}

    • for editing eps figures in Latex (e.g., replacing text)

    • need to compile using command latex, dvips and ps2pdf in sequence

  4. \usepackage{epsfig}

    • for including eps figures

Bibliography

  1. \usepackage{natbib}

    • for citing refernce

    • compatible with bibtex

    • compile using pdflatex/latex, bibtex, pdflatex/latex, pdflatex/latex, pdflatex/latex in sequence

    • some Latex IDE (e.g., WinEdt) has a single button/command (PDFTexify) for simplifying the compiling process

Color

  1. \usepackage[usenames,dvipsnames]{color}

    • using color by name

Mutiple Files

  1. You can use command \input or \include to include Latex source files. Generally speaking, \input is preferred over \include.

  2. \usepackage{subfiles} For more information, please refer to wiki book.

Chinese Packages

  1. \usepackage{xeCJK}

    • no need if use ctexart, ctexbook and so on

  2. \usepackage{fontspec}

    • choose font theme

  3. \setCJKmainfont{Adobe Song Std}

    • use adobe fonts as the main font