Learn to use latex typography

Source: Internet
Author: User

0. Description

The Latex typesetting tool used in this article is the Ctex kit, which can be a part of a blog post.

1. Typography Practice

1) Line break

Each line is finally added "\ \" for line wrapping, or you can use the \newline directive. Line spacing can also be controlled.

This was a line \\[1cm]this are a new line

The above indicates that the original line spacing is added with 1cm, the value can be negative, indicating minus the corresponding line spacing. No line break control is used, even if carriage return (enter) does not wrap.

2) Document category

First, the main introduction of "article" and "Report", Article no Chapter (chapter), can be used as a short essay or a small paper, report is reports or large paper.

The document structure mainly has chapter/section/subsection/and so on.

3) Simple Example

In order to be able to do a good job of the resulting PDF, using the article document category, each chapter of the report document is automatically paginated. The contents of the Test.tex file are as follows:

1 \documentclass{article}2 \begin{document}3 This is the first experience of \latex.4 \section{aesop Fables}5 \subsection{the Ant and the Dove}6 An ant went to the bank of a river to quench its thirst, and7 being carried away by the rush of the stream, is on the8 Point of drowning.9 a Dove sitting on A tree overhanging the water plucked aTen leaf and let it fall into the stream close to her. The Ant One climbed onto it and floated in safety to the bank. A \subsection{the Dog in the Manger} - a dog lay in a Manger, and by his growling and snapping - prevented the oxen from eating the hay which had been the placed for them. - "What a selfish dog!" said one of them to his companions; - ' He cannot eat the hay himself, and yet refuses to allow - those to eat "who can." + \section{the Eagle and the Arrow} - An eagle sat on a lofty rock, watching the movements of a + Hare whom he sought to make his prey. A An Archer, who saw the Eagle from a place of concealment, at took an accurate aim and wounded him mortally. -\end{document}

The above code compiles the resulting PDF effects such as:

Explanation: Line 3rd is used as an introduction and is automatically indented. Sections after section, subsection after the summary, sections and sections are automatically used in response to the format of bold and so on.

4) Add information such as title

Replace the Test.tex 1-3 line with the following:

\documentclass{article}\title{aesop Fables}\author{aesop\thanks{thanks to the reader.} \and nobody\thanks{thanks to Nobody.}} \date{\today}\begin{document}\maketitlethis is the first experience of \latex.

The compiled PDF results are as follows:

Explanation: The \title instruction added the article title, \author added the author's name, \thanks added acknowledgements, and many authors connected with \and. \date Join date, the title of the insertion in the preamble area, and need to be in the text area (\begin{document}) to add \maketitle instructions to generate the title information.

5) Add to Catalog

The insertion of the directory is very simple, and on the basis of the above, add a line after the \maketitle instruction:

\tableofcontents

Latex automatically inserts directories according to chapters (chapter)/sections (section)/Subsections (subsection), which need to be compiled two times to generate a TOC file (table of contents). The second time is based on the TOC real catalogue.

After the sample is added to the catalog, the results are as follows:

6) Summary

Article/report document categories can have summaries, and you can insert summaries between \maketitle and \tableofcontents, as follows:

\begin{abstract}the tale, the parable, and the Fable is all common and popularmodes of conveying instruction. Each are distinguished by its ownspecial characteristics.\end{abstract}

The summary is marked with \begin{abstract} \end{abstract}, and the summary is automatically left and right indented, with the results of typesetting such as:

7) footnote and side note

You can use \footnote{} to add a footnote \marginpar{}, and the contents of the footnote and side note are written inside {}.

Modify the first section to read as follows:

An ant\footnote{mayi in Chinese} went to the bank of a river to quench it thirst, and being carried away by the rush of T He stream, was at the point of drowning. A dove\marginpar{pigeon} sitting on a tree overhanging the water plucked a leaf and let it fall into the stream close to H Er. The Ant climbed onto it and floated in safety to the bank.

Post-compilation results such as:

To be coutinued ...

Learn to use latex typography

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.