要毕业了,闲下点时间写的东西。之前一直收益与师兄师姐流传下来的latex版本,用起来很舒服,希望后面的学弟学妹也能完美用上。latex功能很强大,不需要自己排版,只管内容即可,但是安装流程会多一丢丢。
软件套装:TexLive()+Visual Studio Code(软件安装顺序不要错,先texlive,如果之前先安装了VScode,可以先卸载一下)
国内源下载:华为云Texlive下载;阿里云Texlive下载
下载种类:直接下载带年份.iso的即可,例如texlive2023.iso
安装方式:傻瓜式安装,先下载,然后管理员方式运行批处理文件:install-tl-windows.bat
修改安装位置点击安装
然后进入漫长的安装环节,一般半个小时到一个小时之间。
1)软件安装,从官网上下载:VScode官网
2)插件的安装:在扩展商店安装 必要插件:LaTeX Workshop;Chinese (Simplified) (简体中文)
3)文件的配置:在 VSCode 界面下按下 F1,然后键入“setjson”,点击“首选项: 打开设置(JSON)”,替换里面全部的内容如下(把里面原有的内容全删了)
{
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.showContextMenu": true,
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "XeLaTeX",
"tools": [
"xelatex"
]
},
{
"name": "PDFLaTeX",
"tools": [
"pdflatex"
]
},
{
"name": "BibTeX",
"tools": [
"bibtex"
]
},
{
"name": "LaTeXmk",
"tools": [
"latexmk"
]
},
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
],
"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"
],
"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
"latex-workshop.message.update.show": false,
"ltex.language": "en-US",
"ltex.enabled": ["latex"],
"ltex.dictionary": {},
"ltex.latex.commands": {
"\\ref{}": "ignore",
"\\documentclass[]{}": "ignore",
"\\cite{}": "dummy",
"\\cite[]{}": "dummy"
},
"ltex.latex.environments": {
"lstlisting": "ignore",
"verbatim": "ignore"
},
"ltex.markdown.nodes": {
"CodeBlock": "ignore",
"FencedCodeBlock": "ignore",
"AutoLink": "dummy",
"Code": "dummy"
},
"ltex.additionalRules.enablePickyRules": true,
"ltex.additionalRules.motherTongue": "en-US",
"ltex.diagnosticSeverity": "information",
"ltex.ltex-ls.logLevel": "finer",
"ltex.sentenceCacheSize": 2000,
"editor.wordWrap": "on",
"files.autoSave": "afterDelay",
"security.workspace.trust.untrustedFiles": "open",
"editor.unicodeHighlight.ambiguousCharacters": false,
"workbench.colorTheme": "Theme (Italic)"
}
目前知乎上已经有人把安装方法写清楚了,我这边只是结合自己使用简要描述了一下:VSCode使用latex
4)软件的使用
(1)首先通过软件打开模板的文件夹
(2)下载LaTeX Workshop插件后,左侧会出现一个Tex标识,如下图标1所示,点击Tex(注意:如果安装了插件还是没有显示,则可以任意打开一个tex文件就会出现)
(3)点击commands列表中导数第二个绿色按钮,即Recipe:xelatex -> bibtex -> xelatex*2,如下图标2所示
(4)如果运行成功,则屏幕下蓝色栏会出现打钩字样
(5)再次点击下图标号3的:View Latex PDF,即可在屏幕左侧出现pdf文档!
我使用的是之前学长们,前辈们使用的文档,经过几代人更新,目前这一套版本符合2023年硕士和博士毕业论文模板的要求,具体使用方法如下:
1)文件夹content:存在主体内容的,包含各部分(正文,摘要,致谢等内容)
2)文件夹images:可以分章节存放图片,然后很方便进行在文中引用
3) 模板布局文件csuthesis_main.tex:文章存在那几部分,是否需要,例如是否需要附录,在这里面进行说明
3) thesis-references.bib:参考文献的bib格式,在我们下载文章的时候,有引用方式的导出,选择bib文件形式!