The arXiv fraction sat about 17 pt too far left because the route relation
spacing had no room before \frac. Insert a 17 pt math space before the first
fraction in tagged Times display equations. The formula text span moves from
x=144.7..540.9 to x=135.4..540.9; TeX is x=132.7..540.7. Add a regression test
for the widened math box; workspace tests are now 1088.
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.
Rewrite author names as First Last (with Oxford-comma lists), use plain titles
and italic journal/booktitle with In, order the bibliography by first citation,
carry the 2014a/b suffix into the reference text, and fix page/publisher
punctuation. The valid TeX-oracle score rises from 0.8605 to 0.8958.
Add two formatter tests; the workspace now has 1086 tests.
The checked-in template.pdf is stale: its references.bib snapshot does not
match the checked-in .bib, so earlier scores used the wrong oracle. Add a
reproducible pdflatex/bibtex script that copies the fixture, drops the unused
cleveref package (cleveref/hyperref socket mismatch in this TeX Live), defines
languagename for lipsum, and produces a valid 3-page reference. Re-score route-D
against it: 1243 reference words, 1251 candidate words, ratio 0.8605.
Replace the iD text marker after pagination with a generated 32x32 ORCID-green
badge containing a white iD glyph. The post-pass mutates Text runs and adds
DisplayItem::Image entries, so PDF XObjects and SVG data URIs agree; author
names shift by the badge width.
Test count is 1084.
Assert TaggedWidth.width equals the measure, protecting the right-margin
equation tag geometry while the formula body remains approximate.
Test count is 1083.
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.
Add a regression test for the arXiv page flow: page 1 ends with the final
section-2 line (porta vehicula. See Section 2.) and page 2 starts at
2.1 Headings. This protects the Times baselineskip/glue fix.
Test count is 1081.
With only the 11.5pt baselineskip, page 1 was fixed but the 2.1 paragraph
still took seven lines instead of six and pushed the equation to y=190. Use
Times glue of 2.5/1.5/0.83pt; page 1 stays aligned, 2.1 returns to six lines,
and the equation number moves to y=178 (TeX: 175).
Test count stays 1080.
With the 12pt class baselineskip the first page could not fit the final
section-2 line, so page 2 started with a leftover line and the equation sat
about 55pt too low. An 11.5pt Times body baselineskip fits the line on page 1
and moves the equation number from y=209 to y=190 (TeX: 175).
Drop the earlier 2.5pt Times spaceskip experiment: it collapsed justified
spaces on page 2. Test count stays 1080.
ptm paragraphs used the generic 4/6/2pt interword glue. Set the Times skip to
2.5/1.5/2.5pt, which lets the first page fit more of the final section-2 line
and moves the page-2 equation about 21pt closer to TeX.
Test count stays 1080.
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.
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.
Cover the arXiv equation through the preview SVG: no literal underscore/caret
text items may remain, and the equation number must sit near the right margin.
This locks the script-attachment and TaggedWidth fixes.
Test count is 1079.
.format_bib_entry ignored the doi field, so the arXiv first reference lost its
doi:10.1109/... suffix. Append doi:<value> when present and extend the server
bib test fixture/assertions.
Test count stays 1078.
Add scripts/tex-fidelity.py: page count, normalized word-sequence similarity and
per-page ink bounds from a 72 dpi grayscale render, using only the stdlib and
Poppler. Document the current arXiv score (0.848 word ratio, 3 pages) and its
limits.
Test count stays 1078.
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.
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.
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.
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.
The filler array was a short Lorem ipsum paraphrase, so \lipsum[1] produced
about half the lines of the lipsum package and every later page break was
wrong. Replace the ten paragraphs with the actual lipsum.ltd.tex text.
The arXiv sample now has the same abstract/introduction flow as TeX and both
figure and table land on page 3 above 3.3/3.4; test count stays 1077.
Author metadata contains an ORCID PDF icon inside href; the author block was
dropping the include and showing only the name. Replace orcid.pdf includegraphics
and orcidlink with an iD text marker so the author line keeps a recognisable
ORCID cue. This is not the vector logo; it is a text approximation.
Test count is 1077.
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.
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.
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.
Add an x offset to VerticalItem::Image and use it when placing a decoded image
in a float, so a 0.4\textwidth plot is centred while its caption remains
centred across the float. Other image uses keep x=0.
Test count stays 1074.
VerticalItem::Image was missing from Float::content_height, so image floats
reported zero content height and could overlap following text. Include the
image height and add a regression test.
Test count is 1074.
The project .bib inliner now derives author-year labels (with a/b
disambiguation for duplicate author-years) and writes them as optional
\bibitem labels. The route-D citation pass uses those labels only when they
look like author-year labels: \citep gets parentheses, \citet becomes
Author (Year), and reference entries lose their numeric brackets. Inline
thebibliography entries without such labels remain numeric.
The arXiv sample now prints (Kour and Saabne, 2014a; Keshet et al., 2016) and
Kour and Saabne (2014b), matching natbib semantics more closely. Test count
stays 1073.
Encode \And author groups into a marker paragraph and build a centred two-column
halign instead of ten sequential lines. Footnote groups are extracted before
the table and reattached to the paragraph; literal ~ is normalized because the
CMR table font cannot cover it. The arXiv title page now puts the abstract at
y=279pt (TeX: 281pt) instead of ~431pt.
The generic \and join path is unchanged; its thanks test now asserts the
extracted footnote instead of a literal \footnote string.
The arXiv class places 2pt rules above/below the title and an A Preprint
undertitle. Detect the class via its toptitlebar macro, reserve space with an
invisible rule (page builders discard glue before the first unit), and stamp
the rules/undertitle onto the first page for both preview and PDF.
Update the title-page header assertion: the first page legitimately carries the
undertitle, so it must lack the running center header instead. Author lines
remain sequential; two-column affiliations are still open.
build_document was the real latency bottleneck (~196 ms), not page layout
(~2 ms). Add a bounded thread-local cache of laid-out normal paragraph units,
keyed by text, face, heading level, size, width and alignment, plus a full
paragraph-shaping geometry signature. Geometry changes clear the cache; floats,
tables, math and footnote-bearing paragraphs are not cached.
Release measurements after the cache: article-basic 47 ms, arXiv late edit
p50 57.5 ms / p95 70.3 ms (one page), 10-page simple stress document p50 13 ms
/ p95 14.7 ms. Cold first builds remain 150–370 ms. The 3-page and 10-page
measured cases now meet the <100 ms target; heading/front-matter edits still
reflow multiple pages.
The existing hang-indent server test caught a missing style field in the
signature; hang/looseness/fillskip/tolerance/penalty fields are now included.
Test count stays 1073.