Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All changes included in 1.9:
- ([#13625](https://github.com/quarto-dev/quarto-cli/issues/13625)): Fix Windows file locking error (os error 32) when rendering with `--output-dir` flag. Context cleanup now happens before removing the temporary `.quarto` directory, ensuring file handles are properly closed.
- ([#13633](https://github.com/quarto-dev/quarto-cli/issues/13633)): Fix detection and auto-installation of babel language packages from newer error format that doesn't explicitly mention `.ldf` filename.
- ([#13694](https://github.com/quarto-dev/quarto-cli/issues/13694)): Fix `notebook-view.url` being ignored - external notebook links now properly use specified URLs instead of local preview files.
- ([#13732](https://github.com/quarto-dev/quarto-cli/issues/13732)): Fix automatic font package installation for fonts with spaces in their names (e.g., "Noto Emoji", "DejaVu Sans"). Font file search patterns now match both with and without spaces.

## Dependencies

Expand Down
3 changes: 2 additions & 1 deletion src/command/render/latexmk/parse-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ const packageMatchers = [
];

function fontSearchTerm(font: string): string {
return `${font}(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)`;
const fontPattern = font.replace(/\s+/g, '\\s*');
return `${fontPattern}(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)`;
}

function findMissingPackages(logFileText: string): string[] {
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/latexmk/parse-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { unitTest } from "../../test.ts";
import { assert } from "testing/asserts";

function fontSearchTerm(font: string): string {
return `${font}(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)`;
const fontPattern = font.replace(/\s+/g, '\\s*');
return `${fontPattern}(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)`;
}

function assertFound(logText: string, expected: string, file?: string) {
Expand All @@ -32,6 +33,8 @@ unitTest("Detect missing files with `findMissingFontsAndPackages`", async () =>
assertFound('!pdfTeX error: /usr/local/bin/pdflatex (file tcrm0700): Font tcrm0700 at 600 not found', fontSearchTerm("tcrm0700"))
assertFound('(fontspec) The font "LibertinusSerif-Regular" cannot be', fontSearchTerm("LibertinusSerif-Regular"));
assertFound('! Font \\JY3/mc/m/n/10=file:HaranoAjiMincho-Regular.otf:-kern;jfm=ujis at 9.24713pt not loadable: metric data not found or bad.', "HaranoAjiMincho-Regular.otf");
assertFound('! The font "Noto Emoji" cannot be found.', fontSearchTerm("Noto Emoji"));
assertFound('! Package fontspec Error: The font "DejaVu Sans" cannot be found.', fontSearchTerm("DejaVu Sans"));
assertFound("! LaTeX Error: File `framed.sty' not found.", "framed.sty");
assertFound("! LaTeX Error: File 'framed.sty' not found.", "framed.sty");
assertFound("/usr/local/bin/mktexpk: line 123: mf: command not found", "mf");
Expand Down
Loading