Te  Xmath
1 Syntax
2 API Reference


Eric Griffis <dedbox@gmail.com>

A LaTeX-like syntax for typesetting mathematics.

1 Syntax

The syntax is currenty limited to whitespace-delimited sequences of atoms and composite terms.

A term is an atom, optionally followed by an underscore and a subscript atom, optionally followed by a carat and a superscript atom, optionally followed by a sequence of primes.

An atom is an contiguous sequence of characters that represents a single, indivisible unit of information. An atom can be a number, a word, a literal, or a sub-term.

A number is a contiguous sequence of decimal digits.

A word is a letter or symbol followed by zero or more numbers, letters, or symbols. Latin letters are rendered in an oblique font.

A literal is a backslash followed by a curly brace or a sequence of numbers, letters, and symbols. The backslash is not rendered, and the characters following the backslash are all rendered in an upright font. Punctuation are rendered as single-character literals.

A sub-term is a whitespace-delimited sequence of terms surrounded by curly braces.

2 API Reference

 (require texmath) package: texmath


($ text-body ...+)  element?

  text-body : string?
Parses text-body into an element that, when rendered, resembles the output of a proper LaTeX2e renderer.


(inferrule premise ... bar maybe-rule-name conclusion)

maybe-rule-name = 
  | rule-name
Renders a rule of inference with premises and conclusion centered on and separated by a horizontal bar. If rule-name is given, it is rendered to the right of the horizontal bar.

Currently, bar is a sequence of dashes—at least 3 but no more than 80.