Windows10下的VSCode安装配置LaTex

安装步骤

1、进入 MiKTeX官网 下载 LaTex 并安装
2、在 VSCode 安装插件 LaTeX Workshop
3、按Ctrl+Shift+P,配置setting.json文件

"latex-workshop.latex.tools": [
        {
    
    
          "name": "latexmk",
          "command": "latexmk",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "-pdf",
          "%DOC%"
          ]
        },
        {
    
    
          "name": "xelatex",
          "command": "xelatex",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "%DOC%"
            ]
        },          
        {
    
    
          "name": "pdflatex",
          "command": "pdflatex",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "%DOC%"
          ]
        },
        {
    
    
          "name": "bibtex",
          "command": "bibtex",
          "args": [
          "%DOCFILE%"
          ]
        }
      ],
  "latex-workshop.latex.recipes": [
        {
    
    
          "name": "xelatex",
          "tools": [
          "xelatex"
                      ]
                },
        {
    
    
          "name": "latexmk",
          "tools": [
          "latexmk"
                      ]
        },

        {
    
    
          "name": "pdflatex -> bibtex -> pdflatex*2",
          "tools": [
          "pdflatex",
          "bibtex",
          "pdflatex",
          "pdflatex"
                      ]
        }
      ],
  "latex-workshop.view.pdf.viewer": "tab",  
  "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"
    ]

4、新建文件,语言选择为LaTex
在这里插入图片描述
5、输入测试用例,新建一个文件夹保存(因为运行过后会出现很多文件)

\documentclass{
    
    article}
\begin{
    
    document}
Hello world!
\end{
    
    document}

6、点击绿色的运行按钮在这里插入图片描述,下方会出现在这里插入图片描述,变成后则表示编译成功,点击就可以看演示了

基本使用

1、中文

\documentclass[UTF8]{
    
    ctexart}

猜你喜欢

转载自blog.csdn.net/qq_44997147/article/details/120239154