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 @@ -46,6 +46,7 @@ All changes included in 1.9:
- ([#13661](https://github.com/quarto-dev/quarto-cli/issues/13661)): Fix LaTeX compilation errors when using `mermaid-format: svg` with PDF/LaTeX output. SVG diagrams are now written directly without HTML script tags. Note: `mermaid-format: png` is recommended for best compatibility. SVG format requires `rsvg-convert` (or Inkscape with `use-rsvg-convert: false`) in PATH for conversion to PDF, and may experience text clipping in diagrams with multi-line labels.
- ([rstudio/tinytex-releases#49](https://github.com/rstudio/tinytex-releases/issues/49)): Fix detection of LuaTeX-ja missing file errors by matching both "File" and "file" in error messages.
- ([#13667](https://github.com/quarto-dev/quarto-cli/issues/13667)): Fix LaTeX compilation error with Python error output containing caret characters.
- ([#13730](https://github.com/quarto-dev/quarto-cli/issues/13730)): Fix TinyTeX detection when `~/.TinyTeX/` directory exists without binaries. Quarto now verifies that the bin directory and tlmgr binary exist before reporting TinyTeX as available, allowing proper fallback to system PATH installations.

## Projects

Expand Down
27 changes: 18 additions & 9 deletions src/tools/impl/tinytex-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ import { existsSync } from "../../deno_ral/fs.ts";
import { os as platformOs } from "../../deno_ral/platform.ts";

export function hasTinyTex(): boolean {
const installDir = tinyTexInstallDir();
if (installDir && existsSync(installDir)) {
return true;
} else {
return false;
const binDir = tinyTexBinDir();
if (!binDir) {
return false; // No bin directory found
}

// Check for tlmgr binary (critical package manager)
const tlmgrBinary = platformOs === "windows" ? "tlmgr.bat" : "tlmgr";
const tlmgrPath = join(binDir, tlmgrBinary);
return safeExistsSync(tlmgrPath);
}

export function tinyTexInstallDir(): string | undefined {
Expand Down Expand Up @@ -49,10 +52,16 @@ export function tinyTexBinDir(): string | undefined {
if (safeExistsSync(winPath)) return winPath;
return join(basePath, "bin\\windows\\");
}
case "linux":
return join(basePath, `bin/${Deno.build.arch}-linux`);
case "darwin":
return join(basePath, "bin/universal-darwin");
case "linux": {
const linuxPath = join(basePath, `bin/${Deno.build.arch}-linux`);
if (safeExistsSync(linuxPath)) return linuxPath;
return undefined;
}
case "darwin": {
const darwinPath = join(basePath, "bin/universal-darwin");
if (safeExistsSync(darwinPath)) return darwinPath;
return undefined;
}
default:
return undefined;
}
Expand Down
Loading