LaTeX environment configuration

Publishing tool

At present, the mainstream publishing tool:

Word,LaTeX, Markdown,InDesign

  1. First talk from Word, Word document as an important tool for Office, is the current mainstream text layout, document processing processors, accounting for more than half of the market.

  2. Markdown, a lightweight markup language, founded by John Gruber in 2004. At first, it used for Github and other platforms, allowing programmers to write better descriptive document. Grammar, minimalist and efficient preparation of its properties in order to be able to learn the half-hour, increasingly popular in the world, more and more people are currently being used to write the document, record the event.

  3. InDesign, Adobe's publishing as a tool, which greatly enriched the editing and typesetting printing supplies, for books, posters, brochures, etc., to promote the efficient layout of commercial product design.

  4. LaTeX, only a popular tool in the academic field! From the beginning of the birth, LaTeX already has a lot of advanced concepts and technologies, the ability to edit perfectly adapted to the academic document. After decades of development, those ideas of the year, still plays an important role.

    Typesetting purpose is to serve the content. According to the needs of content to choose the right tool. If only written records, no formatting, directly txt text format, easy and convenient. For the basic needs of formats, while easy to record, recommend Markdown markup language. Writing in the document, the daily need to send to others, the paper circulated to recommend Word. For business products: poster, booklet printing, exquisite design requirements, special requirements for printed material, and the need Photoshop, Illustator and other tools to aid in design, recommendation InDesign, so better able to achieve their goals, in conjunction with other Adobe design tools better compatibility.

    For the layout of the academic content, one is a large number of formulas, enter jargon, on the other hand is required to streamline the layout and reasonable, after all, different from the academic content of commercial products, the requirements for the format, different starting point. Publishing academic content is based on large amounts of text, to read the insiders, concerned about the clarity of the format, rather than overdress, depending fancy layout design. It is recommended LaTeX.

LaTeX version:

 MacTeX,TEX Live, MiKTeX

  1. MacTeX: Mac OS system version

  2. TeX Live: LaTeX release one version

  3. MiKTeX: use the recommended Windows versions, for Windows systems, Mac systems, Linux system launched a downloadable version.

how to install

  1. TeX Live installation is relatively difficult, and we are generally required to install the complete contents by LaTeX TeX Live!

Full installation, you need one and a half hour, TeX Live installation and uninstallation is not suitable for frequent use! TeX Live recommended download iso file opens, displaying a DVD drive! In the DVD drive, running Windows batch file to install it.

  1. Mac computer system, recommended MacTeX.

  1. A brief overview of how to install the TeX Live: TeX Live

URL: https: //tug.org/texlive/

Or choose: https: //www.ctan.org/mirrors/

After entering, select Chinese region of mirror sites: Beijing, Lanzhou, Chongqing, Shanghai, Harbin, Shenzhen, Hefei, these sites are there to provide site and mirror sites to download CTAN channels, it is recommended to select from PC nearest mirror sites.

 

Below Tsinghua mirror sites, for example, explain how to download LaTeX version.

Enter Tsinghua University CTAN mirror site, choose "TeX Live", after entering, select the "Images" specific URL: https: //mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/

Select 3.3 GB size of files to download.

 

 

PS: Select mirror sites can be quickly installed! If you choose a foreign website, download the 3.3 GB for the size of the file, the download speed is significantly slower, it takes a long time. Strongly recommended the use of domestic mirror sites.

In the previous R language environment configuration (click on the blue text, Jump to the previous article), reference is made to select a mirror site. Using chooseCRANmirror () to select the appropriate mirror site, download the required language pack R (package). CRAN and CTAN using the same tactics to choose.

Files in the directory, texlive.iso, textlive2019-20190410, texlive2019.iso select any of three, can be.

After the download is complete, click on the file, you can get a DVD drive, is displayed on the computer as a disk. In this drive, select the install-tl-advanced file, installation can be freely selected path, to change the installation path other than the C drive.

 

Installation time: mounting interface display time: 82 minutes, the actual installation takes about half an hour.

 

 

 

 

 


 

In view of the installation of large, time-consuming, it is not recommended for newbies to install TeX Live!

By this method, all the packages mounted on the CTAN, more nearly four thousand, one-time installation in the computer, to download almost no subsequent packages.

MiKTeX installation

Download website: https: //miktex.org/download

Or select a mirror site: https: //mirrors.tuna.tsinghua.edu.cn/CTAN/

After selecting download MiKTeX into the mirror at Tsinghua University website.

Or select a mirror site: http: //mirror.lzu.edu.cn/CTAN/

