General summary of Latex

Source: Internet
Author: User

Latex is a commonly used tool when writing papers and even some of the course reports. This blog post simply records some of the commonly used latex content.

1 Basic Modules

For those who have not used latex, the most wanted question is what Latex's "Hello World" program looks like. Then put a picture below to show:

Latex is the control of typography through a number of column directives. I will not explain some of the parameters at a glance. The first line of \documentclass{article},article refers to the general document format. Can be replaced, other, such as book, is the layout of books, divided into a number of chapters chapter, as well as some of the layout of the paper, such as Ieeetran,sig-alternate, these two are a page in two columns, looking very high-end.

% This is the prelude part of a job report for me
\documentclass[a4paper,11pt]{article}\author{leavingseason}\title{hello World}\date{\today}\usepackage[english] {babel}\usepackage{hyperref}\usepackage{amsmath}\usepackage{graphicx}\usepackage{bm}\usepackage{xcolor}\ usepackage{float}\usepackage{geometry}\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}

\usepackage refers to the need to use some macro packages. After the instructions for the cover and layout are finished, the document content is started. Surrounded by \begin{document} and \end{document}. There can be a summary, a lot of sections and so on common things.

Well, basically the latex process is like this. What we want to do next is what we need to do in the real world.

2 Common commands

2.1 An article is usually very long. Then you need to divide it into multiple sub-files. Each file is suffixed with. Tex, which is added to the master file with the command \input or \include.

\INPUT{INTRODUCTION}\INPUT{MODEL1}\INPUT{MODEL2}\INPUT{MODEL3}

\input does not change the page when inserting the sub-file, \include forces the page to be changed when inserting the sub-file

2.2 References

\bibliographystyle{plain}\bibliography{bib/tex}

Write references to a file with a suffix of. Bib, such as Bib/tex.bib, and then use the two statement above to do so. The contents of the. bib file are as follows

 @article {KDE, title = {Estimating the helpfulness and economic impact of product reviews:mining text and reviewer C Haracteristics}, Author = {Ghose, Anindya and Ipeirotis, Panagiotis G}, Journal = {knowledge and Data Engineering, IEEE Transactions on}, volume = {23°c}, Number = {Ten}, pages = {1498--1512}, year = {), publisher = {IEEE}} @inproceeding S{ICDM, title={modeling and predicting the helpfulness of online reviews}, Author={liu, Yang and Huang, Xiangji and an, Aijun and Yu, Xiaohui}, Booktitle={data Mining, 2008. ICDM ' 08. Eighth IEEE International Conference on}, pages={443--452}, year={2008}, organization={ieee}} @inproceedings {ICEC, titl E={designing novel review ranking systems:predicting the usefulness and impact of reviews}, Author={ghose, Anindya and I Peirotis, Panagiotis G}, Booktitle={proceedings of the Ninth International Conference on Electronic Commerce}, pages={30 3--310}, year={2007}, ORGANIZATION={ACM}} 

There's a trick to getting something like this: Enter the name of the paper you want to quote in Google Scholar, then click on the "Reference" link, then "Import BibTeX" and the reference format will come out.

@article {kde,article={} ... In this command, KDE is the index number of this quoted article, which you define yourself. To quote him in your text, use \CITE{KDE}

It is important to note that if your body does not reference the article, then even if there is information about the article in. Bib, the article will not be available in the reference list of the generated PDF.

2.3 Chapters

\section{model1}, \subsection{...}, \subsubsection{...} Wait a minute

2.5 Indent

At the beginning of each paragraph you want to indent, or do not indent: \indent \noindent

2.6 line break: \ \

2.7 Mathematical formulas

Remember to enclose the contents of the formula with $ $, or use \begin{equation} \end{equation}. The formula bold denotes a vector, with \mathbf{}:

\begin{equation}\label{eq:rbf}\phi (\mathbf{x}|\mathbf{\mu},\sigma) = f (\frac{(\mathbf{x}-\mathbf{\mu}) ^T (\MATHBF {X}-\MATHBF{\MU})}{\sigma^2}) \end{equation}

Index with ^{Index part}, subscript with _{subscript part}, score with \frac{numerator} {denominator}, Winedit also has a very handy shortcut button:

2.8 List

\begin{enumerate}

\item.

\item.

\end{enumerate}

This is a list with an ordinal number. Change the enumerate to itemize, which is not with the serial number. For example:

2.9 Insert Picture:

\begin{figure}[htbp]\centering\includegraphics[width=0.8\textwidth]{pic/timeliness. Jpg}\caption{an Example of review helpfulness vs. time of Review.} \label{fig:timeliness}\end{figure}

To refer to a picture, use \ref{fig:timeliness}

Transferred from: http://www.cnblogs.com/sylvanas2012/archive/2013/05/28/3102880.html

General summary of Latex

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.