infinite negative utility

telml

The telml format is a simple, extensible language for text formatting, intended to look at a glance like TeX or LaTeX. Unlike Markdown or reStructured Text, it has a simplicity and economy of expression, but lacks much of the convenience of those formats; unlike TeX, it is not directly given semantics, but is more of a text-focused data storage format. It might be most closely related to something like XML, but it is designed to be easier to write and read than XML, which can be very verbose and difficult to author.

The basic structure of a TeLML document is a sequence of either textual fragments or tags, where a tag is written as a backslash, an alphanumeric tag name, and zero or more TeLML documents, contained within curly braces and separated by vertical bars:

\tagname{ document | document | ... }

Consequently, a snippet like foo \bar{baz|\quux{}} translates into a structure like

[ "foo ", tag "bar" [ ["baz"], [ tag "quux" [] ] ] ]

The raw TeLML format is deliberately separated from the choices about how to render that format, but by convention, certain HTML- and LaTeX-like tags are understood: for example \em{...} for emphasis and \strong{...} for bolding.

Right now, there is a Haskell implementation of the basic TeLML grammar, as well as a package for rendering that to HTML. (TeLML is the markup language I use for numerous personal projects, such as in the source files for my blog, what happens when computer, as it affords easy extensibility of the set of understood text constructs.)