James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.58k stars 527 forks source link

Skipping undefined tool "xelatex" in recipe "xelatex." #2595

Closed Fifate closed 3 years ago

Fifate commented 3 years ago

Preliminary questions [Required]

Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue. [Required]

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.

You visited the wiki?: Yes

If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.

You can compile a TeX document manually?: Yes

Describe the bug [Required]

I can't build main.tex with xelatex. It show me the error message "Skipping undefined tool "xelatex" in recipe "xelatex -> bibtex -> xelatex". And I have add xelatex path onto env $Path and can't normal execute xelatex with wins cmd.

To Reproduce

Steps to reproduce the behavior:

  1. Setting my latex workshop as below:
    "latex-workshop.latex.recipes": [
        {
            "name": "xelatex",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "latexmk",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "pdflatex -> bibtex",
            "tools": [
                "pdflatex",
                "bibtex"
            ]
        },
        {
            "name": "pdflatex -> bibtex -> pdflatex*2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "xelatex -> bibtex -> xelatex*2",
            "tools": [
            "xelatex",
            "bibtex",
            "xelatex",
            "xelatex"
            ]
        },
        {
            "name": "xelatex -> bibtex -> xelatex",
            "tools": [
            "xelatex",
            "bibtex",
            "xelatex"
            ]
        }
    ],
    "latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk"
    ]    
  2. Click on build > Recipe: exlatex and other options within exlatex
  3. See error I get an error "Skipping undefined tool "xelatex" in recipe "xelatex -> bibtex -> xelatex"

Expected behavior

I hope I

Logs [Required]

Please paste the whole log messages here, not parts of ones. The log should start with Initializing LaTeX Workshop. It is very important to identify problems.

LaTeX Workshop Output [Required]

To access the log, click the 'TeX' icon on the Activity Bar on the left side, select 'View Log Messages', then select 'View LaTeX Workshop extension log'.

[19:31:44] Initializing LaTeX Workshop.
[19:31:44] Extension root: c:\Users\Administrator\.vscode\extensions\james-yu.latex-workshop-8.16.1
[19:31:44] $PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\libnvvp;C:\WINDOWS\system32\;F:\program\python\install\Scripts\;F:\program\python\install\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;%QUARTUS_ROOTDIR%\bin;F:\Java\jdk1.8.0_201\bin;F:\Java\jdk1.8.0_201\jre\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;F:\program\tomcat\apache-tomcat-9.0.29\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\common\lib\x64;C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\bin\win64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\lib\x64;C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\common\lib\x64;C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\bin\win64;E:\2020\NoSQL\software\neo4j-community-3.5.3\bin;F:\program\MongoDB\Server\4.2\bin;F:\program\gcc\install\bin;F:\program\cmake\install\bin;F:\program\putty\install\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\texlive\2020\bin\win32;F:\program\git\2.27.0\Git\cmd;F:\program\python\install;F:\program\python\install\Library\mingw-w64\bin;F:\program\python\install\Library\usr\bin;F:\program\python\install\Library\bin;F:\program\python\install\Scripts;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;F:\Java\IntelliJ IDEA 2018.3.5\bin;;C:\Program Files\MySQL\MySQL Server 5.6\bin;F:\program\tomcat\apache-tomcat-9.0.29\bin;F:\program\vs code\install\bin;C:\Users\Administrator\AppData\Local\GitHubDesktop\bin;C:\texlive\2020\bin\win32;
[19:31:44] $SHELL: undefined
[19:31:44] Creating PDF file watcher.
[19:31:44] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}}
[19:31:46] Creating LaTeX Workshop http and websocket server.
[19:31:46] LaTeX Workshop initialized.
[19:31:46] Trigger characters for intellisense of LaTeX documents: ["\\","{",",","(","["]
[19:31:46] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[]}
[19:31:46] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:31:46] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:31:46] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:31:46] Root file changed: from undefined to e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:31:46] Start to find all dependencies.
[19:31:46] Root file languageId: latex
[19:31:46] Creating a new file watcher for e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:31:46] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[19:31:46] Creating Bib file watcher.
[19:31:46] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[19:31:46] Parsing a file and its subfiles: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:31:46] Ignoring: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.cfg
[19:31:46] Parsing a file and its subfiles: e:\2020下\毕设\BUPTBachelorThesis-1.7\abstract.tex
[19:31:46] Ignoring: e:\2020下\毕设\BUPTBachelorThesis-1.7\abstract.cfg
[19:31:46] Parse fls file.
[19:31:46] Cannot find fls file: e:\2020下\毕设\BUPTBachelorThesis-1.7\abstract.fls
[19:31:46] Found .bib file: e:\2020下\毕设\BUPTBachelorThesis-1.7\ref.bib
[19:31:46] Added to bib file watcher: e:\2020下\毕设\BUPTBachelorThesis-1.7\ref.bib
[19:31:46] Parsing .bib entries from e:\2020下\毕设\BUPTBachelorThesis-1.7\ref.bib
[19:31:46] Parse fls file.
[19:31:46] Cannot find fls file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.fls
[19:31:46] Server created on 127.0.0.1:13642
[19:31:46] Added to file watcher: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:31:46] Added to file watcher: e:\2020下\毕设\BUPTBachelorThesis-1.7\abstract.tex
[19:31:46] Snippet data loaded.
[19:31:46] LaTeX Workshop version: 8.16.1
[19:31:46] Parsed 15 bib entries from e:\2020下\毕设\BUPTBachelorThesis-1.7\ref.bib.
[19:31:47] Checking for duplicate labels: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex.
[19:31:47] Checking for duplicate labels: e:\2020下\毕设\BUPTBachelorThesis-1.7\abstract.tex.
[19:34:35] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:34:35] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:34:35] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:34:35] Keep using the same root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:34:36] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:34:36] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:34:36] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:34:36] Keep using the same root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:34:38] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:34:38] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:34:38] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:34:38] Keep using the same root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:07] RECIPES command invoked.
[19:36:07] BUILD command invoked.
[19:36:07] The document of the active editor: output:extension-output-%232
[19:36:07] The languageId of the document: Log
[19:36:07] Cannot find LaTeX root file.
[19:36:24] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:36:24] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:36:24] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:24] Keep using the same root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:29] BUILD command invoked.
[19:36:29] The document of the active editor: file:///e%3A/2020%E4%B8%8B/%E6%AF%95%E8%AE%BE/BUPTBachelorThesis-1.7/main.tex
[19:36:29] The languageId of the document: latex
[19:36:29] Current workspace folders: ["file:///e:/2020下/毕设/BUPTBachelorThesis-1.7"]
[19:36:29] Current workspaceRootDir: e:\2020下\毕设\BUPTBachelorThesis-1.7
[19:36:29] Found root file from active editor: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:29] Keep using the same root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:29] Building root file: e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:29] Build root file e:\2020下\毕设\BUPTBachelorThesis-1.7\main.tex
[19:36:29] Unexpected Error: please see the console log of the Developer Tools of VS Code.

