# Installing Tex live

https://www.tug.org/texlive/

There are generally two installation methods:
Another is to download the ISO image file and then install it. For faster download, two image sources are recommended: Mirror image of Tsinghua University and Image of China University of science and technology.

## Tex live installation process

After downloading the file, get the file in the figure below. The file downloaded a long time ago may be updated now, but the subsequent installation steps have not changed.

After opening the iso image file, double-click the "install TL windows. Bat" file to install

The following interface will be displayed, where you can modify the installation path according to your needs. (there may also be a page of command prompt, which can be turned off without care)

After that, there will be a long wait. The interface in the figure below will be displayed. The installation time is very long, about 40 minutes. The specific installation time depends on the performance of the computer.

You can turn it off after the installation.

After the installation is completed according to the above steps, you will have these applications in the figure below.
Generally, you only need to edit with "TeXworks editor". Specifically, how to edit is not taught here for the time being. There are many teaching videos on the network.

I don't like to use "TeXworks editor" for editing. I think it's very eye-consuming and uncomfortable, so there are follow-up "improvements" in this article

# Installing LateX in Visual Studio code(VS code)

vscode can be found in Official website Download, windows, Linux and other versions.

## VS code install latex

Open VS code and the interface is as follows

Search for "latex" in the extended application and install it. (effective after software restart)

Some students may be more accustomed to the chinese interface, or they can search "chinese" in the application for installation, which is an option. (effective after software restart)

(Note: the software needs to be restarted here)
At this stage, VS code cannot be used for latex editing, and some important settings are required.
Open Settings - > command panel, or press Ctrl+Shift+P to open command panel

Search for "setting" and select "preferences:Open Settings(JSON)" (Note: don't choose wrong)

Delete all the code (possibly blank), then copy the following code and save it (Ctrl+S).

{
"files.autoSave": "onFocusChange",
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.view.pdf.hand": true,
"latex-workshop.synctex.afterBuild.enabled": true,
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "latexmk",
"command": "latexmk",
"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-workshop.latex.recipes": [
{
"name": "XeLaTeX",
"tools": [
"xelatex"
]
},
{
"name": "PDFLaTeX",
"tools": [
"pdflatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "BibTeX",
"tools": [
"bibtex"
]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
},
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
}
]
}


# Test the simplest latex

You can create a new file with the suffix ". tex" and open it with VS code.
Enter the following code:

\documentclass{article}
\usepackage{ctex} % Chinese macro
\begin{document}
Hello, world! Hello, world!
\end{document}


Run and view the PDF file. If the result is similar to that in the figure below, then conversion to you!!!

Keywords: Latex Visual Studio Code

Added by pourmeanother on Thu, 03 Mar 2022 20:45:08 +0200