Overview

This collection of minimalist commands make it easy to write mathematical expressions with LaTeX —while automatically respecting the rules of mathematical typography.


Download


Features

The commands were developed to write math in economics, but they might also be helpful to write math in other fields. The commands introduce the following functionalities:

  • Easily insert brackets that scale automatically
  • Easily list arguments of operators (expectation, probability, min, max, exponential, log, and so on), with surrounding brackets that scale automatically
  • Easily write derivatives and elasticities, in display and text
  • Easily type statistical commands (independent and identically distributed variables, almost sure convergence)
  • Easily type key blackboard letters
  • Easily type uppercase calligraphic letters
  • Easily type Greek letters
  • Easily insert accents that scale automatically

Brackets

  • Parentheses: \bp{x} gives $\left( x\right)$, where the brackets scale automatically
  • Square brackets:\bs{x} gives $\left[x\right]$, where the brackets scale automatically
  • Curly brackets: \bc{x} gives $\left\lbrace x\right\rbrace$, where the brackets scale automatically
  • Absolute value: \abs{x} gives $\left\lvert x \right\rvert$, where the brackets scale automatically
  • Norm: \norm{x} gives $\left\lVert x \right\rVert$, where the brackets scale automatically
  • Floor: \floor{x} gives $\left\lfloor x\right\rfloor$, where the brackets scale automatically
  • Parentheses for function arguments: f\of{x} gives $f(x)$, where the parentheses scale automatically, and where spacing between the function f and the argument (x) is appropriate. f\bp{x} gives $f\left( x\right)$, which introduces too much space between the function f and the argument (x).

Operators

  • Logarithm:
    • \ln gives $\ln$
    • \ln{x} gives $\ln(x)$, where the parentheses scale automatically
  • Exponential:
    • \exp gives $\exp$
    • \exp{x} gives $\exp(x)$, where the parentheses scale automatically
  • Indicator:
    • \ind gives $\mathbb{1}$
    • \ind{X} gives $\mathbb{1}(X)$, where the parentheses scale automatically
  • Trace:
    • \tr gives $\operatorname{tr}$
    • \tr{X} gives $\operatorname{tr}(X)$, where the parentheses scale automatically
  • Variance:
    • \var gives $\operatorname{var}$
    • \var{X} gives $\operatorname{var}(X)$, where the parentheses scale automatically
  • Covariance:
    • \cov gives $\operatorname{cov}$
    • \cov{X} gives $\operatorname{cov}$, where the parentheses scale automatically
  • Correlation:
    • \corr gives $\operatorname{corr}$
    • \corr{X} gives $\operatorname{corr}(X)$, where the parentheses scale automatically
  • Standard deviation:
    • \sd gives $\operatorname{sd}$
    • \sd{X} gives $\operatorname{sd}(X)$, where the parentheses scale automatically
  • Standard error:
    • \se gives $\operatorname{se}$
    • \se{X} gives $\operatorname{se}(X)$, where the parentheses scale automatically
  • Maximum:
    • \max gives $\max$
    • \max[x] gives $\max_x$
    • \max{y} gives ${\max}{\left\lbrace y\right\rbrace}$, where the brackets scale automatically
    • \max[x]{y} gives ${\max_x}{\left\lbrace y\right\rbrace}$, where the brackets scale automatically
    • \argmax gives $\operatorname{argmax}$
  • Minimum:
    • \min gives $\min$
    • \min[x] gives $\min_x$
    • \min{y} gives ${\min}{\left\lbrace y\right\rbrace}$, where the brackets scale automatically
    • \min[x]{y} gives ${\min_x}{\left\lbrace y\right\rbrace}$, where the brackets scale automatically
    • \argmin gives $\operatorname{argmin}$
  • Expectation:
    • \E gives $\mathbb{E}$
    • \E[X] gives $\mathbb{E}_X$
    • \E{Y} gives $\mathbb{E}[Y]$, where the brackets scale automatically
    • \E[X]{Y} gives $\mathbb{E}_X[Y]$, where the brackets scale automatically
  • Probability:
    • \P gives $\mathbb{P}$
    • \P[X] gives $\mathbb{P}_X$
    • \P{Y} gives $\mathbb{P}[Y]$, where the brackets scale automatically
    • \P[X]{Y} gives $\mathbb{P}_X[Y]$, where the brackets scale automatically

