Add the missing display-fraction relation gap

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.
This commit is contained in:
gloamxun committed 2026-10-28 14:02:58 +08:00
1 parent d3175bcd1c
commit e262bc0091
7 files changed
+108 -13

No files matched your search

+8 -6
View File
@@ -30,8 +30,8 @@ The current arXiv template comparison reports:
```text
reference_pages 3, candidate_pages 3
reference_words 1243, candidate_words 1262
word_sequence_ratio 0.8958
reference_words 1243, candidate_words 1266
word_sequence_ratio 0.8944
page 1 ink bbox: TeX [72, 79, 540, 721] route-D [71, 79, 540, 724]
page 2 ink bbox: TeX [72, 36, 540, 748] route-D [71, 41, 540, 751]
page 3 ink bbox: TeX [72, 36, 540, 748] route-D [71, 41, 540, 751]
@@ -62,12 +62,14 @@ A 72 dpi ink crop of the formula band (excluding the equation tag) currently
measures:
```text
TeX: x = 184..519, y = 230..269
route: x = 201..519, y = 241..274
TeX: x = 132.7..540.7
route before gap: x = 144.7..540.9
route after gap: x = 135.4..540.9
```
The route formula is about 17 pt narrower and 11 pt lower. The tag itself is
within 1 pt horizontally. The remaining width is in the math body (spacing /
The route formula now starts within 2.7 pt of TeX horizontally (it was about
17 pt too far right). The word-sequence score moves 0.8958 -> 0.8944 because
pdftotext separates the added relation gap; the geometric span is closer. The remaining width is in the math body (spacing /
fraction density), not the tag geometry. A trial that inserted 3 pt between every
top-level math atom widened the box but visibly over-spaced the formula
(`ξ ( t ) = P ( ... )`), so that approach was reverted.