Commit fe9fc59
committed
Fix PDF compilation for packages requiring more than 2 LaTeX passes
The pdf() function hardcoded exactly 2 LaTeX passes. Packages like
nicematrix (which uses TikZ "remember picture" for cell coloring)
require 3+ passes to correctly position overlay nodes. With only 2
passes, colored cell backgrounds could expand to fill the entire page.
Replace the hardcoded 2-pass approach with a rerun loop that checks
the .log file for "Rerun" requests after each pass, matching the
strategy already used for standalone latex-image compilation. Documents
not needing extra passes still get exactly 2 passes (the loop checks
the log after pass 2 and breaks immediately).
Fixes #28251 parent 2d52519 commit fe9fc59
1 file changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5224 | 5224 | | |
5225 | 5225 | | |
5226 | 5226 | | |
5227 | | - | |
5228 | 5227 | | |
5229 | | - | |
5230 | | - | |
5231 | | - | |
| 5228 | + | |
| 5229 | + | |
| 5230 | + | |
| 5231 | + | |
| 5232 | + | |
5232 | 5233 | | |
| 5234 | + | |
| 5235 | + | |
5233 | 5236 | | |
5234 | | - | |
| 5237 | + | |
| 5238 | + | |
| 5239 | + | |
| 5240 | + | |
| 5241 | + | |
| 5242 | + | |
| 5243 | + | |
| 5244 | + | |
| 5245 | + | |
5235 | 5246 | | |
5236 | 5247 | | |
5237 | 5248 | | |
| |||
0 commit comments