Developer Tools Console [Required]

To access the log, click 'help' -> 'Toggle Developer Tools' -> 'Console'. Paste anything suspicious.

workbench.desktop.main.js:731 Skipping undefined tool "xelatex" in recipe "xelatex."
onDidChangeNotification @ workbench.desktop.main.js:731
workbench.desktop.main.js:626   ERR Running the contributed command: 'latex-workshop.build' failed.: Error: Running the contributed command: 'latex-workshop.build' failed.
    at S._executeContributedCommand (f:\program\vs code\install\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:87:103934)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout
/F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:2084 [[object Object]]Cannot read property 'command' of undefined
$onExtensionRuntimeError @ /F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:2084
/F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:2084 TypeError: Cannot read property 'command' of undefined
    at Builder.buildStep (c:\Users\Administrator\.vscode\extensions\james-yu.latex-workshop-8.16.1\out\src\components\builder.js:288:87)
    at Builder.buildInitiator (c:\Users\Administrator\.vscode\extensions\james-yu.latex-workshop-8.16.1\out\src\components\builder.js:197:14)
    at Builder.build (c:\Users\Administrator\.vscode\extensions\james-yu.latex-workshop-8.16.1\out\src\components\builder.js:259:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Commander.build (c:\Users\Administrator\.vscode\extensions\james-yu.latex-workshop-8.16.1\out\src\commander.js:115:9)
$onExtensionRuntimeError @ /F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:2084
/F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:731 Recipe terminated with error.
onDidChangeNotification @ /F:/program/vs code/install/resources/app/out/vs/workbench/workbench.desktop.main.js:731
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/node_modules/windows-process-tree/lib/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/2b9aebd5354a3629c3aba0a5f5df49f43d6689f8/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout

Screenshots

If applicable, add screenshots to help explain your problem.

image

Desktop [Required]

Please write exact version numbers. Please don't write latest instead of exact numbers.

Additional questions

Are you using VSCodium?

No

Are you using LaTeX Workshop with VS Code Remote?

No

Additional context

I will try reinstall vs-code.

tamuratak commented 3 years ago

You have to define xelatex in latex-workshop.latex.tools:

"latex-workshop.latex.tools": [
        {
            "name": "latex",
            "command": "latex",
            "args": [
                "-synctex=1",
                "-file-line-error",
                "-interaction=nonstopmode",
                "%DOC%"
            ]
        },
        {
            "name": "lualatex",
            "command": "lualatex",
            "args": [
                "-synctex=1",
                "-file-line-error",
                "-interaction=nonstopmode",
                "%DOC%"
            ]
        }
]

See https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-recipes