Disable all the other extensions except for LaTeX Workshop, and check that you still see this issue. [Required]
You still see this issue?: Yes
Describe the bug [Required]
There is a problem that the tooltip shows me "Loading" when editing the text file, and the latex compiler could be hanging on as the file could not be saved to the disk and could not trigger the compiler to build PDF.
When I've removed the command "renewcommand", the problem seems to be resolved. See logs as Developer Tools Console, it reports the error: "TeX parse error: Illegal control sequence name for renewcommand"
To Reproduce
Steps to reproduce the behavior:
Here is my settings:
{
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "xelatex ➞ bibtex ➞ xelatex × 2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {}
},
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
],
"env": {}
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
],
"env": {}
}
],
}
Expected behavior
Show the preview of the equation in the tooltip rather than the symbol "Loading".
Logs [Required]
LaTex Workshop extension logs:
[13:57:17] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:17] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex.
[13:57:17] Parsing /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:17] File watcher: responding to change in /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:17] /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex changed. Auto build project.
[13:57:17] BUILD command invoked.
[13:57:17] Building root file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:17] Build root file /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:17] Recipe step 1: xelatex, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,-outdir=/Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ ,/Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes
[13:57:17] LaTeX build process spawned. PID: 7250.
[13:57:19] Cannot parse /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex: Fall back to regex-based completion.
[13:57:19] LaTeX log parsed with 1 messages.
[13:57:19] Recipe of length 1 finished. PID: 7250.
[13:57:19] Successfully built /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex.
[13:57:19] No PDF viewer connected for /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.pdf
[13:57:57] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
[13:57:57] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex.
LaTex Compiler logs:
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(/Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /notes.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2018/texmf-dist/tex/xelatex/xecjk/xeCJK.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/base/fontenc.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/base/tuenc.def)) (/usr/local/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/usr/local/texlive/2018/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg)) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/hyperref.sty (/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty (/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty)) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/auxhook.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/pd1enc.def) (/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/hyperref.cfg) (/usr/local/texlive/2018/texmf-dist/tex/latex/url/url.sty)) (/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/hxetex.def (/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/puenc.def) (/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/stringenc.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/amsfonts.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/amssymb.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/xetex.def)))
*************************************************
* xeCJK warning: "fandol"
*
* Fandol is being set as the default font for CJK text.
* Please make sure it has been properly installed.
*************************************************
*************************************************
* fontspec warning: "script-not-exist"
*
* Font 'FandolSong-Regular' does not contain script 'CJK'.
*************************************************
(./notes.aux) (/usr/local/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty (/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)) (./notes.out) (./notes.out) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd) (/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) (./notes.toc (/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/se-ascii-print.def) [1]) [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21]
Overfull \hbox (9.5646pt too wide) detected at line 779
[][]
[22] [23] [24] [25] [26] [27] (./notes.aux) )
(see the transcript file for additional information)
Output written on notes.pdf (27 pages).
SyncTeX written on notes.synctex.gz.
Transcript written on notes.log.
LaTeX Workshop Output [Required]
No output.
Developer Tools Console [Required]
[Extension Host] Error when JSON.parse theme files.
workbench.desktop.main.js:sourcemap:243 [Extension Host] Unexpected token ] in JSON at position 3948
<b>workbench.desktop.main.js:sourcemap:243 [Extension Host] TeX parse error: Illegal control sequence name for \renewcommand
t.log @ workbench.desktop.main.js:sourcemap:243</b>
$logExtensionHostMessage @ workbench.desktop.main.js:sourcemap:3494
_doInvokeHandler @ workbench.desktop.main.js:sourcemap:3505
_invokeHandler @ workbench.desktop.main.js:sourcemap:3504
_receiveRequest @ workbench.desktop.main.js:sourcemap:3503
_receiveOneMessage @ workbench.desktop.main.js:sourcemap:3502
_protocol.onMessage.e @ workbench.desktop.main.js:sourcemap:3500
fire @ workbench.desktop.main.js:sourcemap:116
fire @ workbench.desktop.main.js:sourcemap:365
_receiveMessage @ workbench.desktop.main.js:sourcemap:369
_socketDisposables.push._socketReader.onMessage.e @ workbench.desktop.main.js:sourcemap:366
fire @ workbench.desktop.main.js:sourcemap:116
acceptChunk @ workbench.desktop.main.js:sourcemap:362
_register._socket.onData.e @ workbench.desktop.main.js:sourcemap:361
t @ workbench.desktop.main.js:sourcemap:372
emit @ events.js:182
addChunk @ _stream_readable.js:283
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onStreamRead @ internal/stream_base_commons.js:94
workbench.desktop.main.js:sourcemap:243 [Extension Host] Error when JSON.parse theme files.
workbench.desktop.main.js:sourcemap:243 [Extension Host] Unexpected token ] in JSON at position 3948
workbench.desktop.main.js:sourcemap:243 [Extension Host] TeX parse error: Illegal control sequence name for \renewcommand
t.log @ workbench.desktop.main.js:sourcemap:243
$logExtensionHostMessage @ workbench.desktop.main.js:sourcemap:3494
_doInvokeHandler @ workbench.desktop.main.js:sourcemap:3505
_invokeHandler @ workbench.desktop.main.js:sourcemap:3504
_receiveRequest @ workbench.desktop.main.js:sourcemap:3503
_receiveOneMessage @ workbench.desktop.main.js:sourcemap:3502
_protocol.onMessage.e @ workbench.desktop.main.js:sourcemap:3500
fire @ workbench.desktop.main.js:sourcemap:116
fire @ workbench.desktop.main.js:sourcemap:365
_receiveMessage @ workbench.desktop.main.js:sourcemap:369
_socketDisposables.push._socketReader.onMessage.e @ workbench.desktop.main.js:sourcemap:366
fire @ workbench.desktop.main.js:sourcemap:116
acceptChunk @ workbench.desktop.main.js:sourcemap:362
_register._socket.onData.e @ workbench.desktop.main.js:sourcemap:361
t @ workbench.desktop.main.js:sourcemap:372
emit @ events.js:182
addChunk @ _stream_readable.js:283
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onStreamRead @ internal/stream_base_commons.js:94
workbench.desktop.main.js:sourcemap:243 [Extension Host] rejected promise not handled within 1 second: TeX parse error: Illegal control sequence name for \renewcommand
t.log @ workbench.desktop.main.js:sourcemap:243
$logExtensionHostMessage @ workbench.desktop.main.js:sourcemap:3494
_doInvokeHandler @ workbench.desktop.main.js:sourcemap:3505
_invokeHandler @ workbench.desktop.main.js:sourcemap:3504
_receiveRequest @ workbench.desktop.main.js:sourcemap:3503
_receiveOneMessage @ workbench.desktop.main.js:sourcemap:3502
_protocol.onMessage.e @ workbench.desktop.main.js:sourcemap:3500
fire @ workbench.desktop.main.js:sourcemap:116
fire @ workbench.desktop.main.js:sourcemap:365
_receiveMessage @ workbench.desktop.main.js:sourcemap:369
_socketDisposables.push._socketReader.onMessage.e @ workbench.desktop.main.js:sourcemap:366
fire @ workbench.desktop.main.js:sourcemap:116
acceptChunk @ workbench.desktop.main.js:sourcemap:362
_register._socket.onData.e @ workbench.desktop.main.js:sourcemap:361
t @ workbench.desktop.main.js:sourcemap:372
emit @ events.js:182
addChunk @ _stream_readable.js:283
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onStreamRead @ internal/stream_base_commons.js:94
workbench.desktop.main.js:sourcemap:1521 ERR TeX parse error: Illegal control sequence name for \renewcommand
workbench.desktop.main.js:sourcemap:243 [Extension Host] rejected promise not handled within 1 second: TeX parse error: Illegal control sequence name for \renewcommand
Screenshots


