Jupyter Latex+VScode json配置

{
    //何时构建 LaTeX 项目 onFileChange:文件更改时编译文件 onSave:保存代码时自动编译文件 never:从不自动编译)
    "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,
    //recipes编译链中使用的编译命令  
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "%DOCFILE%"
            ]
        },
        {
            "name": "latexmkrc",
            "command": "latexmkrc",
            "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "%DOCFILE%"
            ]
        },
        {
            "name": "lualatex",
            "command": "lualatex",
            "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "%DOCFILE%"
            ]
        },
        {
            "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%"
            ]
        }
    ],
    //配方,编译顺序在左侧LaTex中可以看到
    "latex-workshop.latex.recipes": [ 
        {
            "name": "latexmk",
            "tools": [
            "latexmk"
            ]
        },
        {
            "name": "latexmk(latexmkrc)",
            "tools": [
            "latexmkrc"
            ]
        },
        {
            "name": "latexmk(luatex)",
            "tools": [
            "lualatex"
            ]
        },
        {
            "name": "xelatex",
            "tools": [
            "xelatex"
            ]
        },
        {
            "name": "bibtex",
            "tools": [
            "bibtex"
            ]
        },
        {
            "name": "pdf->bib->pdf->pdf",
            "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
            ]
        },
        {
            "name": "xe->bib->xe->xe",
            "tools": [
            "xelatex",
            "bibtex",
            "xelatex",
            "xelatex"
            ]
        },
        {
            "name": "pdflatex",
            "tools": [
            "pdflatex"
            ]
        }
        
    ],

    //何时删除中间过程文件 onBuilt:编译时清除过程文件;onFailed:当编译失败时,清除辅助文件:never:不清除过程文件。
    "latex-workshop.latex.autoClean.run": "onBuilt",
    //默认编译顺序 first:使用latex-workshop.latex.recipes中的第一条编译链,lastUsed:使用最近的一次编译所用的编译链
    "latex-workshop.latex.recipe.default": "lastUsed",
    //反向同步快捷键绑定 ctrl-click: 为默认选项,使用Ctrl/cmd+鼠标左键单击;double-click : 使用鼠标左键双击
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    //查看LaTexPDF tab: 在VSCode标签;browser: 在网络浏览器;external: 在外部查看器
    "latex-workshop.view.pdf.viewer": "external", 
    //PDF 参考文献查看 auto : 自动;tabOrBrowser : vscode内置pdf查看器或默认浏览器;external : 外部pdf查看器。
    "latex-workshop.view.pdf.ref.viewer":"external", 
    //指定了用于查看 PDF 的外部查看器的命令的相关路径
    "latex-workshop.view.pdf.external.viewer.command": "C:/App/SumatraPDF/SumatraPDF.exe",
    //latex-workshop.view.pdf.external.view .command的参数  %PDF%是用于生成PDF文件的绝对路径的占位符
    "latex-workshop.view.pdf.external.viewer.args": [
    "%PDF%"
    ],
    //指定在使用外部 PDF 查看器时,触发 SyncTeX(同步预览)功能的命令的相关路径
    "latex-workshop.view.pdf.external.synctex.command":"C:/App/SumatraPDF/SumatraPDF.exe", //定位
    //指定在使用外部 PDF 查看器进行 SyncTeX(同步预览)操作时的参数
    "latex-workshop.view.pdf.external.synctex.args":[
    "-forward-search",//执行正向搜索操作
    "%TEX%",//触发syncTeX时,扩展名为.tex的LaTeX文件路径
    "%LINE%",//源文件中的行号信息
    "-reuse-instance",//表示复用外部 PDF 查看器的实例,避免每次都启动新的实例,提高效率。
    "-inverse-search",//执行反向搜索操作
    "\"C:/App/Microsoft VS Code/Code.exe\" \"C:/App/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 定位到VScode所在的.exe文件
    "%PDF%"//在触发SyncTeX时,会被替换为生成的PDF文件路径
    ]
}
posted @ 2024-11-20 19:42  被放养的研究生  阅读(4)  评论(0编辑  收藏  举报