json 为什么`latex-workshop`扩展名忽略清理文件扩展名?

iyr7buue  于 2023-10-21  发布在  其他
关注(0)|答案(1)|浏览(169)

我正在使用Latex Workshop扩展(https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)使用VS Code在Mac OS上编辑Tex文件。此扩展的一个有用功能是清理中间文件。理想情况下,我希望只保留tex文件和编译生成的pdf。
扩展支持VS代码中的给定设置,理论上允许用户选择在清除命令时删除哪些扩展。我当前的settings.json文件看起来像这样(我相信只有结尾是相关的):

{
    "r.rpath.mac": "/Users/raul/miniconda3/envs/disagreement/lib/R/bin/R",
    "r.rterm.mac": "/Users/raul/miniconda3/envs/disagreement/bin/radian",
    "r.bracketedPaste": true,
    "r.rterm.option": [],
    "workbench.editorAssociations": {
        "*.pdf": "pdf.preview"
    },
    "python.defaultInterpreterPath": "/Users/raul/miniconda3/bin/python",
    "notebook.lineNumbers": "on",
    "python.terminal.launchArgs": [
        "-m",
        "IPython",
        "--no-autoindent",
        ],
    "python.terminal.executeInFileDir": true,
    "[python]": {
        "editor.defaultFormatter": "ms-python.python",
        "editor.formatOnType": true
    },
    "editor.minimap.enabled": false,
    "jupyter.interactiveWindow.textEditor.executeSelection": true,
    "git.ignoreLegacyWarning": true,
    "quarto.render.renderOnSave": true,
    "cSpell.enableFiletypes": [
        "quarto"
    ],
    "cSpell.userWords": [
        "matplotlib"
    ],
    "workbench.colorTheme": "Atom One Light",
    "cSpell.enabled": false,
    "latex-workshop.latex.clean.fileTypes": [
        "%DOCFILE%.aux",
        "%DOCFILE%.bbl",
        "%DOCFILE%.blg",
        "%DOCFILE%.idx",
        "%DOCFILE%.ind",
        "%DOCFILE%.lof",
        "%DOCFILE%.lot",
        "%DOCFILE%.out",
        "%DOCFILE%.toc",
        "%DOCFILE%.acn",
        "%DOCFILE%.acr",
        "%DOCFILE%.alg",
        "%DOCFILE%.glg",
        "%DOCFILE%.glo",
        "%DOCFILE%.gls",
        "%DOCFILE%.fls",
        "%DOCFILE%.log",
        "%DOCFILE%.fdb_latexmk",
        "%DOCFILE%.snm",
        "%DOCFILE%.synctex(busy)",
        "%DOCFILE%.synctex.gz(busy)",
        "%DOCFILE%.nav",
        "%DOCFILE%.vrb",
        "*/*.nav",
        "%DOCFILE%.synctex.gz"
    ],
    "latex-workshop.latex.clean.subfolder.enabled": true
}

例如,请注意我是如何在选项中包含“*.nav”的。但如果我尝试编译一个给定的文件,然后清理辅助文件,我仍然得到“.nav”文件:

有人知道发生什么事了吗

mwngjboj

mwngjboj1#

要将LaTeX Workshop扩展配置为使用latex-workshop.latex.clean.fileTypes选项,必须指定要与以下命令一起使用的方法:

"latex-workshop.latex.clean.method": "glob",

您的扩展可能使用了cleanMethodlatexmk选项。

**提示:**使用设置"latex-workshop.latex.autoClean.run": "onBuilt",,每次构建时自动清理它们。

相关问题