当前位置:网站首页>Vscode installation, latex environment, parameter configuration, common problem solving
Vscode installation, latex environment, parameter configuration, common problem solving
2022-07-02 06:41:00 【Dull as dull】
1 Get ready Texlive Installation package
You can download it from the following website texlive The image file of :
The approximate document composition in the website

The file composition we need after downloading ( I am a 2020 Downloaded in , Don't download again this time )

Unzip the image file
2 install Texlive
Right click install-tl-windows.bat, Click Run as administrator , Enter the installation interface .

Click on the bottom left corner “Advanced” Go to advanced installation to cancel macro packages that you don't need to install .

Click on “Customize” To uncheck unnecessary macro packages .

Just unchecking the non Chinese and English language packs can eliminate 1G Space , If it's too troublesome to install it all .

At the bottom right corner of the installation interface, you can choose whether to install TeXworks Editor , I think now that I have read this article , Then this should be ok . After setting the installation path and other options, click “ install ”, Then sit still 20 minute - 3 Wait for hours for the installation to complete .


3 install VSCODE plug-in unit
Search in the expansion bar Latex workshop Installation

After installation , Open any one tex Source file , You can see , The code has been highlighted , At the same time, there are tex Mark of

4 Add settings file
Press down F1 Select this to open the settings file

"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
{
"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%"
]
},
{
"name": "bibtex",
"command": "bibtex",
// "command": "biber",
"args": [
// "%DOC%"
"%DOCFILE%"
]
}
],
"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"
]
}
],
// Set the file format to be deleted after compilation
"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"
],
// Cancel annoying bubbles when compilation errors
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.showContextMenu": true, // add to LaTex Workshop Right-click menu .
"latex-workshop.intellisense.package.enabled": true, // According to the loaded package , Autocomplete command or package .
"latex-workshop.latex.autoBuild.run": "onSave", // Automatically when saving files build( in other words , Click save file or press shortcut key Ctrl+S When , In addition to preserving Tex file , It will also help you compile LaTex by Pdf.
Pay attention to the original {} middle
4.1 Explain the function of the menu bar and these parameters
| Parameters | meaning |
|---|---|
"latex-workshop.latex.tools" | Compile tool options , That is, we are above Build LaTex project From the drop-down menu , As long as you configure tools , It will be added to the drop-down menu for us to choose . |
"latex-workshop.latex.recipes" | Configure each compiled microenvironment , Have use xelatex Of , They have also used pdflatex Of , or xe->bib->xe->xe Compiled multiple times in succession ( The purpose of multiple compilation is to generate references , This is a bibtex It's decided by the nature of ).( You can take bib Of Recipe Put it first , Can be used as the default Recipe Compile the , It's OK, but because of the number of compilations , The speed will be slow ;) |
"latex-workshop.latex.clean.fileType" | Set the file format to be deleted after compilation |
"latex-workshop.view.pdf.viewer“ | Set default pdf reader |
In the compilation tool latexmk and xelatex These are both latex compiler , The latter can be compiled in Chinese .

5 The effect after compilation
restart vscode Compile after , The effect of placing in the browser

6 List of some problems
6.1 It still cannot be compiled successfully after the above settings
Report errors Recipe terminated with fatal error: spawn xelatex ENOENT
6.2 The problem of compiling Chinese The problem of compiling under the Chinese path
6.3 The font size command \normalsize is not defined
6.4 I found no \citation & \bibstyle & \bibdata commands &
Latex Compiler error I found no \bibstyle command_ Dull like dull blog -CSDN Blog
6.5 LaTeX Warning: Citation “*****” on page y undefined on input line *
6.6 Some advanced settings
- Shortcut keys and external PDF browser
To configure VS Code For you LaTex Editor - You know
- External location PDF Reverse search forward search
Use VSCode To write LaTeX - You know
- Common shortcut key
LaTeX+VSCode Environment configuration | sirlis
reference
边栏推荐
- There are multiple good constructors and room will problem
- Eggjs -typeorm treeenity practice
- Log (common log framework)
- Présence d'une panne de courant anormale; Problème de gestion de la fsck d'exécution résolu
- unittest.TextTestRunner不生成txt测试报告
- Introduce two automatic code generators to help improve work efficiency
- Redis——缓存击穿、穿透、雪崩
- web自动中利用win32上传附件
- 广告业务Bug复盘总结
- Summary of advertisement business bug replay
猜你喜欢
随机推荐
默认google浏览器打不开链接(点击超链接没有反应)
华为MindSpore开源实习机试题
Win10网络图标消失,网络图标变成灰色,打开网络设置闪退等问题解决
Find the highest value of the current element Z-index of the page
Learn about various joins in SQL and their differences
Solution to the black screen of win computer screenshot
日志 - 7 - 记录一次丢失文件(A4纸)的重大失误
Unexpected inconsistency caused by abnormal power failure; Run fsck manually problem resolved
广告业务Bug复盘总结
Data science [9]: SVD (2)
Flask migrate cannot detect db String() equal length change
Pytest (3) parameterize
Sparse array (nonlinear structure)
FE - weex 开发 之 使用 weex-ui 组件与配置使用
FE - 微信小程序 - 蓝牙 BLE 开发调研与使用
Warp matrix functions in CUDA
Eggjs -typeorm 之 TreeEntity 实战
CUDA and Direct3D consistency
FE - Eggjs 结合 Typeorm 出现连接不了数据库
Automation - when Jenkins pipline executes the nodejs command, it prompts node: command not found






