vs code + latex使用攻略

1.环境配置

latex使用texlive,安装完成texlive后,在系统环境变量中添加texlive路径,并在vs code里加入json字段。同时,为了方便使用,在vs code里添加latex workshope插件,可以看到目录,以及添加公式和特殊符号。

python 复制代码
    "latex-workshop.latex.tools": [
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "biber",
            "command": "biber",
            "args": [
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "XeLaTeX + Biber (推荐)",
            "tools": [
                "xelatex",
                "biber",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "XeLaTeX 单次编译",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "PDFLaTeX + BibTeX",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "PDFLaTeX 单次编译",
            "tools": [
                "pdflatex"
            ]
        }
    ],
    "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",
        "*.run.xml"  // 新增Biber生成的辅助文件
    ],
    "latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.latex.autoBuild.run": "onSave",  // 改为保存时自动编译(减少频繁编译)
    "latex-workshop.showContextMenu": true,
    "latex-workshop.message.error.show": true,  // 恢复错误提示(便于排查问题)
    "latex-workshop.message.warning.show": true,  // 恢复警告提示(便于排查问题)
    "latex-workshop.intellisense.package.enabled": true,
    "latex-workshop.latex.autoClean.run": "onSuccessfulBuild",  // 编译成功后自动清理辅助文件
    "latex-workshop.latex.recipe.default": "XeLaTeX + Biber (推荐)",  // 默认使用XeLaTeX+Biber编译
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    "latex-workshop.latex.compile.trigger": "onSave"  // 明确编译触发时机为保存

2.使用攻略

2.1 latex换行:

1.换行(三个方法)

\newline

另起一段是空一行

\

2.分段

\par

3.换页

\newpage

2.2 vs code编译器自动换行

在设置中选择 Word Wrap

相关推荐
小桥流水---人工智能3 天前
tcolorbox 设置 breakable 后断页颜色失效问题及解决方案
latex
kyzoon10 天前
LaTeX Tikz 绘图输出至图片
latex·tikz
恶猫10 天前
Win|WinEdt( LaTeX 编辑器),下载及安装教程
windows·编辑器·latex·winedt
Jovin Giogic17 天前
简明教程:记录 Ubuntu系统命令行安装TexLive,配置vscode
linux·vscode·ubuntu·latex·texlive
verse_armour20 天前
markdown插入文献引用并导出pdf
pdf·markdown·pandoc·latex
我的golang之路果然有问题1 个月前
word中latex插入矩阵的语法问题
笔记·学习·矩阵·word·latex·template method·分享
钱彬 (Qian Bin)1 个月前
从零开始发表SCI论文—第1篇:安装Latex写作工具
latex·vs code·sci论文·环境准备
他来自江湖1 个月前
西南科技大学,研究生开题报告latex模板
科技·latex·开题报告·西南科技大学
Invinc-Z1 个月前
LaTeX 个人简历模板
latex