使用 Github Codespaces 和 VS Code 编写 latex 文档:构建时出错

使用 Github Codespaces 和 VS Code 编写 latex 文档:构建时出错

我正在使用 Github Codespaces 扩展、VS 代码和 Tex Live 处理保存在我的 Github 帐户中的 Latex 文件,但是当我尝试构建 pdf 时出现以下错误:

[09:28:41.306][Build] Building root file: %WS1%/Notes Latex/01 Notes_de_cours/02 Notes_de_cours.tex
[09:28:41.307][Build][Recipe] Build root file %WS1%/Notes Latex/01 Notes_de_cours/02 Notes_de_cours.tex
[09:28:41.343][Build][Recipe] Preparing to run recipe: pdfLaTeX.
[09:28:41.343][Build][Recipe] Prepared 1 tools.
[09:28:41.345][Build][Recipe] outDir: %WS1%/Notes Latex/01 Notes_de_cours .
[09:28:41.346][Build] Recipe step 1 The command is pdflatex:["-synctex=1","-interaction=nonstopmode","-file-line-error","%WS1%/Notes Latex/01 Notes_de_cours/02 Notes_de_cours"].
[09:28:41.346][Build] env: {}
[09:28:41.346][Build] root: %WS1%/Notes Latex/01 Notes_de_cours/02 Notes_de_cours.tex
[09:28:41.347][Build] cwd: %WS1%/Notes Latex/01 Notes_de_cours
[09:28:41.359][Build] LaTeX build process spawned with PID undefined.
[09:28:41.360][Build] LaTeX fatal error on PID undefined. Error: spawn pdflatex ENOENT
[09:28:41.361]Error: spawn pdflatex ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[09:28:41.361][Build] Does the executable exist? $PATH: /vscode/bin/linux-x64/5c3e652f63e798a5ac2f31ffd0d863669328dc4c/bin/remote-cli:/home/codespace/.local/bin:/home/codespace/.dotnet:/home/codespace/nvm/current/bin:/home/codespace/.php/current/bin:/home/codespace/.python/current/bin:/home/codespace/java/current/bin:/home/codespace/.ruby/current/bin:/home/codespace/.local/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/oryx:/usr/local/go/bin:/go/bin:/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:/usr/local/php/current/bin:/opt/conda/bin:/usr/local/nvs:/usr/local/share/nvm/current/bin:/usr/local/hugo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/dotnet:/home/codespace/.dotnet/tools:/usr/local/rvm/bin, $Path: undefined, $SHELL: /bin/bash
[09:28:41.361][Build] 
[09:28:52.968][Commander] BUILD command invoked.
[09:28:52.968][Build] The document of the active editor: output:extension-output-James-Yu.latex-workshop-%231-LaTeX Workshop
[09:28:52.968][Build] The languageId of the document: Log
[09:28:52.969][Build] Cannot find LaTeX root file. See https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#the-root-file
[09:28:59.755][Event] STRUCTURE_UPDATED
[09:29:44.013][Event] STRUCTURE_UPDATED

抱歉,这对我来说太新了,我尝试添加路径:C:\texlive\2024\bin\windows\tex.exe对于我的用户变量,我也将它添加到 json 文件中,但我无法使其工作。

非常感谢您的帮助 !!

相关内容