You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note-for-later, no current reproducer. Spawned by the analysis for #14511.
Context
In #14511 the typst PDF recipe's complete callback (src/command/render/output-typst.ts) was observed to read format.metadata[kFontPaths] from the format parameter captured at recipe construction. For book projects, withBookTitleMetadata (src/project/types/book/book-render.ts:724) deep-clones and reassigns recipe.format between recipe construction and renderPandoc, so the captured reference becomes stale. resolveExtras then mutates the new (post-clone) recipe.format.metadata, but the recipe's complete never sees it.
The committed fix reads from pandocOptions.format (the live reference). See PR for #14511.
Concern by analogy
texToPdfOutputRecipe (src/command/render/output-tex.ts) has the same capture-the-parameter pattern in its complete callback. Specifically:
It reads format.render[kKeepTex] from the captured format (around line 105).
The PDF-standard fallback chain at lines 93–94 also reads from the captured format.
LaTeX/PDF book formats are single-file (they do NOT set multiFile: true), so they DO go through renderSingleFileBook → withBookTitleMetadata → deep-clone. The structural exposure is identical to the typst case.
Why this isn't an active bug today
No current pipeline step mutates format.render[kKeepTex] or format.metadata[kPdfStandard] between recipe construction and complete. The known post-construction mutations in pandoc.ts (kTocTitle at ~498, kAbstractTitle at ~521, user pandoc metadata merge at ~466) touch different keys.
If confirmed latent: either (a) apply the same pandocOptions.format read for symmetry and defense-in-depth, or (b) close as won't-fix with a comment in output-tex.ts explaining why the snapshot is intentional.
Note-for-later, no current reproducer. Spawned by the analysis for #14511.
Context
In #14511 the typst PDF recipe's
completecallback (src/command/render/output-typst.ts) was observed to readformat.metadata[kFontPaths]from theformatparameter captured at recipe construction. For book projects,withBookTitleMetadata(src/project/types/book/book-render.ts:724) deep-clones and reassignsrecipe.formatbetween recipe construction andrenderPandoc, so the captured reference becomes stale.resolveExtrasthen mutates the new (post-clone)recipe.format.metadata, but the recipe'scompletenever sees it.The committed fix reads from
pandocOptions.format(the live reference). See PR for #14511.Concern by analogy
texToPdfOutputRecipe(src/command/render/output-tex.ts) has the same capture-the-parameter pattern in itscompletecallback. Specifically:format.render[kKeepTex]from the capturedformat(around line 105).format.LaTeX/PDF book formats are single-file (they do NOT set
multiFile: true), so they DO go throughrenderSingleFileBook→withBookTitleMetadata→ deep-clone. The structural exposure is identical to the typst case.Why this isn't an active bug today
No current pipeline step mutates
format.render[kKeepTex]orformat.metadata[kPdfStandard]between recipe construction andcomplete. The known post-construction mutations inpandoc.ts(kTocTitleat ~498,kAbstractTitleat ~521, user pandoc metadata merge at ~466) touch different keys.Asks for whoever picks this up
kKeepTexorkPdfStandardafter recipe construction for a PDF book — if there is, it's the same class of bug as typst book: brand fonts downloaded but not passed totypst compile(unknown font family warning) #14511 and reproducible.pandocOptions.formatread for symmetry and defense-in-depth, or (b) close as won't-fix with a comment inoutput-tex.tsexplaining why the snapshot is intentional.Related
typst compile(unknown font family warning) #14511 (root issue)src/command/render/output-typst.ts(already fixed)src/command/render/types.ts:265(OutputRecipe.completesignature)