Desktop [Required]:
Are you using LaTeX Workshop with VS Code Remote?
No
Please show us log messages.

@tamuratak I update my this bug report and give my settings. Because this file is in Chinese, I need to use xelatex, but the default is latexmk.
Please paste the whole log messages. The log must begin with [XX:XX:XX] Initializing LaTeX Workshop.
Do you still see the following issue?
the file could not be saved to the disk and could not trigger the compiler to build PDF.
The following message says MathJax cannot parse LaTeX commands defined with renewcommand in your TeX file. There is nothing we can do on our side. This problem does not affect LaTeX compilation.
"TeX parse error: Illegal control sequence name for renewcommand"
@tamuratak perhaps we could have it so that if mathjax had an error, we could show "Error" instead of "Loading". What do you think?
Off topic
I am sure that it is not caused by the compiler, here is the entire log for a new tex file. @tamuratak
After testing, I found that it is a problem caused by MathJax when I use \renewcommand{\partname}{xxx}. I'll give you my test file as below.
[15:22:21] Initializing LaTeX Workshop.
[15:22:21] Creating LaTeX Workshop http and websocket server.
[15:22:21] LaTeX Workshop initialized.
[15:22:23] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:23] Root file changed from: undefined to /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex. Find all dependencies.
[15:22:23] Instantiating a new file watcher for /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:23] Creating file watcher for .bib files.
[15:22:23] Parsing /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:23] Server created on 127.0.0.1:49949
[15:22:23] Adding /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex to file watcher.
[15:22:23] Snippet data loaded.
[15:22:23] VIEW command invoked with mode: file:///Users/frank/Documents/%E5%AD%A6%E4%B9%A0%E5%B7%A5%E4%BD%9C/%E7%A0%94%E7%A9%B6%E7%94%9F/%E7%BB%9F%E8%AE%A1%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/englishtest.tex.
[15:22:23] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:23] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:22:23] Serving PDF file at http://localhost:49949/viewer.html?file=pdf..JTJGVXNlcnMlMkZmcmFuayUyRkRvY3VtZW50cyUyRiVFNSVBRCVBNiVFNCVCOSVBMCVFNSVCNyVBNSVFNCVCRCU5QyUyRiVFNyVBMCU5NCVFNyVBOSVCNiVFNyU5NCU5RiUyRiVFNyVCQiU5RiVFOCVBRSVBMSVFNiU5QyVCQSVFNSU5OSVBOCVFNSVBRCVBNiVFNCVCOSVBMCUyRmVuZ2xpc2h0ZXN0LnBkZg
[15:22:23] The encoded path is /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:22:23] Open PDF tab for /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:22:23] LaTeX Workshop version: 8.2.0
[15:22:24] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:24] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:22:24] Handle data type: open
[15:22:24] Preview PDF file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:22:24] Handle data type: loaded
[15:22:26] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:26] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:22:27] Parsing /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:27] File watcher: responding to change in /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:27] /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex changed. Auto build project.
[15:22:27] BUILD command invoked.
[15:22:27] Building root file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:27] Build root file /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:22:27] Recipe step 1: xelatex, -synctex=1,-interaction=nonstopmode,-file-line-error,/Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest
[15:22:27] LaTeX build process spawned. PID: 7673.
[15:22:28] LaTeX log parsed with 0 messages.
[15:22:28] Recipe of length 1 finished. PID: 7673.
[15:22:28] Successfully built /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:22:28] Refresh PDF viewer for /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:22:28] Handle data type: position
[15:22:28] Preview PDF file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:22:28] Handle data type: loaded
[15:23:28] Found root file from active editor: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:23:28] Root file remains unchanged from: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:23:30] Parsing /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:23:30] File watcher: responding to change in /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:23:30] /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex changed. Auto build project.
[15:23:30] BUILD command invoked.
[15:23:30] Building root file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:23:30] Build root file /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex
[15:23:30] Recipe step 1: xelatex, -synctex=1,-interaction=nonstopmode,-file-line-error,/Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest
[15:23:30] LaTeX build process spawned. PID: 7677.
[15:23:31] LaTeX log parsed with 0 messages.
[15:23:31] Recipe of length 1 finished. PID: 7677.
[15:23:31] Successfully built /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.tex.
[15:23:31] Refresh PDF viewer for /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:23:31] Handle data type: position
[15:23:31] Preview PDF file: /Users/frank/Documents/å¦ä¹ 工作/ç ”ç©¶ç”Ÿ/统计机器å¦ä¹ /englishtest.pdf
[15:23:31] Handle data type: loaded
Test File:
\documentclass[a4paper, 12pt]{article}
\usepackage{amsmath}
\renewcommand{\contentsname}{Contents}
\renewcommand{\figurename}{Fig}
\renewcommand{\tablename}{Table}
\renewcommand{\partname}{xxx}
\renewcommand{\thepart}{The \arabic{part}}
\renewcommand{\listfigurename}{Figures}
\renewcommand{\listtablename}{Tables}
\renewcommand{\refname}{Refs}
\renewcommand{\appendixname}{Appendix}
\renewcommand{\indexname}{Indexing}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\title{Test}
\author{Zhipeng Zou}
\begin{document}
\tableofcontents
\maketitle
\part{}
\section{One}
This is a equation: $\mathbf{A} \times \mathbf{B}$
This is block one:
$$
\sum_{i=1}^n y^i\log \hat{y}^i
$$
As this is a inline equation $\sigma(x) = \frac{1}{1 + e^{-x}}$, so that, we can reproduce this problem.
\end{document}
When there is the statement \renewcommand{\partname}{xxx}, the problem could be reproduced. If I toggled that statement, it works normally. It can be tracked in the developer tools of the VSCode.
If there is the statement `,[Extension Host] TeX parse error: Illegal control sequence name for renewcommand` will be thrown when the cursor hovers.

If I toggle that, the logs of the developer tools is ok.
Please answer yes or no. Do you still see the following issue?
the file could not be saved to the disk and could not trigger the compiler to build PDF.
If yes, please show us the whole log when the error occurred. And, tell us where in the log the error occurred.
OK, fine. The problem you focus on occurs sometimes, but now it can be saved and compile.
If the compilation problem occurs again, feel free to reopen this issue.
I encountered this problem recently. Actually it can be perfectly solved by adding "latex-workshop.hover.preview.newcommand.parseTeXFile.enabled": false in setting.json or unchecking Latex-workshop>Hover>Preview>Newcommand>Parse TeXFile: Enable. Hope this can help you.
Please open a new issue filling out all the information required in the issue template if you see a similar problem.
Most helpful comment
I encountered this problem recently. Actually it can be perfectly solved by adding
"latex-workshop.hover.preview.newcommand.parseTeXFile.enabled": falseinsetting.jsonor uncheckingLatex-workshop>Hover>Preview>Newcommand>Parse TeXFile: Enable. Hope this can help you.