From 8ffd9bdd77cda30facc20b61ec5723efeb87df6c Mon Sep 17 00:00:00 2001 From: Andrew Collier Date: Sun, 5 Apr 2026 05:56:20 +0100 Subject: [PATCH] fix: Handle known file search problem --- src/command/render/latexmk/texlive.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/command/render/latexmk/texlive.ts b/src/command/render/latexmk/texlive.ts index 923e6421966..727a8f1dcc9 100644 --- a/src/command/render/latexmk/texlive.ts +++ b/src/command/render/latexmk/texlive.ts @@ -89,8 +89,16 @@ export async function findPackages( // Special cases for known packages where tlmgr file search doesn't work // https://github.com/rstudio/tinytex/blob/33cbe601ff671fae47c594250de1d22bbf293b27/R/latex.R#L470 const knownPackages = ["fandol", "latex-lab", "colorprofiles"]; + // Special cases where tlmgr --file search returns no results for a .sty file + // because the TeX Live package name differs from what the file search returns. + // tagpdf-base.sty is in the tagpdf-base package in TeX Live 2026. + const knownFileMappings: Record = { + "tagpdf-base.sty": "tagpdf-base", + }; if (knownPackages.includes(searchTerm)) { results.push(searchTerm); + } else if (knownFileMappings[searchTerm]) { + results.push(knownFileMappings[searchTerm]); } else { const result = await tlmgrCommand( "search",