Skip to content

Commit 8a71069

Browse files
committed
support missing font definition files
1 parent d871c99 commit 8a71069

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/command/render/latexmk/parse-error.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ const packageMatchers = [
273273
return "colorprofiles.sty";
274274
},
275275
},
276+
{
277+
regex: /.*No file ([^`'. ]+[.]fd)[.].*/g,
278+
filter: (match: string, _text: string) => {
279+
return match.toLowerCase();
280+
},
281+
},
276282
{ regex: /.* Loading '([^']+)' aborted!.*/g },
277283
{ regex: /.*! LaTeX Error: File `([^']+)' not found.*/g },
278284
{ regex: /.* [fF]ile ['`]?([^' ]+)'? not found.*/g },

tests/unit/latexmk/parse-error.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ unitTest("Detect missing files with `findMissingFontsAndPackages`", async () =>
6969
assertFound("support file `supp-pdf.mkii' (supp-pdf.tex) is missing", "supp-pdf.mkii");
7070
// pdfx color profile error
7171
assertFound("! Package pdfx Error: No color profile sRGB_IEC61966-2-1_black_scaled.icc found", "colorprofiles.sty");
72-
73-
// Note: The following error type from tinytex is not yet testable because
74-
// the pattern doesn't exist in parse-error.ts:
75-
// - .fd files: "No file LGRcmr.fd. ! LaTeX Error: This NFSS system isn't set up properly."
72+
// font definition file (converted to lowercase)
73+
assertFound("No file LGRcmr.fd. ! LaTeX Error: This NFSS system isn't set up properly.", "lgrcmr.fd");
7674
},{
7775
cwd: () => "unit/latexmk/"
7876
})

0 commit comments

Comments
 (0)