[Unlock] LaTeX - LaTeX Quick Start Tutorial

This is one thing the old post, it turned out today because this post for LaTeXentry is indeed very good. Posts are re-layout, with maps, we hope to be able to provide some help learning.

Summary

For really eager to get started quickly LaTeX people, the preamble can skip without looking.

This tutorial is for recognition of LaTeX completely without foundation newcomers.
Designed to give newcomers can use the simplest and quickest way, ease of entry, LaTeX can quickly complete basic text editor.
The materials can eventually reach a level to be able to use LaTeX to write a normal proposal. If you want to have a greater increase in demand, it is recommended after familiar with the contents of this article, and then on their own textbooks google or check out other thicker.
In particular, the new part is designed to get rid of the fear of LaTeX in rumors difficult to learn.
After entry, the face of a variety of advanced applications, special requirements and abnormal conditions, free to consult google resolved.

First with three words to explain what LaTeX, the following three points based on my personal subjective experience summary.

  1. LaTeX is a type of software for editing and typesetting for generating PDF documents.
  2. The core idea is that LaTeX editing and layout by \ section and \ paragraph and other statements, provides every word in the article is subordinate level, which greatly facilitates the batch processing of various levels.
  3. LaTeX in terms of experience, most can not easily be replaced by Word has four aspects: convenient and beautiful mathematical formula editor, will not tamper with the backspace aligned, non-WYSIWYG therefore be serviced by backspace and line feed when editing but ideas generated PDF out does not affect the appearance, part mentor and publications do not accept the Word publishing articles.

I want to strongly denounce those stern warning and advanced LaTeX user self-righteous people. Please do not be sad for their own vanity that point the poor, to deliberately render LaTeX how how high is not easy to learn, and this Kung show off the fennel beans flavored with aniseed There are four written word what is the difference? Darn! LaTeX in the end how "hard" you know yourself, okay? Similarly there are a large part VI user, as well as Linux user, as well as Fallout player. FML, a software only, there is nothing to show off. Others want to learn LaTeX, well, you pick people to lose a few hundred pages of English Manual, it seems he is very high? You read it? You recommend to somebody really I want people to read it? Just loaded to force, then that is a darn!

My motivation to write this one tutorial, LaTeX brief crash course precisely because the network can be found not at all. I can find the shortest or that most instructive in my opinion, is the speed "is not a LaTeX brief introduction." However, for want of LaTeX quickly understand the people, and that a "not very short introduction" is still somewhat a little longer, I had also studied at the time of entry all night. In LaTeX group in the community to talk for a long time, we are all friends, since missing this one I have leisure, then make up. So I wrote this tutorial, the church is completely new to use for the purpose of omitting all the flashy content, ensure that you can basically be "Fun LaTeX" in thirty minutes followed this tutorial step away completely. The duration of thirty minutes, conventional time I helped my friends around me came into contact with LaTeX entry is the result of accumulated experience. As for the other Raiders LaTeX tutorial, I personally recommend is this one after reading, then randomly when a dictionary or an encyclopedia to look up.

First document

Open WinEdt, create a new document, copy the following into the document, save, select the type UTF-8.

\documentclass{article}
\begin{document}
hello, world
\end{document}

Then find the button in WinEdt compile the toolbar, select XeTeX in the drop-down menu (middle in the trash and the letter B), and click compile.
If all goes well, we can successfully generate the first pdf file, click on the magnifying glass button in the toolbar, you can quickly open the generated pdf file.
Here Insert Picture Description

Title, author and comment

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\author{My Name}
\title{The Title}
\begin{document}
\maketitle
hello, world % This is comment
\end{document}

Here Insert Picture Description

Sections and paragraphs

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\title{Hello World}
\begin{document}
\maketitle
\section{Hello China} China is in East Asia.
\subsection{Hello Beijing} Beijing is the capital of China.
\subsubsection{Hello Dongcheng District}
\paragraph{Tian'anmen Square}is in the center of Beijing
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University} is the best university in Guangzhou.
\end{document}

Backspace is just my personal preference, it looks clear and beautiful levels. Actual operation may not be the case, spaces before each line does not affect the printed version of the compiler generates a PDF.
Here Insert Picture Description

