latex-doctor selects obsolete TeX Live bin before current 2026 installation
Codex LaTeX plugin latex-doctor appears to select an obsolete TeX Live bin directory before the current one.
Environment:
- Current PATH latexmk: /usr/local/texlive/2026/bin/universal-darwin/latexmk
- Version: Latexmk, John Collins, 9 March 2026. Version 4.88
- latex-doctor selected: /usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0/latexmk
- Selected latexmk version: Version 4.10, 21 August 2009
Observed:
latex-doctor reports TeX bin:
/usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0
It then runs:
/usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0/latexmk -pdf -interaction=nonstopmode -halt-on-error -synctex=1 ...
This fails with:
Latexmk: -interaction=nonstopmode bad option
Latexmk: -halt-on-error bad option
Latexmk: -synctex=1 bad option
Expected:
latex-doctor should prefer the active/current TeX Live installation, especially /usr/local/texlive/2026/bin/universal-darwin when it is on PATH, and should ignore incompatible architecture directories or tools that cannot execute.
Likely cause:
scripts/detect_texlive.py uses:
sorted(glob.glob("/usr/local/texlive//bin/"), reverse=True)
Lexicographic reverse sorting puts /usr/local/texlive/p2009/... before /usr/local/texlive/2026/..., and the detector accepts paths even when version probing returns Bad CPU type or Exec format error.
3 Comments
cannot find detect_texlive.py anywhere
MacOS recently went using ARM against (m1 m2 m3 chips)
which laptop/mac-mini you are using? (as per binary issue)
```
0.16.9`.This plugin bundles the official Tectonic executable release
Release source:
https://github.com/tectonic-typesetting/tectonic/releases/tag/tectonic%400.16.9
````
as per THIRD_PARTY_NOTICES.md
C:\Users\User\.codex\plugins\cache\openai-bundled\latex-tectonic\0.1.1
maybe scripts/detect_texlive?
is something your AI AGENT created??
meaning you are using the correct Tectonic binary , but a issue within Tectonic?
---
<img width="1903" height="653" alt="Image" src="https://github.com/user-attachments/assets/b2ba308f-7c58-4538-b1db-901834b9c3e2" />
they are some refrences to
texlive in tectonic its powered by powered by XeTeX and
TeXLive.
maybe ~~~ literal .codex\plugins\cache\openai-bundled\latex-tectonic~~~~ tectonic-path.mjs
```import { existsSync } from "node:fs";
import path from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";
export function getTectonicExecutablePath(
pluginRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."),
) {
const executableName =
process.platform === "win32" ? "tectonic.exe" : "tectonic";
const executablePath = path.join(pluginRoot, "bin", executableName);
if (!existsSync(executablePath)) {
throw new Error(
Bundled Tectonic executable not found at ${executablePath}.,);
}
return executablePath;
}
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
console.log(getTectonicExecutablePath());
}
````
I'm afraid the above bug report, written by Codex, should have been clearer.
Tectonic (XeLaTeX) that comes with Codex's LaTeX plugin worked perfectly, but I needed LuaLaTeX plus LuaTeX-ja rather than Tectonic's XeLaTeX engine for better Japanese typesetting, so I asked Codex to use the already installed TeX Live in my Mac (Apple Silicon). Codex tried to detect TeX Live using
~/.codex/plugins/cache/openai-bundled/latex/0.2.0/scripts/detect_texlive.pybut failed to find the latest TeX Live binaries in/usr/local/texlive/2026/bin/universal-darwin, which is in my PATH. Instead it found the oldest TeX Live/usr/local/texlive/p2009/...and complained my TeX Live was too old. When the mistake was pointed out, Codex blamed it on a bug indetect_texlive.py, wrote the above bug report, and advised me to post it in here.Thanks for the wonderful plugin. Hope this helps improve it.
detect_texlive.py genuinely does not appear anywhere publicly online — it's not indexed on GitHub, npm, or any public registry (sorry if my language aggressive)
maybe its some external library?
can you
zip -r latex-0.2.0.zip ~/.codex/plugins/cache/openai-bundled/latex/0.2.0
?
for me its latex-tectonic
and it says 0,1.1 after a fresh install. plus also resides in
C:\Users\User\.codex\plugins\cache\openai-bundled\latex-tectonic
not latex alone
I dont have a mac machine to confirm how it looks on macos
and https://github.com/openai/plugins doesnt have any latex at all
beside minor refrences of latex usage in
https://github.com/openai/plugins/blob/main/plugins/hugging-face/skills/paper-publisher/SKILL.md?plain=1#L48
and
https://github.com/openai/plugins/blob/main/plugins/zotero/skills/zotero/SKILL.md?plain=1#L3
a bit odd that latex bundle is missing --- but its likely due to the fact that it includes a binrary/.exe
perhaps its a university thing some student made , or a local registrary?
)))