Fix the arXiv-template PDF output
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).
This commit is contained in:
1 parent
fab26234fc
commit
b1e3e03f00
9 files changed
+457
-26
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# Route-D web experiment
|
||||
|
||||
Status: contract fixes and the curated three-project trial are complete
|
||||
(engine contract `1058122`, web `cecad51`); the go/no-go and P0 backlog are
|
||||
recorded below.
|
||||
(engine contract `1058122`, web `cecad51`), and the user-supplied arXiv
|
||||
template has since been used for a second PDF-fix pass (recorded below).
|
||||
Audit baseline: engine `c49afbd`, web `24c9593`; 2026-10-27.
|
||||
|
||||
## Verdict
|
||||
@@ -46,13 +46,13 @@ now means route-D.
|
||||
|
||||
| Area | Route-D | Evidence / impact |
|
||||
| --- | --- | --- |
|
||||
| Article/report basics: title, sections, lists, TOC, page numbers | Supported | corpus and 1065-test suite |
|
||||
| Article/report basics: title, sections, lists, TOC, page numbers | Supported | corpus and 1069-test suite |
|
||||
| Inline/display math, equations, tags, cleveref | Supported | math tests, oracle fixtures |
|
||||
| Floats, captions, tables, booktabs | Supported | table/math tests, corpus |
|
||||
| PNG/JPEG/BMP `\includegraphics` | Supported | project image tests |
|
||||
| PDF/SVG/EPS figures | **Not supported** | undecodable images become placeholder rules |
|
||||
| Inline `thebibliography` + `\cite` | Supported | citation tests |
|
||||
| `.bib` + BibTeX/biblatex data | **Not supported** | `\bibliography` is consumed without running BibTeX; unknown keys print `[?]` |
|
||||
| `.bib` + BibTeX data | Partial | simple `@article`/`@inproceedings` fields are inlined as `thebibliography`; complex BibTeX/BibLaTeX styles are not supported |
|
||||
| Local `.cls`/`.sty`/`\input` | Supported | project class/package tests |
|
||||
| Arbitrary package code, TikZ/pgf | **Not supported** | text/class subset only |
|
||||
| Two-column / `multicols` | Flattened | wrappers consumed; no column layout |
|
||||
@@ -61,7 +61,8 @@ now means route-D.
|
||||
| Footnotes, marks, running heads | Partial | marks are document-level, not per-page |
|
||||
| `\parbox` wrapping | Partial | width argument does not wrap |
|
||||
| Raster images in the SVG preview | Placeholder | the SVG painter draws a grey rectangle; the PDF embeds the real image |
|
||||
| Inline math in table cells | **Not supported** | trial table shows literal `$\mu$m`, `$\sim$`, `$10^6$` |
|
||||
| Inline math in table cells | Readable fallback | math commands are converted to plain text (`um`, `approx.`, `10**6`); not typeset as math |
|
||||
| `\fbox`/rule-only figures | Not supported | the caption is kept, but the rule/frame body is not drawn |
|
||||
| Nested-table images, `\valign` alignments | Not supported/partial | documented engine limits |
|
||||
| Token stream/catcodes beyond `@`/`%` | Partial | textual expander, not a TeX token stream |
|
||||
|
||||
@@ -75,7 +76,7 @@ parentheses); PDFs were checked for `%PDF-`.
|
||||
| --- | --- | --- | --- |
|
||||
| `article-basic` | 1 page, 0 warnings, 502 ms (624 ms), PDF 633 ms / 466 KB | 1 page, 1449 ms (1456 ms), PDF 2701 ms / 488 KB | TOC, figure, table, equation and inline bibliography all present; figure raster is a grey placeholder in SVG |
|
||||
| `unicode-mixed` | 1 page, 0 warnings, 442 ms (510 ms), PDF 656 ms / 174 KB | **422**, `undefined control sequence \'` | Route-D handles accents, Greek math, colours and footnotes; v1 cannot compile the source |
|
||||
| `arxiv-template` | 3 pages, 0 warnings, 1448 ms (1514 ms), PDF 1572 ms / 448 KB | 3 pages, 4280 ms (4308 ms), PDF 4677 ms / 5.2 MB | Route-D is faster, but `.bib` citations render `[?]`, `References` is absent, table-cell math is literal and `orcid.pdf` is a placeholder |
|
||||
| `arxiv-template` | 3 pages, 0 warnings, 1448 ms (1514 ms), PDF 1572 ms / 448 KB | 3 pages, 4280 ms (4308 ms), PDF 4677 ms / 5.2 MB | After the second pass, basic `.bib` citations resolve `[1]`–`[3]`, `References` is present and the table is readable; complex equations and rule/PDF-image figures remain approximate |
|
||||
|
||||
The first pass of this trial also exposed a parser bug: a heading followed on the
|
||||
next line by body text (no blank line) dropped the body, and consecutive
|
||||
@@ -91,22 +92,56 @@ toolbar shows **Route-D (实验)**, and the preview contains the body, table,
|
||||
equation and captions. It also confirmed the remaining visual gap: the PNG
|
||||
figure is a grey rectangle in the SVG preview (the exported PDF embeds it).
|
||||
|
||||
## arXiv-template second pass
|
||||
|
||||
The user-supplied `A_template_for_the_arxiv.zip` exposed four additional
|
||||
problems in the generated PDF, all fixed in the follow-up increment:
|
||||
|
||||
1. **Headings and title were letter-spaced.** Plain text in a paragraph whose
|
||||
base size was not 10pt took the `SizedText` inline-segment path, so its
|
||||
advances were scaled once for the run and again for the paragraph. The
|
||||
fallback run now uses the base size and the normal font path.
|
||||
2. **The table lost its third column.** Table cells are painted as plain text;
|
||||
`$`, `\` and other unsupported glyphs forced the whole cell through the PDF
|
||||
fallback font, leaving only a backslash. Table-cell math now has a readable
|
||||
ASCII fallback (`Size (um)`, `approx. 100`, `10**6`).
|
||||
3. **Page numbers appeared twice.** `fancyhdr`'s `\cfoot{\thepage}` was painted
|
||||
alongside the default route-D page number. Default numbering is now skipped
|
||||
for a fancy pagestyle.
|
||||
4. **`.bib` data was ignored.** Simple `@article`/`@inproceedings` entries are
|
||||
now parsed from project `.bib` files and inlined as `thebibliography`
|
||||
entries before citation resolution, so the template's `[?]` markers become
|
||||
`[1]`–`[3]` and a References section is emitted.
|
||||
|
||||
Remaining visible gaps in this template:
|
||||
|
||||
- the display equation is still a rough approximation of the printed formula;
|
||||
- the `\fbox{\rule...}` figure body is not drawn (only its caption survives);
|
||||
- `orcid.pdf` is a vector image and stays unsupported;
|
||||
- the author block is concatenated and does not reproduce the class layout.
|
||||
|
||||
The revised PDF was rendered page-by-page and checked for the title, table,
|
||||
references and page numbers. A project regression test now uploads a `.bib`
|
||||
file and asserts that a route-D preview contains `References`, `[1]` and the
|
||||
entry text.
|
||||
|
||||
## Go/no-go
|
||||
|
||||
|
||||
- **Go**, limited to text/table/math documents: Route-D is the faster default
|
||||
and handles accents that v1 rejects.
|
||||
- **Conditional no-go** for image-heavy or BibTeX-based papers: the SVG preview
|
||||
does not draw raster images, `.bib` data is not resolved, PDF/vector figures
|
||||
are unsupported, and table-cell math is literal.
|
||||
- **Conditional go** for the supplied arXiv template's text, tables and simple
|
||||
`.bib` references; **no-go** for complex equations, `\fbox`/rule figures,
|
||||
vector/PDF images and image-heavy previews until those gaps are fixed.
|
||||
- Keep the explicit v1 escape hatch: v1 is not a universal fallback (it failed
|
||||
the Unicode trial), so the UI must continue to show the actual engine and
|
||||
warnings/fallbacks instead of assuming v1 always recovers.
|
||||
|
||||
## Backlog after the trial
|
||||
|
||||
- **P0**: SVG preview raster-image embedding; `.bib`/BibTeX citation data;
|
||||
PDF/vector figure support; inline math/formatting in table cells; visible
|
||||
capability warnings for unsupported content.
|
||||
- **P0**: SVG preview raster-image embedding; PDF/vector figure support;
|
||||
complex-equation layout; `\fbox`/rule figure bodies; full BibTeX/BibLaTeX
|
||||
coverage; visible capability warnings for unsupported content.
|
||||
- **P1**: two-column/multicols layout; fontspec/system-font loading; common
|
||||
TikZ/package execution; longtable page splitting.
|
||||
- **P2**: full catcode/token stream; nested-table images; per-page marks;
|
||||
|
||||
Reference in new issue
Block a user