Consider a table that continues onto the next PDF page. If extraction detaches the final row, a translator can produce fluent prose from it and a reader can display that prose beautifully. The words may all be present, yet the document has changed meaning: those values no longer belong to the table.
An offline technical reader has to solve this problem before it can solve typography. A paragraph needs a source; a table cell needs an owner; a translation needs the particular revision it was made from. This project builds those relationships into a document compiler, then presents them through a reader with bilingual views, references, search and bookmarks.
The useful way to explore it is to begin with one passage—and follow what happens when its source changes.
Start with a calculation you can check
The demonstration uses the project’s actual reader template with a short, synthetic technical document. Its six sections and 45 content blocks pair an English source with a complete French translation. The worked example is deliberately small: the average of [8, 10, 9, 13] is 10. Replacing the oldest value, 8, with 12 gives [10, 9, 13, 12], whose average is 11.
One calculation, two views of its source.
Open section 2 and enable the source pane. Compare Equation (1) with the four values it averages.
Animation stoppedOpen section 2, “Une moyenne mobile sur quatre valeurs,” and enable the source pane. Equation (1) gives the rule; the worked values let you check it. The attached footnote records the unit assumption. Follow the reference to Figure 1, inspect its preview, then return to the passage. Each of these actions depends on the compiler preserving a relationship between objects.
Bookmark the passage. The reader has to preserve two different addresses: the passage you were reading and the object it refers to.
These controls make a useful demand on the content underneath them. A reference must lead to the right object. A bookmark must identify a stable reading location. A source pane must show the source of the passage beside it. A polished interface cannot repair a broken association.
More to try in the reader
Search for buffer or tampon in the source and translation. The Terms tab gives terminology, symbols, abbreviations and requirement wording; the Index tab collects figures, tables, equations and bibliography entries. Reload to return with saved bookmarks and display preferences.
Switch between section navigation and continuous reading; resize the panes; change density or theme; open the source PDF; and try the requirement-wording toggle. The document also exercises nested headings, numbered list items, figure legends and notes, two tables, two display equations, and an annex of check data.
The full-size view uses the same template and document as the embed. Formulas, fonts and icons are packaged locally. This public demonstration adapts the layout for smaller screens; the original product is oriented toward desktop reading.
Give a passage an identity before giving it a layout
The compiler’s central object is a structured source block. It records a stable identifier, a kind, source-page information and membership in a logical reading unit. Translation and display fields are kept separate from those source facts.
This distinction matters at a page break. One table can occupy several physical regions while remaining one logical object. A cell may itself contain a list, code or a formula explanation. Recording only the extracted strings would lose that hierarchy; recording only the rendered page would make later corrections difficult to trace.
A source block is more than a string.
- Extract
page + span + geometryKeep the page and fragment needed to verify the text.
- Structure
block → reading unitResolve reading order, formulas, tables and references.
- Bind
source revision + fieldAttach each transformed field to the source it was reviewed against.
- Assemble
compiled static packageReject stale bindings before emitting the offline reader.
The source_engineering stage binds blocks to source material. Physical fragments retain page regions and source spans. When fragments are joined or an extraction block is absorbed into another object, a disposition record accounts for the change. The compiler then projects reviewed objects into reader data, views, navigation and catalogs.
Consequently, a layout can change without silently rewriting the source. Navigation is checked against the same structure: a view’s entry anchor must resolve to a real heading inside that view’s block range. “Somewhere on the correct page” is too weak an address for a technical reference.
A source correction invalidates a specific result
Suppose a source clause is corrected from “sample at intervals no greater than Δt” to “no greater than Δt/2” after its translation packet has been prepared. This is a compiler example, separate from the demonstration document. Both translations could read smoothly, but only one corresponds to the current requirement.
The translation_preparation stage records hashes of source blocks and their individual fields. When a response comes back, assembly checks that it covers exactly the prepared segments and that the current source still matches those bindings. A changed block, changed cell, missing segment or duplicate segment stops assembly.
prepare: bind each segment to its source block and field
translate: return exactly the prepared segment IDs
assemble: compare those bindings with the current source
reject any stale, missing or duplicate segment
The unit of invalidation is significant. Two table cells may contain the same words while belonging to different rows. A correction to one must not rewrite the other. Source ownership resolves that distinction; ambiguous mappings are rejected.
Formulas and identifiers also travel through a protected-token ledger. That protects them from accidental rewriting during translation. It does not establish that extraction got them right in the first place. A faithfully preserved OCR error is still an error, which leads to the next layer of evidence.
When text is insufficient, return to the page image
A missing subscript can turn one plausible equation into another. To review that kind of object, render_object_evidence binds a crop to its source-page image, object identity, coordinate system and bounding box. The record includes the page and crop hashes as well as the crop dimensions.
This gives a correction a second route back to evidence. Changed source pixels invalidate the old crop. Missing or ambiguous geometry prevents an apparently precise crop from being accepted. An unrelated caption edit, however, need not invalidate a crop whose geometry and pixels are unchanged; the broader generation still records its input provenance.
Cross-page objects retain their physical fragments, and a footnote must have a resolvable parent. These are the same ownership rules encountered in the reader, now applied before rendering.
For displayed mathematics, the compiler discards incoming precompiled HTML and rebuilds it from formula source with a fixed local renderer. That produces consistent, offline output. Comparing the formula with its source remains a separate obligation: successful typesetting proves that an expression can be displayed, not that it was transcribed correctly.
Release the document only when its relationships close
At release time, the quality_gate checks current source and target bindings, exact response coverage, visual-crop identities, per-attempt records and replayable translation assembly. An open or incomplete issue remains a failure even if another field calls the work complete.
The output is a static reader that opens from local files, with local assets and math support. Source-only documents use the same structure without duplicating text to imitate a translation. Bibliography, glossary and internal links must resolve to actual content.
The design makes a source correction consequential. It can invalidate a translation, require a new visual review and prevent an outdated reader from being released. That is what the interface’s paired panes ultimately depend on: the text beside the source must still be attached to that source.
Implementation evidence and remaining review work
Checked-in tests cover stale bindings, protected-token changes, source-region recovery, successive packet application, table projection and missing visual coverage. A browser smoke harness checks anchors, view ranges and reference targets through the local file protocol. These original-project tests were inspected, not rerun for this article; no source extraction or model request was performed.
The embedded reader is a working demonstration with synthetic content. Ambiguous scans and specialized terminology still require substantive review. Structural consistency makes those decisions traceable; it cannot make them automatically correct.