Derivatives

  • Ordinary derivative of $x$ with respect to $y$:
    • Display: \od{x}{y} gives $\frac{d x}{d y}$
    • Display, nth order: \od[n]{x}{y} gives $\frac{d^n x}{d y^n}$
    • Text: \odx{x}{y} gives $d x/d y$
    • Text, nth order: \odx[n]{x}{y} gives $d^n x/d y^n$
  • Partial derivative of $x$ with respect to $y$:
    • Display: \pd{x}{y} gives $\frac{\partial x}{\partial y}$
    • Display, nth order: \pd[n]{x}{y} gives $\frac{\partial^n x}{\partial y^n}$
    • Text: \pdx{x}{y} gives $\partial x/\partial y$
    • Text, nth order: \pdx[n]{x}{y} gives $\partial^n x/\partial y^n$
    • Display, keeping $z$ constant: \pd{x}{y}{z} gives $\left.\frac{\partial x}{\partial y}\right\vert_{z}$
    • Text, keeping $z$ constant: \pdx{x}{y}{z} gives $\left.\partial x/\partial y\right\vert_{z}$
  • Ordinary elasticity of $x$ with respect to $y$:
    • Display: \oe{x}{y} gives $\frac{d\ln x}{d\ln y}$
    • Text: \oex{x}{y} gives $d\ln(x)/d\ln(y)$
  • Partial elasticity of $x$ with respect to $y$:
    • Display: \pe{x}{y} gives $\frac{\partial\ln(x)}{\partial\ln(y)}$
    • Text: \pex{x}{y} gives $\partial\ln(x)/\partial\ln(y)$
    • Display, keeping $z$ constant: \pe{x}{y}{z} gives $\left.\frac{\partial\ln(x)}{\partial\ln(y)}\right\vert_{z}$
    • Text, keeping $z$ constant: \pex{x}{y}{z} gives $\left.\partial\ln(x)/\partial\ln(y)\right\vert_{z}$

Statistical commands

  • Independent and identically distributed variables: \iid gives $\mathbin{\overset{iid}{\sim}}$
  • Almost sure convergence: \as gives $\mathbin{\overset{as}{\to}}$
  • Essential infimum and supremum: \ees gives $\operatorname{ees}$

Blackboard letters

  • \R gives $\mathbb{R}$
  • \N gives $\mathbb{N}$
  • \Z gives $\mathbb{Z}$
  • \Q gives $\mathbb{Q}$
  • \C gives $\mathbb{C}$
  • \I gives $\mathbb{I}$

Calligraphic letters

  • \Ac gives $\mathcal{A}$
  • \Bc gives $\mathcal{B}$
  • \Cc gives $\mathcal{C}$
  • \Dc gives $\mathcal{D}$
  • \Ec gives $\mathcal{E}$
  • \Fc gives $\mathcal{F}$
  • \Gc gives $\mathcal{G}$
  • \Hc gives $\mathcal{H}$
  • \Ic gives $\mathcal{I}$
  • \Jc gives $\mathcal{J}$
  • \Kc gives $\mathcal{K}$
  • \Lc gives $\mathcal{L}$
  • \Mc gives $\mathcal{M}$
  • \Nc gives $\mathcal{N}$
  • \Oc gives $\mathcal{O}$
  • \Pc gives $\mathcal{P}$
  • \Qc gives $\mathcal{Q}$
  • \Rc gives $\mathcal{R}$
  • \Sc gives $\mathcal{S}$
  • \Tc gives $\mathcal{T}$
  • \Uc gives $\mathcal{U}$
  • \Vc gives $\mathcal{V}$
  • \Wc gives $\mathcal{W}$
  • \Xc gives $\mathcal{X}$
  • \Yc gives $\mathcal{Y}$
  • \Zc gives $\mathcal{Z}$

Greek letters

  • \a gives $\alpha$
  • \b gives $\beta$
  • \c gives $\chi$
  • \d gives $\delta$
  • \D gives $\Delta$
  • \e gives $\epsilon$
  • \f gives $\phi$
  • \vf gives $\varphi$
  • \F gives $\Phi$
  • \g gives $\gamma$
  • \G gives $\Gamma$
  • \h gives $\eta$
  • \k gives $\kappa$
  • \l gives $\lambda$
  • \L gives $\Lambda$
  • \m gives $\mu$
  • \n gives $\nu$
  • \o gives $\omega$
  • \O gives $\Omega$
  • \vp gives $\varpi$
  • \p gives $\psi$
  • \r gives $\rho$
  • \s gives $\sigma$
  • \vs gives $\varsigma$
  • \S gives $\Sigma$
  • \t gives $\theta$
  • \vt gives $\vartheta$
  • \T gives $\Theta$
  • \U gives $\Upsilon$
  • \x gives $\xi$
  • \X gives $\Xi$
  • \z gives $\zeta$

Accents

  • Overline: \ol{x} gives $\overline{x}$, where the accent scales automatically
  • Underline: \ul{x} gives $\underline{x}$, where the accent scales automatically
  • Hat: \wh{x} gives $\widehat{x}$, where the accent scales automatically
  • Tilde: \wt{x} gives $\widetilde{x}$, where the accent scales automatically

Complex numbers

  • \Re gives $\operatorname{Re}$
  • \Im gives $\operatorname{Im}$

Existing math commands

Existing LaTeX commands continue to work as usual, with the exception of a few text commands that do not produce their usual output. These modified text commands are \oe, \o, and \P. These commands used to insert text symbols that are rarely used in scientific writing ($\text{\oe}$, $\text{\o}$, and $\text{\P}$). The commands now insert common mathematical symbols, so hopefully the modification is not problematic.