[LaTeX Tutorial] 01. LaTeX Introduction and Installation

[LaTeX Tutorial]

statement

Due to the recent contribution, the instructor requires the LaTeX version of the article, combined with the recent study, to organize the learned content, from installation to application, since it is also a new study, I also try to emphasize the LaTeX details used in the article as much as possible What comes out, especially the formula part, is basically some small details. If there are deficiencies in the tutorial, please leave a message in the comment area. I hope we can make progress together.
Finally, I wish everyone a smooth journey in learning and contributing to SCI!

01. Introduction and installation of LaTeX

Introduction to LaTeX

TeX is an electronic typesetting system based on the underlying programming language created by Donald Knuth (TEX is a trademark registered by Honeywell for its Text Executive text processing system in 1980, and it is different from TeX). Using TeX, you can fine-tune the layout and generate beautiful documents. TeX provides low-level commands for layout editing, but the operation is complicated and the work efficiency is not high. TeX allows these low-level commands to define extended commands that can perform complex operations. LaTex is a collection of TeX extended commands developed by Leslie Lamport. LaTexj reduces the workload and difficulty of typesetting by integrating common layout setting operations. LaTex's powerful typesetting capabilities, especially its support for scientific documents, have made it the de facto standard for writing scientific papers.

TeX system generates DVI (Device Independent) files. With the manifold of the pdf file format, LaTex can also generate PDF format files while supporting the DVI file format. LaTeX (LATEX, transliterated "La Taihe") is a typesetting system based on TEX, developed by American computer scientist Leslie Lamport in the early 1980s, using this format, even Users without knowledge of typesetting and programming can also give full play to the powerful functions provided by TeX, and can generate a lot of book-quality prints in a few days or even a few hours. This is especially true for generating complex tables and mathematical formulas. It is therefore ideal for producing scientific and mathematical documents of high print quality. This system is equally suitable for generating all other kinds of documents from simple letters to complete books.

TeX has different implementations on different hardware and operating systems. At present, the commonly used TeX system on Unix/Linux is teTeX, and there are MiKTeX and fpTeX in Windows. CTeX is the Chinese suit.

LaTeX and Word

Word is a document and word processing software launched by Microsoft, and it also has a strong typesetting function. Compared with LaTex, Word's biggest advantage is its "what you see is what you get" feature, so the entry barrier is low. On the other hand, Word's grammar and spelling error checking capabilities are stronger than LaTex.

As a typesetting system, LaTex is easier to use than Word in terms of format control and formula editing. The documents generated by LaTex are more beautiful than Word documents. The entry threshold of LaTeX is relatively high. Using LaTeX not only needs to edit the text, organize the document format, but also deal with the bugs that appear during the compilation process. If you use Chinese, you must pay more attention to such trivial issues as GBK, UTF-8 and other document encoding. In addition, the slides made by LaTex are not as good-looking as those made by Word.

LaTex and Word target different user groups, and have different concepts in word processing and document layout. There are many overlaps in function between the two, and each has advantages and disadvantages.


## LaTeX installation The installation of Latex is divided into two parts, one is the environment used, and the other is the editor, which is similar to the installation of python, such as the python3.9 environment, and the editor is PyCharm. There are many derivative versions of Latex. This article selects the common environment TeX Live (with its own editor TeXworks), and the editor is TeXstudio. TeX Live installation mirror download:

https://mirrors.ustc.edu.cn/CTAN/systems/texlive/Images/Click
to download texlive2022.iso file
TeXstudio installation package download:
http://texstudio.sourceforge.net/

If you don’t want to download and install the above environment and editor locally, you can also choose the online editing website overleaf: https://www.overleaf.com/

Installation steps after the download is complete

Install TeX Live

1. Double-click to open the downloaded iso file, right-click install-tl-windows.bat as shown below, and run it as an administrator


insert image description here

2. The picture below shows the installation interface. You can modify the installation directory according to your needs, and you can also click Advanced to modify some configurations, such as canceling the installation of some useless language packs


insert image description here

3. After that, there will be a very long wait. Be sure to wait patiently. If you quit halfway, you may make an error. After the installation is complete, the following interface will appear


4. xelatex -vIf there is no version information in the command line input, it means that the environment variable needs to be configured

insert image description hereThe above succeeds
or enterslatex -v

insert image description hereThe above success
The above success indicates that the TeX Live installation is complete

If the version information does not appear, it means that the environment variable needs to be configured. To configure the environment variable
insert image description here
, add the bin/win32 directory under the tex live installation root directory to the system environment variable path

insert image description here
After configuring the environment variables, check the version information. If the version information graph appears above, it means the configuration is successful.


Install the editor TeXstudio

Official website: TeXstudio official website

Download from the official website and install according to the process

texstudio configuration Chinese, click options → Configure TeXstudio

insert image description herelanguage here select zh_CNinsert image description here

Write code to test the effect

Click to create a new file

insert image description here
Edit the following code

\documentclass{
    
    article}
% 这里是导言区
\begin{
    
    document}
Hello, world!
\end{
    
    document}

insert image description here
You can see that the operation is successful, hello, world are displayed correctly

So far the installation is over

Supongo que te gusta

Origin blog.csdn.net/Summeroc/article/details/126507852
Recomendado
Clasificación