Skip to content

Commit d871c99

Browse files
committed
Add support for colorprofiles.sty
1 parent 2e16fca commit d871c99

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,12 @@ const packageMatchers = [
267267
return "lua-uni-algos.lua";
268268
},
269269
},
270+
{
271+
regex: /.* Package pdfx Error: No color profile ([^\s]*).*/g,
272+
filter: (_match: string, _text: string) => {
273+
return "colorprofiles.sty";
274+
},
275+
},
270276
{ regex: /.* Loading '([^']+)' aborted!.*/g },
271277
{ regex: /.*! LaTeX Error: File `([^']+)' not found.*/g },
272278
{ regex: /.* [fF]ile ['`]?([^' ]+)'? not found.*/g },

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ unitTest("Detect missing files with `findMissingFontsAndPackages`", async () =>
6767
);
6868
// support file missing
6969
assertFound("support file `supp-pdf.mkii' (supp-pdf.tex) is missing", "supp-pdf.mkii");
70+
// pdfx color profile error
71+
assertFound("! Package pdfx Error: No color profile sRGB_IEC61966-2-1_black_scaled.icc found", "colorprofiles.sty");
7072

71-
// Note: The following error types from tinytex are not yet testable because
72-
// patterns don't exist in parse-error.ts:
73+
// Note: The following error type from tinytex is not yet testable because
74+
// the pattern doesn't exist in parse-error.ts:
7375
// - .fd files: "No file LGRcmr.fd. ! LaTeX Error: This NFSS system isn't set up properly."
74-
// - pdfx color profiles: "! Package pdfx Error: No color profile sRGB_IEC61966-2-1_black_scaled.icc found"
7576
},{
7677
cwd: () => "unit/latexmk/"
7778
})

0 commit comments

Comments
 (0)