LaTeX getting started

Source: Internet
Author: User
Tags linux mint

LaTeX getting started

In my previous article, "See Markdown, LaTeX, and MathJax excellent text editors in Linux", I mentioned Markdown, LaTeX, and MathJax. These things have a profound impact on the writing and presentation of current online technology articles. In the previous article, I also provided a learning material for LaTeX syntax. In this article, I want to talk about LaTeX again.

In many minds, LaTeX is a very professional typographical system and a complicated system. Speaking of professionalism, it is true that many scientific papers are written in LaTeX, and many well-known magazines only accept contributions in LaTeX format, and the effect obtained by using LaTeX layout is superb, especially for mathematical formulas filled with scientific papers. Speaking of complexity, it is not only because of the wide variety of LaTeX typographical language commands, but also because of its countless macro packages, the learning cost is really quite high.

Using Texmaker in Ubuntu 14.04 and Linux Mint 17 to use LaTeX

Use LaTeX to prepare your resume

LaTex beginner Template

What exactly does a LaTeX typographical system contain? I think it can be divided into the following parts:

  • A typographical engine, TeX, pdfTeX, or XeTeX;
  • A series of fonts;
  • A series of macro packages;
  • Some tools, such as display the typographical results output by various typographical engines, or convert between dvi, ps, pdf, and other formats.

I think LaTeX typographical systems are mainly caused by historical reasons. The reasons are as follows:

  • The earliest TeX engine written by Professor Knuth did not support UTF-8-encoded input files, so it was too difficult to support Chinese;
  • The earliest TeX system comes with a set of fonts. To expand it, you need to expand the fonts in the corresponding fields, such as LaTeX's rich mathematical fonts, installing fonts in the TeX system is a very complicated task;
  • A large number of third-party macro packages are difficult to install and learn;
  • Who else uses the dvi format and ps format? How convenient is it to use pdf.

The complexity caused by these historical reasons has been solved for a long time, but many books have not been clearly written. I think it is very convenient to use LaTeX for the following reasons:

  • Professor Knuth's Tex engine is used to look up on it. The XeTeX engine is used in actual work. It perfectly supports Unicode character sets and UTF-8 encoding, and Chinese is no longer a problem;
  • Professor Knuth's METAFONT is outdated. Who does not need TrueType now? Good fonts can certainly be produced by companies that are both rich and tasteful, such as Microsoft, Adobe, and Apple;
  • The XeTeX engine can directly use the fonts installed in the operating system. You no longer need to consider installing the fonts in the TeX system;
  • The XeTeX engine directly outputs pdf files;
  • You can also use IDE tools such as TeXWorks;
  • As for the problem of too many macro packages, we can use a ready-made release version, such as the texlive package.

Next we will start the practice. I use texlive In Ubuntu. To save trouble, I directly installed texlive-full, and run the following command:

sudo apt-get install texlive-full

Then, run the following command to install TeXWorks:

sudo apt-get install texworks

The following is the working interface of TexWorks. The typographical engine must select XeLaTex. Edit the document on the left and preview the file on the right:

The first running is impossible, because you have to set the font as below.

A Chinese font must be used if you want to make Chinese formatting smoothly. There are generally 6 types of fonts used in Chinese typographical:, and. So I copied these fonts from my Win7 system to Ubuntu and threw them to. fonts in the main directory. (And are available only after the Office is installed .) For example:

Of course, if you do not want to fully achieve the effect in Windows, you can also not borrow its font. In Linux, there is no shortage of, and, and other fonts will be owed. If the font in Windows is not used, can be replaced by ar pl UMing, can be replaced by ar pl UKai, and drocan be replaced by Droid Sans Fallback, for example:

Then, modify/usr/share/texlive/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.defThe font name in corresponds to the font name output by fc-list, for example:

Do you think the path above is too long? Too difficult to find? Indeed, the texlive path is so complex. The first time I found this file based on the error message.

Texlive-full is too big. I spent almost one night in the installation. For such a complex system, where are all its configuration files and environment variables? Usetlmgr confCommand to view, such:

Use the ctex macro package to write Chinese documents. It is not very complicated. LaTeX also has some more complex functions, such as making slides, drawing, and so on. They all have corresponding macro packages available, and when texlive-full is installed, install the Detailed Help documentation. You only need to open/usr/share/texlive/doc.htmlThis file shows a list of all the macro packages and help documents. I previously shared the LaTeX introduction, which is not too short, the classic "Tex by Topic" also contains:

What do you think of seeing this one-kilometer long list?

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.