Latex Newcomer Tutorial, 30 minutes from complete strangers to basic introductory

Source: Internet
Author: User

by Nan

For those who really want to get started with Latex quickly, the preface can be skipped without looking.

This tutorial is intended for new recruits who have no basic knowledge of latex.
Designed to make it easy for newcomers to get started with the simplest and quickest way to quickly complete basic text editing with Latex.
The ultimate level of this textbook is the ability to write a normal proposal using Latex. If you want to increase the need for more, then the recommendation is familiar with the content of this article, then Google or consult other slightly thicker material.
In particular, it aims to dispel the fear that some of the new latex is hard to learn in the rumors.
After the introduction, in the face of various advanced applications, special requirements and abnormal conditions, you can consult Google to solve.


The first three words to introduce what is latex, the following three points based on my personal subjective experience of the summary.
1.LaTeX is a class of software for editing and typesetting that is used to generate PDF documents.
2.LaTeX editing and typesetting of the core idea is that through the \section and \paragraph and other statements, the provision of each sentence in the article subordinate to the level, which greatly facilitates the batch processing at all levels.
3.LaTeX in the use of experience, the most difficult to be replaced by word, there are four aspects: convenient and beautiful mathematical formula editing, do not tamper with the backspace alignment, non-WYSIWYG so you can edit the time with the backspace and line-up to organize ideas, but generated PDF does not affect the appearance, Some tutors and publications do not accept word typesetting articles.


I would like to warn and strongly condemn those who are self-righteous in the Advanced LaTeX user. Please do not for their own poor pathetic vanity, to deliberately render latex how high-end how not easy to learn, this and Kong Yiji show off fennel beans anise word there are four kinds of writing what is the difference? Darn! How "hard" latex is, you know? In the same vein there is a large part of the VI user, as well as Linux user, and Fallout player. Lying trough, a software just, what is good to show. Other people want to learn latex, good, you casually throw a hundreds of page of English manual, appear oneself very high-end? Have you seen it yourself? Do you really want someone to read it when you recommend it to someone else? Just pretending to be an idiot is a bastard!


My motivation to write this tutorial is precisely because there is no such thing as a quick, fast latex tutorial that can be found on the web. The shortest I can find, or what I think is the most instructive, is that "a less brief introduction to Latex." But for those who want to get a quick look at latex, the "Less brief introduction" is still a bit too long, and I studied it all night when I started. In the latex community to chat for a long time, we are friends, since the lack of this piece I have leisure, then fill up. So I wrote this tutorial, entirely to the Church of new people to get started for the purpose, the flashy content is omitted, to ensure that in 30 minutes to follow this tutorial complete steps can basically be considered "play latex". This 30-minute duration is the usual time for me to help my friends get started with latex, and it is the result of accumulated experience. As for the other latex tutorials, my personal recommendation is to look at this after reading this article, and then as a dictionary or an encyclopedia.

=============================================

Here is the tutorial body. (The text finally added an addendum to everyone's request)

Installation and use of 1.LaTeX software
Method A (self-help): Download the free MiKTeX compilation package and install it on MiKTeX's website. Download WinEdt (charge) or texmaker (free) and other editing interface software and install it.
Method B (Package): Download Ctex kit (including MiKTeX and WinEdt) in ctex.org
Haha this part of course is not included in the title of the 30 minutes.


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

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

Then find the Compile button (in the middle of the trash and letter B) in the WinEdt toolbar, select XeTeX in the drop-down menu, and click Compile.
If it goes well, we can create the first PDF file, and click the magnifying glass button in the toolbar to quickly open the resulting PDF file.


3. Title, author and comment
Create a new document, copy the following into the document, save, save type Select as UTF-8, compile and observe the phenomenon.

\documentclass{article}
\author{my Name}
\title{the Title}
\begin{document}
\maketitle
Hello, world the is comment
\end{document}


4. Chapters and paragraphs
Create a new document, copy the following into the document, save, save type Select as UTF-8, compile and observe the phenomenon.

\documentclass{article}
\title{hello World}
\begin{document}
\maketitle
\section{hello China}, in East Asia.
\subsection{hello Beijing} Beijing is the capital of the PRC.
\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 like a clear and beautiful level. This is not necessarily the case in practice, and the space before each line does not affect the result of compiling the resulting PDF.


5. Join the Catalogue
Create a new document, copy the following into the document, save, save type Select as UTF-8, compile and observe the phenomenon.

\documentclass{article}
\begin{document}
\tableofcontents
\section{hello China}, in East Asia.
\subsection{hello Beijing} Beijing is the capital of the PRC.
\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}