Join the directory

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\begin{document}
\tableofcontents
\section{Hello China} China is in East Asia.
\subsection{Hello Beijing} Beijing is the capital of China.
\subsubsection{Hello Dongcheng District}
\paragraph{Hello Tian'anmen Square}is in the center of Beijing
\subparagraph{Hello Chairman Mao} is in the center of Tian'anmen Square
\end{document}

Here Insert Picture Description

Wrap

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\begin{document}
Beijing is
the capital
of China.

New York is

the capital

of America.

Amsterdam is \\ the capital \\
of Netherlands.
\end{document}

Here Insert Picture Description

Mathematical formula

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
The Newton's second law is F=ma.

The Newton's second law is $F=ma$.

The Newton's second law is
$$F=ma$$

The Newton's second law is
\[F=ma\]

Greek Letters $\eta$ and $\mu$

Fraction $\frac{a}{b}$

Power $a^b$

Subscript $a_b$

Derivate $\frac{\partial y}{\partial t} $

Vector $\vec{n}$

Bold $\mathbf{n}$

To time differential $\dot{F}$

Matrix (lcr here means left, center or right for each column)
\[
\left[
\begin{array}{lcr}
a1 & b22 & c333 \\
d444 & e555555 & f6
\end{array}
\right]
\]

Equations(here \& is the symbol for aligning different rows)
\begin{align}
a+b&=c\\
d&=e+f+g
\end{align}

\[
\left\{
\begin{aligned}
&a+b=c\\
&d=e+f+g
\end{aligned}
\right.
\]

\end{document}

Here Insert Picture Description
Specific details can search for their own LaTeX math symbol table or examples given by others.

Insert Picture

First search for a picture will turn into eps files software, it is easy to find, and then save the picture as a name /home/frank/Pictures/Balloon_by_Matt_Benson.jpg.
Create a new document, copy the following into the document, save, select the type UTF-8, and image files in the same folder, compile and observe the phenomenon.

\documentclass{article}
\usepackage{graphicx}
\begin{document}
	\includegraphics[width=4.00in,height=3.00in]{/home/frank/Pictures/Balloon_by_Matt_Benson.jpg}
\end{document}

Here Insert Picture Description

Simple table

Create a new document, copy the following into the document, save, select the type UTF-8, compile and observe the phenomenon.

\documentclass{article}
\begin{document}
\begin{tabular}{|c|c|}
a & b \\
c & d\\
\end{tabular}

\begin{tabular}{|c|c|}
\hline
a & b \\
\hline
c & d\\
\hline
\end{tabular}

\begin{center}
\begin{tabular}{|c|c|}
\hline
a & b \\ \hline
c & d\\
\hline
\end{tabular}
\end{center}
\end{document}

Here Insert Picture Description

end

So far, you can already use LaTeX own article templates to write a basic essay framework, at least you have been able to get up with the LaTeX.
In the framework of the complete process from paper, inevitably there are a lot of details, such as font size, such as sprites, such as complex tables, and so on.
Those questions, please consult google it. Normally we, as beginners will issue raised, already there have been many of our ancestors put on the network had the same problem, you can look at someone else's answer.
LaTeX penetration rate in the country is not high, so in many cases if the search keywords in English will get better results.

Chinese Support

LaTeX once the Chinese support is one thing too much trouble, but now MikTeX + WinEdt of Chinese support is very easy.
Just put the beginning of the \ documentclass {atricle} into \ documentclass {ctexart} on it.
If this is the first time ctexart, then automatically downloads and installs not only macros and templates, and then it will not be downloaded.
Referring to the example as follows:
Open WinEdt, create a new document, copy the following into the document, save, select the type UTF-8.

\documentclass{ctexart}
\begin{document}
你好,世界
\end{document}

Hiroshitsutsumi

\package{}就是在调用宏包,对计算机实在外行的同学姑且可以理解为工具箱。
每一个宏包里都定义了一些专门的命令,通过这些命令可以实现对于一类对象(如数学公式等)的统一排版(如字号字形),或用来实现一些功能(如插入图片或制作复杂表格)。
通常在\documentclass之后,在\begin{document}之前,将文章所需要涉及的宏包都罗列上。
对于新人而言比较常用的宏包有

编辑数学公式的宏包:\usepackage{amsmath}和 \usepackage{amssymb}
编辑数学定理和证明过程的宏包:\usepackage{amsthm}
插入图片的宏包:\usepackage{graphicx}
复杂表格的宏包:\usepackage{multirow}

差不多了,对于新人来说,这五个宏包已经基本够用了。如果有其他的特殊需求,就通过google去寻找吧。
补充说明一下,现在ctexart模板里集成了中文支持,所以CJK宏包并不是必需品。

模板

模板就是在\documentclass{}后面的大括号里的内容。
在这一份教程中,我们使用的是LaTeX默认自带的模板article,以及中文模板ctexart。
模板就是实现我之前所介绍的LaTeX的经验总结的第二点的实现方式。
一篇文章,我们定义了section,定义了paragraph,就是没有定义字体字号,因为字体字号这一部分通常来说是在模板中实现的。
一个模板可以规定,section这个层级都用什么字体什么字号怎么对齐,subsection这个层级用什么字体什么字号怎么对齐,paragraph又用什么字体什么字号怎么对齐。
当然模板里还可以包含一些自定义的口令,以及页眉页脚页边距一类的页面设置。
由于模板的使用,在我的使用经验里来看,绝对不可能算是基本入门级的内容,所以在正文里当然不会提及。
如果有人实在想学,如果LaTeX已经接触到这个程度上了,那么再去翻其他厚一些的教材,也不亏了。

参考文献和制作幻灯片

做参考文献的时候,文章也已经快写到尾声了,而幻灯片更不是进阶一些的需求。对这两个功能有需求的LaTeX user,使用LaTeX也已经相当熟练了,自己去google一下或查阅其他厚教程是很理所当然的,一点也不冤枉。
在此我就只提供两个搜索关键词,参考文献可以搜bibtex,制作幻灯片可以搜beamer。

致谢

感谢原文作者勤务。

发布了31 篇原创文章 · 获赞 11 · 访问量 4257

Guess you like

Origin blog.csdn.net/xk_xx/article/details/104231588