Heine

Heine is a compact math notation that compiles to LaTeX. It allows writing and editing documents involving math much more efficiently than standard LaTeX notation.

Read the manual

Examples

(εR+)(n0N)(nN,  nn0)((1+1n)ne<ε){\left(\forall\varepsilon\in{\mathbb{R}^+}\right)}{\left(\exists n_0\in\mathbb{N}\right)}{\left(\forall n\in\mathbb{N},\;n\ge n_0\right)}{\left({\left|{\left(1+\frac1{n}\right)}^n-e\right|}<\varepsilon\right)}
Heine (all ep in RR.+) (ex n_0 in NN) (all n in NN, n >= n_0) (|(1 + /1{n})^n - e| < ep)
LaTeX \left( \forall \varepsilon \in \mathbb{R}^+ \right) \left( \exists n_0 \in \mathbb{N} \right) \left( \forall n \in \mathbb{N},\; n \ge n_0 \right) \left( \left| \left( 1 + \frac1{n} \right) - e \right| < \varepsilon \right)
E=q4πε0r3r\vec{E}=\frac{q}{4\pi\varepsilon_0r^3}\vec{r}
Heine E.v = /{q}{4 pi ep_0 r^3} r.v
LaTeX \vec{E} = \frac{q}{4 \pi \varepsilon_0} \vec{r}
Ax=λx    (AλI)x=0\mathbf{A}\vec{x}=\lambda\vec{x}\iff{\left(\mathbf{A}-\lambda\mathbf{I}\right)}\vec{x}=\vec{0}
Heine A.b x.v = la x.v <=> (A.b - la I.b) x.v = 0.v
LaTeX \mathbf{A} \vec{x} = \lambda \vec{x} \iff \left(\mathbf{A} - \lambda \mathbf{I}) \vec{x} = \vec{0}

Design goals (in order)

  1. Readability
  2. Compactness
  3. Compatibility with LaTeX
  4. Output size

Installation

nimble install https://git.sr.ht/~xigoi/heine

Usage

Heine is a Nim library as well as a command-line program.

Usage as a library:

import pkg/heine
let latex = heine("E.v = /{q}{4 pi ep_0} r.v")
assert latex == r"\vec{E}=\frac{q}{4\pi\varepsilon_0}\vec{r}"

CLI usage:

heine 'E.v = /{q}{4 pi ep_0 r^3} r.v'
# or alternatively
echo 'E.v = /{q}{4 pi ep_0 r^3} r.v' | heine

Name

This is a compact math notation. Heine was one of the first mathematicians to introduce the notion of compactness in topology.

Source code

Heine is available on SourceHut under the GNU General Public License.