6. Line break
Create a new document, copy the following into the document, save, save type Select as 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}


7. Mathematical formulas
Create a new document, copy the following into the document, save, save type Select as UTF-8, compile and observe the phenomenon.

\documentclass{article}
\usepackage{amsmath}
\USEPACKAGE{AMSSYMB}
\begin{document}
The Newton ' s second is f=ma.

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

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

The Newton ' s second 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 \& are 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}

Specific details can be self-searching latex mathematical symbol table or others give examples.


8. Insert Picture
First search for a picture into an EPS file software, it is easy to find, and then save the picture as a name such as Figure1.eps.
Create a new document, copy the following into the document, save, save type to UTF-8, put in the same folder as the picture file, compile and observe the phenomenon.

\documentclass{article}
\USEPACKAGE{GRAPHICX}
\begin{document}
\includegraphics[width=4.00in,height=3.00in]{figure1.eps}
\end{document}


9. Simple Form
Create a new document, copy the following into the document, save, save type Select as 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}


10. End
So far, you can use Latex's article template to write a basic paper frame, at least you can use Latex.
In the paper from the framework to the complete process, there must be a lot of detail problems, such as font size, compared to pieces, such as complex tables and so on.
Those questions, please consult Google. Generally speaking, as a beginner will ask the question, already have many ancestors in the network has mentioned the same problem, look at other people's answer can be.
Latex in the domestic penetration is not high, so many times if you search English keywords, will get better results.


===============================
Appendix, information about what I think is not a beginner's need, but really useful

1. Chinese support
Once the Chinese support of latex is a troublesome thing, but now it is very easy to use Miktex+winedt's Chinese support.
Just change the beginning of the \documentclass{atricle} to \documentclass{ctexart}.
If you are using Ctexart for the first time, you will automatically download and install the macro packages and templates, and then you will not download them again.
Examples are as follows:
Open WinEdt, create a new document, copy the following into the document, save, save type to UTF-8.
\documentclass{ctexart}
\begin{document}
Hello, world
\end{document}


2. Macro Package
\package{} is the call to the macro package, the computer is a layman can be understood as a toolbox.
Each macro package defines special commands that enable uniform typography for a class of objects (such as mathematical formulas, etc.), or to implement functions such as inserting images or making complex tables.
Usually after the \documentclass, before the \begin{document}, the article needs to be covered in the macro package listed.
For newcomers, the more commonly used macro packages are

Macro packages for editing mathematical formulas: \usepackage{amsmath} and \USEPACKAGE{AMSSYMB}
Macro package for editing mathematical theorem and proving process: \usepackage{amsthm}
Insert a picture of the macro package: \usepackage{graphicx}
Macro Package for complex tables: \usepackage{multirow}

Almost, for the new person, these five macro package has been basically enough. If there are other special needs, go through Google to find it.
In addition, the Ctexart template is now integrated with Chinese support, so CJK Macro package is not a necessity.


3. Templates
The template is the contents of the curly braces that follow the \documentclass{}.
In this tutorial, we are using the default Latex template article, as well as the Chinese template ctexart.
The template is the 2nd way to achieve the experience of latex that I have described earlier.
In an article, we define the section, which defines the paragraph, that is, the font size is not defined because the font size is usually implemented in the template.
A template can be specified, section of this level with what font size how to align, subsection this level with what font size how to align, paragraph and what font size how to align.
Of course, the template can also contain a number of custom passwords, as well as page settings such as header and footer margins.
Because of the use of templates, in my experience, it is absolutely impossible to be a basic entry-level content, so in the text of course not mentioned.
If someone really wants to learn, if Latex has come into contact with this extent, then go to other thicker textbooks, also do not lose.



4. References and production slides
As a reference, the article has been written to the end, and the slide is not more advanced requirements. Latex users with two of these features are already skilled in using latex, and it's no good to go to Google or check out other thick tutorials.
In this I will only provide two search keywords, reference literature can search BibTeX, make slides can search beamer.

From:http://blog.sina.com.cn/s/blog_90444ed201016iq6.html

Latex Newcomer Tutorial, 30 minutes from complete strangers to basic introductory

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.