LaTeX installation configuration (TeX Live 2020+VS Code plug-in LaTeX Workshop)

Overview

  • Compiler: TeX Live 2020
  • Editor: VS Code and its plug-in LaTeX Workshop

TeX Live 2020 installation

Download from the Tsinghua mirror station, the texlive2020.isosize is 3.7G, which is relatively large, and the download is relatively time-consuming. The path is as follows:
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/ After
Insert picture description here
downloading, click the image, the file organization is roughly as follows:
Insert picture description here
double-click the install-tl-windows.batbatch file, then click Advanced:
Insert picture description here
then modify the installation Path to prevent taking up C drive space, as follows: the
Insert picture description here
other options do not need to be changed, you can also tick off "After install, set CTAN as source for package updates" in the lower right corner.
Then click install. The installation time will be longer, about 1h. When you get it 欢迎进入TeX Live的世界, it indicates that the installation is successful, just exit. The iso file used in the installation can be deleted at this time.

Configuration of LaTeX Workshop plugin

Search and install the plug-in directly in VS Code, or search for the plug- in at https://marketplace.visualstudio.com/search?target=VSCode&category=All%20categories&sortBy=Installs. After downloading, select the downloaded plug-in to install through VSIX, as follows:
Insert picture description here
Insert picture description here
Insert picture description here
After the plug-in is installed, click Ctrl+Shift+Pand search settingto open it setting.json, as follows:
Insert picture description here
add the following content:

	"latex-workshop.view.pdf.viewer": "tab",
    "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.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk"
    ]

Then it can be used.

Other

A LaTeX formatted plug- latex-formatterin can also be installed and used.

Guess you like

Origin blog.csdn.net/m0_46161993/article/details/113098848