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 are tailored to write math in economics and other social sciences, although 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 (x)\left( x\right), where the brackets scale automatically
  • Square brackets:\bs{x} gives [x]\left[x\right], where the brackets scale automatically
  • Curly brackets: \bc{x} gives {x}\left\lbrace x\right\rbrace, where the brackets scale automatically
  • Absolute value: \abs{x} gives x|x|, where the brackets scale automatically
  • Norm: \norm{x} gives x\left\lVert x \right\rVert, where the brackets scale automatically
  • Floor: \floor{x} gives x\left\lfloor x\right\rfloor, where the brackets scale automatically
  • Parentheses for function arguments: f\of{x} gives f(x)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(x)f\left( x\right), which introduces too much space between the function f and the argument (x).

Operators

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

Derivatives

  • Ordinary derivative of xx with respect to yy:
    • Display: \od{x}{y} gives dxdy\frac{d x}{d y}
    • Text: \odx{x}{y} gives dx/dyd x/d y
  • Partial derivative of xx with respect to yy:
    • Display: \pd{x}{y} gives xy\frac{\partial x}{\partial y}
    • Text: \pdx{x}{y} gives x/y\partial x/\partial y
    • Keeping zz constant, display: \pd{x}{y}{z} gives xyz\left.\frac{\partial x}{\partial y}\right\vert_{z}
    • Keeping zz constant, text: \pdx{x}{y}{z} gives x/yz\left.\partial x/\partial y\right\vert_{z}
  • Ordinary elasticity of xx with respect to yy:
    • Display: \oe{x}{y} gives dlnxdlny\frac{d\ln x}{d\ln y}
    • Text: \oex{x}{y} gives dln(x)/dln(y)d\ln(x)/d\ln(y)
  • Partial elasticity of xx with respect to yy:
    • Display: \pe{x}{y} gives ln(x)ln(y)\frac{\partial\ln(x)}{\partial\ln(y)}
    • Text: \pex{x}{y} gives ln(x)/ln(y)\partial\ln(x)/\partial\ln(y)
    • Keeping zz constant, display: \pe{x}{y}{z} gives ln(x)ln(y)z\left.\frac{\partial\ln(x)}{\partial\ln(y)}\right\vert_{z}
    • Keeping zz constant, text: \pex{x}{y}{z} gives ln(x)/ln(y)z\left.\partial\ln(x)/\partial\ln(y)\right\vert_{z}

Statistical commands

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

Blackboard letters

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

Calligraphic letters

  • \Ac gives A\mathcal{A}
  • \Bc gives B\mathcal{B}
  • \Cc gives C\mathcal{C}
  • \Dc gives D\mathcal{D}
  • \Ec gives E\mathcal{E}
  • \Fc gives F\mathcal{F}
  • \Gc gives G\mathcal{G}
  • \Hc gives H\mathcal{H}
  • \Ic gives I\mathcal{I}
  • \Jc gives J\mathcal{J}
  • \Kc gives K\mathcal{K}
  • \Lc gives L\mathcal{L}
  • \Mc gives M\mathcal{M}
  • \Nc gives N\mathcal{N}
  • \Oc gives O\mathcal{O}
  • \Pc gives P\mathcal{P}
  • \Qc gives Q\mathcal{Q}
  • \Rc gives R\mathcal{R}
  • \Sc gives S\mathcal{S}
  • \Tc gives T\mathcal{T}
  • \Uc gives U\mathcal{U}
  • \Vc gives V\mathcal{V}
  • \Wc gives W\mathcal{W}
  • \Xc gives X\mathcal{X}
  • \Yc gives Y\mathcal{Y}
  • \Zc gives Z\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 x\overline{x}, where the accent scales automatically
  • Underline: \ul{x} gives x\underline{x}, where the accent scales automatically
  • Hat: \wh{x} gives x^\widehat{x}, where the accent scales automatically
  • Tilde: \wt{x} gives x~\widetilde{x}, where the accent scales automatically