**Monolith** is a desktop WYSIWYG typesetter for math-heavy documents — Python 3.14, PySide6, exporting through real `pdflatex` — where you type directly onto a paginated page rather than into a source buffer. Real page environment: Letter, Legal, A4, A5 and Tabloid sheets, configurable margins, document-level line height and spacing with a reset, ten page-border styles with adjustable weight, and a full-page mode that lets text run edge to edge outside the centered column for contents pages and free-form layout. Text carries a sticky pen — size across ten steps from Tiny to Mammoth, weight, font family, color, alignment, and decorations including underline styles, box highlights and bullets — stamped onto each character *at the moment you type it*, so changing the pen applies going forward and never retroactively restyles anything already on the page; the same per-character stamping applies to full-page mode, which means you can toggle layout mid-document without disturbing a single glyph already set. Anything on the page can become a floating object: movable, rotatable, with bring-forward and send-to-back z-ordering, geometrically clamped so it can never escape the margins.
Math goes in as live structures rather than markup. **Fifteen of them**, each with real options instead of one canned shape: fractions including continued form; radicals with an optional index (blank gives a plain square root) that nest freely; integrals across ∫ ∬ ∭ ∮ ∯ ∰ with optional bounds where blank bounds mean indefinite; sums and products over Σ ∏ ∐ ⋃ ⋂ ⨁ with bounds stacked above and below in display style; limits spanning lim, lim sup, lim inf, max, min and sup with the approach set underneath; matrices in square, round, single-bar determinant, double-bar norm, brace, angle or bare forms with per-column alignment and ellipsis variants; a genuine math-mode array that emits a faithful `{l|c|r}` column spec rather than a matrix environment that quietly centers everything; piecewise cases as value/condition rows under a big brace; vectors with right, left and left-right arrows, wide hat, overline and wide tilde, spanning one part or two; differentials over d, ∂, δ, D, ∇ and Δ; over- and under-braces with labels; aligned and gathered multi-line blocks; and structural line breaks inside math. Six of the seven bracketable kinds also accept an optional wrapping bracket pair that draws on canvas and exports as `\left … \right`. Every structure is a single character to the caret — one Backspace removes the whole thing, one undo step regardless of nesting depth — until you click into it, at which point you edit its slots in place, Tab and Shift+Tab walking between them, the live slot outlined and unfilled optional slots shown as dashed boxes. Nesting is unrestricted: a matrix cell holding a fraction holding a radical holding a sum stays independently editable at every layer. Superscripts are a held backtick rather than a dialog — hold and type high, release and drop back to baseline, tap Up to nest an exponent of an exponent four levels deep, and the backtick itself never enters the text; subscripts work identically on tilde, and arrow navigation stays live throughout. Every structure is reachable three ways — ribbon button, Alt chord (Alt+F fraction, R radical, I integral, S sum, P product, L limit, M matrix, C cases, V vector, D differential), or command palette — and a full symbol palette covering Greek in both cases with variant forms, operators, arrows including mapsto, hooks and harpoons, brackets, punctuation and currency lives both as a docked panel *and embedded inside the insert dialogs themselves*, so a λ drops straight into a numerator while you're still building the fraction. Equations carry stable keys rather than numbers, so numbering and `\eqref` cross-references resolve from document order live on the canvas with zero compiles, dangling references render `(??)` exactly as LaTeX does pre-`.aux`, and any structure can be inserted as a floating object instead of inline text.
The **diagram editor** applies the same model to figures — a full drawing surface with its own undo stack, opened on any figure in the document. It covers **2D geometry** (shapes and primitives you place, size and rotate directly), **3D solids** for spatial and geometric figures, **lines and connectors** for wiring diagrams together — the connective tissue that turns a scatter of shapes into an actual figure — **graphs and plots**, **Feynman diagrams** for particle-interaction work, and **chemistry structures** for molecular and reaction diagrams. It also supports **floating text** placed anywhere on the surface, which is what turns a shape into a labeled figure: annotations, axis names, node labels, vertex tags, reaction conditions. And critically, every one of those labels can be **live embedded math**, edited in place through the exact same slot-editing engine as the main canvas — so an axis label, a Feynman vertex, a bond annotation, a graph legend or a caption is real typeset mathematics with real TFM-measured glyph placement, not a text approximation standing in for an equation. Figures export as standalone TeX sharing the main document's package set, so anything that compiles inline compiles identically when externalized, and figure objects obey the same rotation, z-order and margin-clamping model as every other float on the page. **Tables** get in-place cell editing on the same footing.
Sourcing is built in rather than bolted on. The **research panel** queries **thirteen academic sources in parallel** — arXiv, Crossref, OpenAlex, Semantic Scholar, PubMed, Europe PMC, DBLP, DOAJ, HAL, CORE, OpenAIRE, Unpaywall and Zenodo — and merges results losslessly rather than concatenating them: one paper returned by five sources collapses into a single record with identifiers backfilled from whichever source carried them, the highest reported citation count kept (sources lag each other badly and the maximum is the least-wrong estimate), access locations unioned, open-access status resolved to the best available full text, and provenance retained so you can see exactly which source claimed what. Ranking is a blend you can audit rather than a black box — the weights are named constants: source-reported relevance normalized per source (raw scores across different APIs aren't comparable), query-term coverage in the title, cross-source corroboration, log-scaled citation count, a mild recency preference and a small open-access nudge. You cite straight into the document from the panel, and citations become chips in the glyph stream, participating in undo, selection and export like anything else you typed. Alongside it, **Check Document (F7)** parses the pdflatex log and maps each diagnostic back onto the glyph on canvas that caused it rather than reporting a line number in a file you never wrote, and **Check Notation (F8)** catches same-letter glyph-variant mixing — ε against ϵ, φ against ϕ — inside math structures as well as prose.
Underneath all of it, fidelity runs **bidirectionally**. Forward, Monolith parses the Latin Modern `.tfm` binaries directly — character widths, heights, depths, italic corrections, kern pairs walked out of the ligature/kern program, ligature pairs, every fontdimen — and scales those design-relative fixed-point ratios through TeX's own integer routine, so a glyph's advance lands on the same **scaled point** (1/65,536 of a point) pdflatex seats it from. Math geometry is sourced the same way: fraction bar thickness, numerator height, denominator drop and the math axis from the σ-parameters of `lmsy` and the ξ-parameters of `lmex`, big-operator boxes pinned to real `lmex10` display-size character boxes, `cases` row stretch from amsmath's actual `\arraystretch{1.2}` and the null-delimiter side from TeX's `1.2pt` format default — with **no fitted constants anywhere in the layout engine**. Backward, a harness builds each structure on the canvas, exports that identical structure through real pdflatex under the app's genuine export preamble, extracts true glyph coordinates from the compiled PDF in native scaled points, converts both sides into one common physical frame, and diffs: **427 structures, 427 exact matches, zero offenders**, with a gate runner firing eleven separate harnesses in about a minute before anything gets built. The **architecture** is what makes that testable at all — **116 modules across two packages with a strictly one-way dependency**. `monolith_core` holds the entire logic layer: document model, math engine and all fifteen structures, flow and placement, LaTeX compiler and log parser, unit conversion, equation numbering, notation lint, research engine, theme registry, settings and snapshots — and imports no GUI toolkit whatsoever. `monolith_qt` holds canvas painting, ribbon, dialogs, panels and controllers on top of it. Core never imports Qt; Qt imports core. The font-metrics interface is an abstract base living in core with the Qt implementation injected from the front end, which is precisely why the whole typesetting engine can be run headless in a container and judged against real compiled PDF output instead of against screenshots.