Skip to content

Commit 8ffd9bd

Browse files
committed
fix: Handle known file search problem
1 parent fbaf628 commit 8ffd9bd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/command/render/latexmk/texlive.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,16 @@ export async function findPackages(
8989
// Special cases for known packages where tlmgr file search doesn't work
9090
// https://github.com/rstudio/tinytex/blob/33cbe601ff671fae47c594250de1d22bbf293b27/R/latex.R#L470
9191
const knownPackages = ["fandol", "latex-lab", "colorprofiles"];
92+
// Special cases where tlmgr --file search returns no results for a .sty file
93+
// because the TeX Live package name differs from what the file search returns.
94+
// tagpdf-base.sty is in the tagpdf-base package in TeX Live 2026.
95+
const knownFileMappings: Record<string, string> = {
96+
"tagpdf-base.sty": "tagpdf-base",
97+
};
9298
if (knownPackages.includes(searchTerm)) {
9399
results.push(searchTerm);
100+
} else if (knownFileMappings[searchTerm]) {
101+
results.push(knownFileMappings[searchTerm]);
94102
} else {
95103
const result = await tlmgrCommand(
96104
"search",

0 commit comments

Comments
 (0)