赞
踩
VSCode中F1打开设置,首选项:打开工作区设置
{ // 配置latex "editor.minimap.enabled": true, //控制是否显示缩略图。 //1: 准备编译工具。 "latex-workshop.latex.tools": [ { "name": "xelatex", "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOCFILE%" ] }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOCFILE%" ] }, { "name": "bibtex", "command": "bibtex", "args": [ "%DOCFILE%" ] } ], //2: 设置编译命令。 "latex-workshop.latex.recipes": [ { "name": "xelatex", "tools": [ "xelatex" ] }, { "name": "pdflatex", "tools": [ "pdflatex" ] }, { "name": "bibtex", "tools": [ "bibtex" ] }, { "name": "pdflatex -> bibtex -> pdflatex*2", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] }, { "name": "xelatex -> bibtex -> xelatex*2", "tools": [ "xelatex", "bibtex", "xelatex", "xelatex" ] } ], //3:设置使用 SumatraPDF 预览编译好的PDF文件,需要修改SumatraPDF.exe和Code.exe的路径 "latex-workshop.view.pdf.viewer": "tab", //"external",//"tab", 说明:“tab”表示在窗口内显示,“external”表示在外部显示。 "latex-workshop.view.pdf.ref.viewer": "auto", // PDF查看器用于在\ref上的[View on PDF]链接 "latex-workshop.view.pdf.external.viewer.command": "D:/Program Files/Tools/SumatraPDF/SumatraPDF.exe", // 注意修改路径 "latex-workshop.view.pdf.external.viewer.args": [ "-forward-search", "%TEX%", "%LINE%", "-reuse-instance", "-inverse-search", "\"D:/Program Files/Dev Tools/Microsoft VS Code/Code.exe\" \"D:/Program Files/Dev Tools/Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"", "%PDF%" ], //4: 配置正向和反向搜索,需要修改vscode的路径,反向搜索只能在vscode中执行。 "latex-workshop.view.pdf.external.synctex.command": "D:/Program Files/Tools/SumatraPDF/SumatraPDF.exe", // 注意修改路径 "latex-workshop.view.pdf.external.synctex.args": [ "-forward-search", "%TEX%", "%LINE%", "-reuse-instance", "-inverse-search", "\"D:/Program Files/Dev Tools/Microsoft VS Code/Code.exe\"\" \"D:/Program Files/Dev Tools/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径 "%PDF%" ], // 6:快捷键设置 // { // "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" // }, //5: 设置删除辅助文件的命令 "latex-workshop.latex.clean.enabled": true, "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", //默认编译链,first、lastUsed "latex-workshop.latex.autoBuild.run": "onSave", //自动编译tex文件,onFileChange、onSave、never "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击 "latex-workshop.message.error.show": false, //显示错误(弹窗) "latex-workshop.message.warning.show": false, //显示警告(弹窗) //6: 其他设置 "latex-workshop.showContextMenu": true, //右键菜单,(1)编译文件;(2)定位游标 "latex-workshop.intellisense.package.enabled": true, //从使用的包中自动补全命令和环境 "git.autofetch": true, //若设置为 true,则自动从当前 Git 存储库的默认远程库提取提交;若设置为“全部”,则从所有远程库进行提取。 "security.workspace.trust.untrustedFiles": "open", //始终信任工作区 "vsicons.dontShowNewVersionMessage": true, //不显示新版本消息 //针对某种语言,配置替代编辑器设置 "[latex]": { "editor.formatOnPaste": false, //针对某种语言,配置替代编辑器设置 "editor.suggestSelection": "recentlyUsedByPrefix" //控制在建议列表中如何预先选择建议。recentlyUsedByPrefix: 根据之前补全过的建议的前缀来进行选择。例如,co -> console、con -> const。 }, "code-runner.clearPreviousOutput": true, "code-runner.saveAllFilesBeforeRun": true, "code-runner.runInTerminal": true, "json.schemas": [], //"workbench.colorTheme": "Solarized Dark", }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。