Commit Graph
447 Commits
Author SHA1 Message Date
gloamxun 7f74251c8a Track PDF literal transforms in native source maps 2026-11-21 02:23:12 +08:00
gloamxun d46d6d79a8 Expose stored left and right margin kerns from native boxes 2026-11-21 02:13:39 +08:00
gloamxun 432c1d2ba7 Emit native PDF literals at scan and shipout boundaries 2026-11-21 02:03:25 +08:00
gloamxun 13ab32247d Implement native paragraph token naming and execution contexts 2026-11-21 01:49:10 +08:00
gloamxun 862801ee5f Preserve alignment boundaries when matching hash-brace macros 2026-11-21 01:36:06 +08:00
gloamxun 307303d596 Resolve expandable PDF page references to shipped page objects 2026-11-21 01:25:00 +08:00
gloamxun 5c2ba9fad0 Implement pdfTeX random primitives with checkpointed state 2026-11-21 01:10:55 +08:00
gloamxun a958954308 Read file-backed PDF objects at their actual write boundary 2026-11-21 01:02:40 +08:00
gloamxun 4f4a4567ea Emit native PDF page resources and named transparency states 2026-11-21 00:53:46 +08:00
gloamxun 6d54af5350 Expand deferred TeX input without recursive dispatch frames 2026-11-20 23:40:14 +08:00
gloamxun ebbc9e2c17 Implement native automatic font expansion for paragraphs 2026-11-20 23:29:37 +08:00
gloamxun 4777d66fc8 Apply native font protrusion during line breaking and packing 2026-11-20 17:18:25 +08:00
gloamxun 361e8d070f Reuse decoded Type 1 fonts across native revisions 2026-11-20 16:55:48 +08:00
gloamxun 6e573dc1ce Run cancellable pdfTeX matching in native frontends 2026-11-20 16:43:48 +08:00
gloamxun 091458d329 Verify schema 28 format round trips and rejection gates 2026-11-20 16:21:19 +08:00
gloamxun 4eeb5686b8 Implement native text accents for unmodified LaTeX jobs 2026-11-20 16:15:30 +08:00
gloamxun 0a21eb27a7 Reuse session-verified source versions in native source maps 2026-11-20 14:18:42 +08:00
gloamxun 592d1ef2a3 Reuse byte-verified source versions after checkpoint resume 2026-11-20 13:02:50 +08:00
gloamxun 287d4a7cf0 Validate live checkpoint reuse across atomic project file changes 2026-11-20 08:26:44 +08:00
gloamxun 24ea6ef7ee Reuse fixed file identity within a live alias scan 2026-11-19 22:02:53 +08:00
gloamxun 10a08c4597 Batch native state fingerprint writes for live editing 2026-11-19 21:15:54 +08:00
gloamxun ee22f25ee0 Resolve TeX inputs with the default suffix alternatives 2026-11-19 20:01:08 +08:00
gloamxun 48c980c871 Share TeX hyphenation patterns and reuse verified state fingerprints 2026-11-19 19:00:55 +08:00
gloamxun ab50ca7dad Reuse project directory indexes within a revision 2026-11-19 18:14:31 +08:00
gloamxun 393fba42d8 Reuse closed events and line breaking after a checkpoint 2026-11-19 16:39:08 +08:00
gloamxun 28668ea10f Refresh interactive TeX state across successive edits 2026-11-19 16:19:29 +08:00
gloamxun 38e4822370 Integrate native repeat boxes and PDF bookmarks 2026-11-19 16:06:28 +08:00
gloamxun 9ce878efd4 Match paragraph tokens in macro delimiters 2026-11-19 15:06:50 +08:00
gloamxun 72ed779749 Promote verified native PDF and box capacity support 2026-11-19 14:39:39 +08:00
gloamxun 43231a48c0 Reuse validated checkpoint executors during native preview 2026-11-19 11:16:40 +08:00
gloamxun 06463399bb Enable automatic native checkpoints and browser preview 2026-11-19 10:05:41 +08:00
gloamxun 0abf700817 Resume native editor jobs through verified checkpoints 2026-11-19 09:35:33 +08:00
gloamxun f4b003bd27 Write native PDF catalogs and open actions 2026-11-19 08:54:04 +08:00
gloamxun a53d9c9bf9 Implement native PDF links and vertical discard lists 2026-11-18 23:39:45 +08:00
gloamxun 2741546ca8 Advance native LaTeX execution and preview 2026-11-18 22:17:21 +08:00
gloamxun 96b40c1c2e Tighten large-operator lower limits 2026-10-29 00:15:15 +08:00
gloamxun 01b3f518cb Add bounded line expansion for Times body text 2026-10-28 23:19:16 +08:00
gloamxun 049365d595 Use Times metrics for table column widths
Halign measured every cell with the CMR default even in Times documents, so the
sample table was wider than TeX and page 3 ink reached x=553. Give Halign an
optional paragraph face and refresh column widths in that face; route-D now
selects TimesRoman for ptm tabulars. Page 3 ink bbox moves to x=540, matching
the reference.
2026-10-28 13:51:00 +08:00
gloamxun 35015853b4 Test that tagged math uses the display measure
Assert TaggedWidth.width equals the measure, protecting the right-margin
equation tag geometry while the formula body remains approximate.

