jemdoc – latex equations

jemdoc includes support for LaTeX equations. LaTeX source embedded in jemdoc files is processed by calling latex and dvipng (which must both be available for this feature). Resulting PNG images are then placed on the web page. Equations are typeset using pure LaTeX.

jemdoc equation support relies on several pieces, any of which may break. No guarantees! Support may be limited.

Inline equations

The conjugate function \(f^\star(y) = \sup_{x \in X}(y^Tx - f(x))\) appears here inline, and is in the variable \(y\). Dollar signs ($) surround the LaTeX equation in the jemdoc source.

Syntax
The sample function $f^\star(y) = \sup_{x \in X}(y^Tx - f(x))$
appears here inline, and is in the variable $y$.

Equations on separate lines

To render an equation on its own line, use backslash-escaped round brackets (\( and \)). For example, the identity

\[ (I + XY)^{-1} = I - X(I + YX)^{-1}Y \]

is typeset on its own line. Yes, round brackets instead of square brackets — this is to avoid a conflict with ordinary square brackets that are escaped to avoid being a link. Sorry.

Syntax
The identity
\(
    (I \+ XY)^{-1} = I - X(I \+ YX)^{-1}Y
\)
is typeset on its own line.

Here, the line breaks (and other whitespace) are ignored. As always, the exact formatting details can be adjusted using CSS.

Notes

  • The baseline is carefully adjusted. The sequences m\(m\)m and y\(y\)y (m$m$m and y$y$y), for example, should be neatly aligned (modulo bad browsers).

  • Definition by cases will work as expected, for example, \(f(x)\), where

\[ f(x) = \left\{ \begin{array}{ll} 3, & x \leq 0 \\ 5, & x > 0. \\ \end{array}\right. \]

(You can view the jemdoc source for this page.)

  • A random inequality might look like \(3x + 2y^{4k + 6} \geq z\).

  • This page takes about 0.7 seconds to process on an average machine, including making all the equations from scratch.

  • There are several configuration options for equations. They are detailed on the modelines page.