LaTeX Vscode 配置
安装:https://www.latexstudio.net/archives/51801.html
LaTeX 安装 & 宏包升级 & 入门:https://blog.csdn.net/Rank_fxl/article/details/113510466?spm=1001.2014.3001.5502
使用VSCode编写LaTeX:https://zhuanlan.zhihu.com/p/38178015
Visual Studio Code (vscode)配置LaTeX:https://zhuanlan.zhihu.com/p/166523064
RGB颜色:http://www.wahart.com.hk/rgb.htm
adobe-fonts(清华源):https://mirrors.tuna.tsinghua.edu.cn/adobe-fonts/
控制字体系列
// 控制字体系列。
"editor.fontFamily": "JetBrains Mono, 'Courier New', monospace",
"editor.lineHeight": 22,
"editor.fontSize": 13,
设定清理文件的类型
"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",
"*.nav",
"*.snm",
"*.synctex.gz"
],
键盘快捷方式配置
{
"key": "alt+s",
"command": "latex-workshop.synctex",
"when": "editorTextFocus && !isMac"
},
{
"key": "alt+b",
"command": "latex-workshop.build",
"when": "editorTextFocus && !isMac"
},
{
"key": "alt+t",
"command": "latex-workshop.kill",
"when": "editorTextFocus && !isMac"
},
{
"key": "alt+e",
"command": "latex-workshop.recipes"
},
SumatraPDF
"D:/APP/VScode/Microsoft VS Code/Code.exe" "D:/APP/VScode/Microsoft VS Code/resources/app/out/cli.js" -gr "%f":"%l"
添加头部注释
// 头部注释,默认设置:{'Author':'your name','Date':'Do not edit','LastEditors':'your name','LastEditTime':'Do not edit','Description':'file content'}
"fileheader.customMade": {
"Description":"",
"Version":"1.0",
"Author":"RankFan",
"Date":"Do not edit",
"LastEditors":"RankFan",
"LastEditTime":"Do not edit",
"FilePath":"Do not edit",
"Email": "1917703489@qq.com",
"custom_string_obkoro1_copyright": "Copyright (C) ${now_year} RankFan. All rights reserved.",
},
// 在光标处插入函数注释,默认配置:{'description':'','param':'','return':''}
"fileheader.cursorMode": {
"description":"",
"param":"",
"return":"",
},
"fileheader.configObj": {
// "moveCursor":true,
// "createHeader":true,
"wideSame":false,
"wideNum":13,
"autoAdd":true,
"autoAlready":true,
"createFileTime": true,
"language": {
"tex": {
"head": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
"middle": " %%%%%%%% @",
"end": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
}
}
},
LaTeX配置
{// LaTeX
"workbench.colorTheme": "Visual Studio Dark",
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.latex.tools": [
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "xelatex-with-shell-escape",
"command": "xelatex",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "xelatex-latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-xelatex",
"-outdir=%OUTDIR%",
"%DOC%"
]
},
{
"name": "xelatex-latexmk-with-shell-escape",
"command": "latexmk",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-xelatex",
"-outdir=%OUTDIR%",
"%DOC%"
]
},
{
"name": "pdflatex-with-shell-escape",
"command": "pdflatex",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "pdflatex-latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOC%"
]
},
{
"name": "pdflatex-latexmk-with-shell-escape",
"command": "latexmk",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOC%"
]
},
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
},
],
"latex-workshop.latex.recipes": [
{
"name": "XeLaTeX",
"tools": [
"xelatex"
]
},
{
"name": "XeLaTeX Auto",
"tools": [
"xelatex-latexmk"
]
},
{
"name": "PDFLaTeX",
"tools": [
"pdflatex"
]
},
{
"name": "PDFLaTeX with Shell Escape",
"tools": [
"pdflatex-with-shell-escape"
]
},
{
"name": "PDFLaTeX Auto",
"tools": [
"pdflatex-latexmk"
]
},
{
"name": "PDFLaTeX Auto with Shell Escape",
"tools": [
"pdflatex-latexmk-with-shell-escape"
]
},
{
"name": "XeLaTeX with Shell Escape",
"tools": [
"xelatex-with-shell-escape"
]
},
{
"name": "XeLaTeX Auto with Shell Escape",
"tools": [
"xelatex-latexmk-with-shell-escape"
]
},
{
"name": "PDFLaTeX -> BibTeX -> PDFLaTeX*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
},
{
"name": "XeLaTeX -> BibTeX -> XeLaTeX*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "BibTeX",
"tools": [
"bibtex"
]
},
],
//文件清理。此属性必须是字符串数组
"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"
],
//设置为onFaild 在构建失败后清除辅助文件
"latex-workshop.latex.autoClean.run": "onFailed",
// 使用上次的recipe编译组合
"latex-workshop.latex.recipe.default": "lastUsed",
// 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
// PDF查看器用于在\ref上的[View on PDF]链接
"latex-workshop.view.pdf.ref.viewer":"auto",
"latex-workshop.view.pdf.viewer": "external",
// 使用外部查看器时,latex-workshop.view.pdf.external.view .command的参数。此功能不受官方支持。%PDF%是用于生成PDF文件的绝对路径的占位符。
// "latex-workshop.view.pdf.external.viewer.args": [
// "%PDF%"
// ],
"latex-workshop.view.pdf.external.viewer.command": "D:/APP/SuMenDa_PDF/SumatraPDF/SumatraPDF.exe",
"latex-workshop.view.pdf.external.viewer.args": [
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
"-inverse-search",
"\"D:/APP/VScode/Microsoft VS Code/Code.exe\" \"D:/APP/VScode/Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
"%PDF%"
],
"latex-workshop.view.pdf.external.synctex.command": "D:/APP/SuMenDa_PDF/SumatraPDF/SumatraPDF.exe",
"latex-workshop.view.pdf.external.synctex.args": [
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
"-inverse-search",
"\"D:/APP/VScode/Microsoft VS Code/Code.exe\" \"D:/APP/VScode/Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
"%PDF%",
],
}