Test count is 1083.
2026-10-28 09:03:37 +08:00
gloamxun e41492b2a0 Keep CMMI/CMSY Type1 math in Times PDFs
The TrueType Times backend also sent math glyphs through Liberation fallbacks,
which changed their size and spacing. Allow the math face slots (6..10) to use
their Computer Modern Type1 programs even when the text backend is TrueType,
and add a PDF test asserting CMMI10 plus LiberationSerif in the same file.

Test count is 1082.
2026-10-28 08:54:55 +08:00
gloamxun 676eb7f323 Keep sum superscripts above the operator
Large-operator limits used the ordinary-base superscript gap, which could
leave N just below the sum baseline. Use a negative gap for large operators
so both limits straddle the operator, and add a unit test asserting the
subscript is below and the superscript above the base within 12pt.

Test count is 1080.
2026-10-28 08:28:17 +08:00
gloamxun 02742d201f Keep large-operator limits close to the operator
Display limits under \sum used the operator glyph depth, which pushed i=1 far
below the fraction and made the denominator look detached. Use the normal
limit gap for big operators while preserving the depth-based placement that
the existing \mathop oracle validates for ordinary bases.

Test count stays 1079.
2026-10-28 08:17:57 +08:00
gloamxun d5de8b9fe6 Attach math scripts across ignored spaces
TeX ignores spaces in math mode, but parse_sequence looked for _ or ^ at the
raw next index. Source such as \alpha _{i} therefore rendered the underscore
as a literal symbol at full size. Skip math spaces after the base before
checking for scripts.

The arXiv equation now has real subscripts and superscripts instead of literal
underscores. Test count is 1078.
2026-10-28 00:48:51 +08:00
gloamxun 742986e4dd Correct fraction depth and subscript placement
The fraction box added bar clearance twice to its depth, leaving extra space
below the denominator. Use the painted extent instead. Scripts now include
script space after the base, and subscripts drop by the base depth plus 2pt
rather than sitting on the baseline when the base has no depth.

Test count stays 1077.
2026-10-28 00:43:25 +08:00
gloamxun 802526c352 Reserve full fraction extents in math layout
Fraction layout scaled numerator and denominator extents by 0.7 while painting
both at the full size, underestimating the box height and depth. Use the full
extents plus the bar clearance so the display equation no longer compresses its
fraction vertically.

Test count stays 1077.
2026-10-28 00:39:05 +08:00
gloamxun 764bc18850 Place display equation tags at the right margin
Tagged display math used the body width as its box, so the equation number sat
immediately after the formula. Add a TaggedWidth atom carrying the line
measure: the body is centred in the measure and the tag is painted at its right
edge.

The arXiv equation number now matches the TeX right-margin placement; the
formula body remains approximate. Test count stays 1077.
2026-10-28 00:32:56 +08:00
gloamxun 37b956c0a6 Use Unicode math glyphs in table cells
Table conversion previously fell back to Size (um), approx. 100 and 10**6.
Emit µ, ~, ×, ±, Greek letters and Unicode superscripts instead, with ASCII
equivalents for width measurement when the CMR table lacks the glyph.

The arXiv table now reads Size (µm), ~100 and 10⁶ in both PDF and SVG; test
count stays 1076.
2026-10-28 00:14:55 +08:00
gloamxun fd9ee0740b Use Times metrics for bold and italic text
Add ptmb8t/ptmri8t/ptmbi8t metrics and TimesBold/TimesItalic/TimesBoldItalic
paragraph faces. A ptm document now maps Roman, bold, italic and bold-italic
base faces to the Times family, so headings and emphasised runs use Times
widths while the PDF backend continues to embed Liberation Serif.

The arXiv output is unchanged at 3 pages; previews measured 12.5-17.5 ms warm
and 191 ms cold. Test count is 1076.
2026-10-28 00:08:19 +08:00
gloamxun e9bbd4bd87 Use Times metrics for ptm documents
Add a merged ptmr8t TFM asset, a TimesRoman paragraph face and Cmr10Metrics
entry, map a ptm Roman paragraph to it, and select the Liberation Serif
TrueType PDF backend for those projects. The title is uppercased rather than
small-capped so its widths use Times metrics.

The arXiv PDF now embeds Liberation Serif for body text; title/author/abstract
land at y=88/173/277pt with three pages and all references. Headings and bold/
italic Times faces still use CMR metrics.

Test count is 1075.
2026-10-28 00:00:34 +08:00
gloamxun 2ef5e29329 Embed raster images in the SVG preview
The SVG preview painted every DisplayItem::Image as a grey rectangle. Encode
the raw RGB image as a PNG (zlib via flate2, CRC32, base64) and emit an SVG
<image> data URI; keep the grey fallback for images above four megapixels.

The article preview now contains the real 480x240 plot and the framed rule
figure is visible while editing. Test count stays 1074.
2026-10-27 23:50:48 +08:00