LaTeX Commands

AMSBlogIn light of the popularity of my post entitled Top LaTeX Mistakes, I thought it might be nice to list some helpful commands that make typesetting quicker. If you are not familiar with defining commands, you would define them in your preamble as follows: newcommand{COMMANDNAME}[Number of expected arguments]{Command Info}

For example, you could use  newcommand{bb}[1]{mathbb{#1}}. This command allows you to type bb{R}$ to make a blackboard bold R (mathbb{R}) rather than mathbb{R}.

Below are my favorite commands.

  1. bb{} – Explained above. You can also define a command R, N, Z, Q, etc. to make these letters blackboard bold.
  2. newcommand{ip}[1]{langle #1 rangle} – For example, ip{v,w} would produce langle v,w rangle.
  3. newcommand{bignorm}[1]{left| #1 right|} – This will allow you to type bignorm{dfrac{a}{b}} to produce  left| dfrac{a}{b} right| . Notice that similar commands can be defined for inner products, absolute values, curly brackets, square brackets, parentheses, etc.
  4. newcommand{dint}[4]{displaystyleint_{#1}^{#2} ! #3 , operatorname{d} ! #4} – This will allow you to type dint{a}{b}{f(x)}{x} to produce  displaystyleint_a^b f(x) , textrm{d} ! x .

What commands do you use?

This entry was posted in Advice, General, Technology & Math. Bookmark the permalink.