Skip to main content

What is matex?

matex turns structured source into a PDF. The source is XML-like, so a document's structure is explicit: it can be read, checked and reasoned about by its author and by its tooling.

dynamic source ──compile──▶ static source ──render──▶ PDF
│ │
└──────── check ─────────┘

This is a compiler with a page as its target, not a browser in disguise. The author writes meaning and relationship; the engine decides measure, line breaks and page boundaries, and reports when it cannot.

Two kinds of source​

KindWhat it isWhat accepts it
DynamicThe authoring form. May import modules, instantiate components, and refer to numbers it does not spell out.collect, compile, check
StaticThe resolved form. Every line is broken, every number is written down, and nothing is left to resolve.render

Static source is defined by absence: no imports, no components, no flow, and none of the tags that compile lowers (<p>, <float>, <footnote>, <sup>, <sub>). That is what lets render promise that it never invents a page.

What it promises​

  • Nothing renders that was not resolved first. render accepts static source only.
  • One origin per property. A value comes from the tag, a project default keyed by tag, or the engine. There is no selector and no cascade.
  • Numbers are computed before layout. collect runs after expansion and before pagination, so a label never depends on where a line lands.
  • Every loss is reported. Clipped content is a warning; a missing glyph is an error.
  • One vocabulary. Markup, configuration and the static dialect use the same names for the same things.

The three document classes​

The engine is measured against three kinds of work:

  1. Scientific papers — figures, tables, equations, footnotes, resolved internal links, citations, running heads, multi-column flow.
  2. Theses and books — the same apparatus at long-form scale, with contents pages and a bibliography shared across a whole work.
  3. Presentation slides — the same source laid out as discrete pages rather than flowing text.
Status

matex is pre-1.0. Class 1 is supported today. Classes 2 and 3 are designed but not implemented. The status page is specific about which is which.

Who it is for​

  • Authors who want control through structure rather than positioning, and who would rather fix a reported problem than discover a silent fallback.
  • Tool builders who need a document format with a real grammar: imports, types, components and generated reference stores, rather than a bag of tags.
  • Engineers who want the layout pipeline to be inspectable at every stage — including the static file that sits between compile and render.

Where to go next​

  • Getting started — build the CLI and render a page.
  • The pipeline — what each command owns, and what static source looks like.
  • The specimen — a complete paper, its source, and the output.
  • Why matex — the goal the design is measured against.