vscode设置latex

vscode配置latex

1.安装vscode,并添加环境变量路径

2.安装latex,bin文件夹添加到环境变量路径

3.vscode安装插件

4.vscode->文件->首选项->显示配置内容->setting.json文件,查看其位置目录,通过我的电脑找到此文件(不要使用vscode修改,因为vscode无权限,会导致修改失败)

5.setting.json通过记事本打开,覆写文件内容

记得修改位置
"latex-workshop.view.pdf.external.viewer.command":"D:\\Program Files\\SumatraPDF\\SumatraPDF.exe",

"\"D:/Program Files/vscode/Microsoft VS Code/Code.exe\" \"D:/Program Files/vscode/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"",
    "%PDF%"

以下进行复制

python 复制代码
{
    "latex-workshop.hover.preview.enabled":true,
    "latex-workshop.hover.preview.scale":0.8,
    "latex-workshop.latex.autoBuild.run": "onFileChange",
    "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.autoClean.run": "onFailed",
    "latex-workshop.latex.recipe.default": "lastUsed",
    //"latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    "editor.minimap.enabled": true, //控制是否显示缩略图。
    "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": "(bib-chain)xelatex -> bibtex -> xelatex -> xelatex",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "(bib-chain)pdflatex -> bibtex -> pdflatex -> pdflatex",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
    ],

    "latex-workshop.view.pdf.viewer": "external",

    "latex-workshop.view.pdf.external.viewer.command":"D:\\Program Files\\SumatraPDF\\SumatraPDF.exe",
    "latex-workshop.view.pdf.external.viewer.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "-reuse-instance",
    "-inverse-search",
    "\"D:/Program Files/vscode/Microsoft VS Code/Code.exe\" \"D:/Program Files/vscode/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"",
    "%PDF%"
      ],
    "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",
        "*.synctex.gz"
        "*.gz"
        "*.aux"
    ],
}

运行过程中可能会出现perl缺失,但是不影响使用(一些附属文件无法自动删除),安装后把perl安装目录设置为环境变量路径。

相关推荐
叶羽西8 小时前
Android Studio打开一个外部的Android app程序
android·ide·android studio
向宇it13 小时前
【从零开始入门unity游戏开发之——unity篇02】unity6基础入门——软件下载安装、Unity Hub配置、安装unity编辑器、许可证管理
开发语言·unity·c#·编辑器·游戏引擎
徐小夕@趣谈前端13 小时前
可视化大屏编辑器, 开源!
编辑器
天天进步201513 小时前
TipTap编辑器:现代化的富文本编辑解决方案
编辑器
odng15 小时前
IDEA自己常用的几个快捷方式(自己的习惯)
java·ide·intellij-idea
o(╥﹏╥)15 小时前
在 Ubuntu 上安装 VS Code
linux·运维·vscode·ubuntu·vs
18号房客16 小时前
macOS开发环境配置与应用开发教程(一)
vscode·macos·visualstudio·eclipse·intellij-idea·phpstorm·visual studio
weixin_4231961717 小时前
VSCode+WSL作为IDE开发和管理深度学习项目
ide·vscode·编辑器
乐闻x18 小时前
VSCode 插件开发实战(八):创建和管理任务 Task
ide·vscode·编辑器
神洛华20 小时前
Y3地图制作1:水果缤纷乐、密室逃脱
编辑器·游戏引擎·游戏程序