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.
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.
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.
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.
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.
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.
The rule rectangle used width-margin for its right edge, so a centred table
shrank or lost its booktabs rules. Derive the right edge from the last column
offset instead, then centre a table float by shifting its margin. All three
columns and the rules now stay inside the measure.
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.
The display-list conversion stored the layout width/height (scaled points)
as PdfImage.width/height, so an image XObject claimed 12 million pixels and
pdfimages reported bad image parameters; the image never appeared. Keep the
layout rectangle in DisplayItem::Image but use the raster pixel dimensions for
the XObject.
Verified pdfimages now lists the 480x240 plot and the article PDF shows it.
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 user-supplied template PDF exposed four concrete problems:
- title/headings were letter-spaced: plain text in a large paragraph took the
SizedText segment path and was scaled twice; the fallback run now stays at
the base size and is scaled once by the paragraph;
- the table lost its third column because unsupported math glyphs were sent
through the PDF fallback font; table-cell math now has a readable ASCII
fallback (Size (um), approx. 100, 10**6);
- fancyhdr's \cfoot{\thepage} was painted together with route-D's default page
number; default numbering is skipped for a fancy pagestyle;
- .bib data was ignored; simple @article/@inproceedings entries are now parsed
from project .bib files, inlined as thebibliography entries, and resolved by
the existing citation pass, producing References and [1]-[3].
The regenerated 3-page PDF was checked for title/heading spacing, table text,
references and a single page number per page. A project regression test covers
the .bib path, and the table/heading fixes have unit tests.
Remaining visible limits in this template: the complex display equation, the
\fbox/rule figure body, vector/PDF images and the author block layout.
Test count moves to 1069 (444 core, 432 engine, 65 server).
Three test functions in texrra-tex-core (PDF metadata, Type1 outline embedding
and \noalign row glue) were missing their #[test] attribute and only produced
dead-code warnings. With the attributes added they pass and raise the core suite
from 439 to 442 tests. The unused `mut` on the PDF entry point geometry is gone
too, leaving no route-D/PDF/lib compiler warnings in `cargo check
--workspace --all-targets`.
The amsmath extensible arrows were unknown, so their labels fell back to plain
text. The math parser now reads \xrightarrow/\xleftarrow, an optional [below]
label, and the above label, and builds nested Stack atoms around the arrow
symbol: above stacks upward, an optional below label stacks downward.
The math test compares the bare arrow with the labeled form (width/height grow)
and with the two-label form (total height plus depth grows).
\boldsymbol and \bm were unknown math commands, so a bold symbol fell back to
the default layout. Both names now select the same bold alphabet as \mathbf;
symbol-heavy arguments still use the regular symbol metrics, which is the
existing alphabet approximation.
A math test compares \boldsymbol{x} with \mathbf{x} for equal width and height.
The headings page style only painted the page number. Document now records its
heading units (unit index and title) during layout, and a page_headings helper
carries the latest heading from page to page through the page sources. The
running-head pass uses that list in headings style: the numbered heading title
is uppercased at the left of the header and the page number stays right-aligned,
with the first page still plain.
The headings test gains a section and checks "1 INTRODUCTION" sits at the left
of the header baseline.