h.MarkupDocumentation · 1.0.0

Architecture

Compiler 1.0.0 implements this pipeline in Python with a bundled browser runtime. See IMPLEMENTATION.md for backend constraints and SYNTAX.md for accepted notation.

Pipeline

Source text
    -> tokenizer and parser
    -> syntax tree
    -> imports, aliases, and symbol resolution
    -> type and component validation
    -> component expansion
    -> target-independent document model
    -> HTML, CSS, assets, and controlled runtime
    -> interactive web document or paged PDF rendering

Python modules

The package is currently organized by responsibility:

Browser measurement, named flows, constraints, logical page numbers, and Paged.js orchestration live in static/runtime.js. Shared styling lives in static/base.css; pinned browser dependencies and fonts are in static/vendor/.

Rendering principle

Web and PDF should share the same generated HTML, CSS, fonts, assets, and layout rules wherever possible. PDF export should use the paged representation rather than an independent drawing implementation. Target-specific differences must be explicit and testable.

Determinism

Source bundles are deterministic and carry content checksums. HTML builds record source and asset hashes. Browser libraries and fonts are bundled locally. PDF visual reproducibility requires the same Chromium version, platform, fonts, and profile; byte-identical PDF output is not promised because the PDF backend may include changing metadata.

Testing strategy

The test suite includes:

PDF pages are also rendered to images and manually reviewed in output/playwright/. There is not yet an automated pixel-baseline comparison suite, exhaustive accessibility audit, or cross-engine compatibility matrix.

Hamen Markup 1.0.0 · MIT license · Support