Select MiKTeX, download.

Installation Precautions:

Paper type is selected by default A4

Asked whether to automatically download the packages, select Yes

After configuration is complete you can.

Warnings: the bottom of the installation path folder must be empty folder, or can not install!

After the installation is complete, MiKTeX Console and TeXworks appears.

 

Check for proper installation methods:

  1. Click MiKTeX Console, check after entering.

  2. You can select and open PowerShell, enter "tex -version" check the version information. You can also view "pdflatex", "xelatex" such as version information. If the input "tex", will go directly to the terminal mode MiKTeX, the input file to be compiled.

     

 

Knock Key: When installed, the installation for the current user to select only, then the following default deletion packages automatically installed to the installation path of MiKTeX. And to all users install on your computer, it will default to install the missing packages in the C drive! Recommendation: only be installed for the current user!

· · Some questions: In recent days, there is no mirror sites in mainland China area on MiKTeX, other regions including Taiwan, Japan, Singapore, Europe and America of mirror sites, has been unable to connect successfully, there is often a connection while downloading, frequent timeouts, the situation can not be downloaded. Recently it is not recommended to install MiKTeX. TeX Live is recommended to install the full version of the content, to avoid the late case of mirror sites not download the missing packages.

 

 

 

TeXworks

TeXworks as MiKTeX, TeXworks own editor. Beginners are recommended TeXworks operate. Not recommended to use other editing work.

TeXworks advantages:

  1. The output of the control bar at the bottom, can be visually clearly observed LaTeX compilation process, and the lack of an automatic download packages. Throughout the implementation process, to better help beginners understand LaTeX mode!

    Beginner's task is to learn LaTeX basic grammar, and how to edit the output document; instead of tossing editor!

  2. TeXworks is an application with MikTeX, TeX Live installed together, in TeXworks interface that can be called directly MiKTeX, fully automatically install the missing packages. The current mainstream editor or after installation, configuration environment is very complex, most likely not allow beginners editor to correctly identify the local end of the LaTeX compiler environment. Either interface is too complex, beginners often takes a few weeks to explore how to use the editor. There are some editors, when performing compilation, completely hidden content output, leaving a false impression beginners: compiling the document editor is done, I just need to install an "editor", you will be able to compile a PDF document. . .

  3. The choice of compiler command: TeXworks, gives a very clear options bar, allowing users to choose. Therefore, it is recommended to complete the editing work by TeXworks.

    The core is that the beginner syntax and compiler output. And not become dependent on the editor. If one up completely dependent on the compiler, a few years later, this editor is no longer the issue, maintain, upgrade, upgrade or editor, becomes the need to pay to use. This will undoubtedly be a very heavy blow!

About TeXworks disadvantages:

  1. The interface is relatively simple, it is difficult to implement complex functions, while syntax highlighting, font settings are not friendly.

  2. It is difficult to improve the sense of experience in the editing process.

    The first step in writing and compiling documents

Hello World! Standard output programming language.

\documentclass{article}
\begin{document}
Hello,world.
\end{document}

Through the establishment of these documents, to compile the output PDF document.

Write about the document:

Every time you write, create a separate folder, because the subsequent compilation process will produce a series of documents, all documents must be in the same folder!

The output of Chinese content

LaTeX default does not support Chinese output, the existing two solutions:

1. Select the ctex packages! Ctex defined parameter entry packages to UTF8. Ctex suitable for pdflatex, xelatex other compile command.

\documentclass{article}
\usepackage[UTF8]{ctex}
\begin{document}
Hello,world. \\
中文
\end{document}

PS: ctex packages default output for the Chinese Times New Roman.

2. pdflatex command compiles the file name of the tex document without too many demands, so you can freely use. When ctex and using macros, you can use xelatex command to compile.

Use xelatex command to compile.

\documentclass{article}
\usepackage{fontspec,xunicode,xltxtra}
\usepackage{xeCJK}
\setmainfont{Times New Roman}
\setCJKmainfont{SimSun}

\begin{document}
Hello,world. \\
中文
\end{document}

Such benefits are more easily set up the Latin font, and Chinese fonts.

As shown above, is set to Western Times New Romans, Chinese Times New Roman.

ps: When using xelatex compiled, tex file name must be non-Chinese characters! You must use the Letter as the file name!

  tex document containing Chinese characters can not be compiled by XeLaTeX.

 

Published 58 original articles · won praise 22 · views 9843

Guess you like

Origin blog.csdn.net/zsd0819qwq/article/details/105198195