"latex-workshop.view.pdf.viewer": "tab",
// Latex workshop
"latex-workshop.latex.recipes": [
{
"name": "texify", //放在最前面为默认编译方案, 适用于MikTex
"tools": [
"texify"
]
},
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "texify",
"command": "texify",
"args": [
"--synctex",
"--pdf",
"--tex-option=\"-interaction=nonstopmode\"",
"--tex-option=\"-file-line-error\"",
"%DOC%.tex"
]
},
{
// 编译工具和命令
"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",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.autoClean.run": "onBuilt",
"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",
],
"languageTool.language": "en",
"editor.wordWrap": "on",
"editor.renderIndentGuides": false,
"workbench.colorTheme": "One Monokai",
配置 git 的用户名和密码:
git config --global user.name xxx
git config --global user.email xxx@xx.com
注意:Latex 自动换行需要设置
打开设置,切换json视图,添加如下语句
editor.wordWrap: true;
扩展阅读:
LaTeX is a type-setting language. Unlike Microsoft Word, it isn’t a WYSIWYG, it is a markup language where labels in the file define formatting and style. LaTeX is a particular favourite of mathematicians and physicists, because complex equations can be easily and precisely represented. It is based on TeX, from Donald Knuth, and the first version was written by Leslie Lamport in 1985.
A tex file contains the words you want to put in the final output along with some tags to say what kind of text it is, e.g. an equation, title or bullet point. Many publishers offer an sty file containing style information that you just need to put into the same folder as your tex file when you compile. You can compile the tex file to create a beautifully formatted PDF, many LaTeX editors have a single button to do this.

The text on the left is used to generate the PDF file on the right. Text tags (in red and blue) contain all the instructions for formatting.
Why use LaTeX?
Here are a few reasons authors choose to write in LaTeX:
- It’s quicker than a word processor if there are lots of equations
- Formatting takes care of itself
- References can easily be rendered in different styles (using BibTeX)
- It’s free and open source
- LaTeX is a standard software in many disciplines
There are some things that become more difficult with LaTeX, but very few that can’t be overcome:
- There is a learning curve, but once you’ve mastered a few commands it becomes much easier, and there are lots of online help guides and templates. A good editor will have common functions in menus and icons.
- Custom formatting can be tricky. Almost anything is possible, but some changes are easier to implement than others.
- Once you start writing in LaTeX, you can’t easily switch to a word processor: your colleagues also need to use LaTeX, or you can send them a PDF to annotate.
Learning LaTeX
There are many LaTeX tools, website and forums, including for absolute beginners. Here are a few that can help you get started:
- https://latex-project.org/guides/
- https://www.overleaf.com/tutorial
- https://tobi.oetiker.ch/lshort/lshort.pdf