Latex is a commonly used tool when writing papers and even some lectures. This blog post simply records some of the things latex uses.
Recently found an online latex website https://www.sharelatex.com/not to install Ctex on the computer.
1 Basic Modules
The most wanted question for a latex reader is what latex's "Hello World" program looks like. So here's a picture to show:
Latex is the control of typesetting through a number of column instructions. Some of the obvious parameters I would not explain. 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 many chapters chapter, and some of the layout of the paper, such as Ieeetran,sig-alternate, these two are a page divided into two columns, looking at the high-end.
% This is a prelude part of my job report
\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. Explain the cover and layout of the instructions after the start of the document content. Surround them with \begin{document} and \end{document}. There can be a summary, a lot of section and so common things.
Well, that's basically the latex process. The next thing we need to do is actually what we need to use and mend.
2 Common commands
2.1 An article is usually very long. Then you need to divide it into multiple sub files. Each file is a suffix of. Tex, which is added to the main file with command \input or \include.
\input{introduction}
\input{model1}
\input{model2}
\input{model3}
\input does not change the page when inserting a child file, \include Force a page change when inserting a child file
2.2 Reference references
\bibliographystyle{plain}
\bibliography{bib/tex}
Write references to a file with a. bib suffix name, such as Bib/tex.bib, and then use the two statements above. 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 Characteristics}, Author = {Ghose, Anindya and Ipeirotis, Panagiotis G}, Journal = {knowledge and Data Engineering, IE EE Transactions on}, volume = {}, Number = {Ten}, pages = {1498--1512}, year = {}, publisher = {IEEE}} @in PROCEEDINGS{ICDM, title={modeling and predicting the helpfulness of online reviews}, Author={liu, Yang and Huang, Xian Gji 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, Title={designing novel review ranking systems:predicting the usefulness and impact of reviews}, Author={ghose, Anindy
A and Ipeirotis, Panagiotis G}, Booktitle={proceedings of the Ninth International Conference on Electronic Commerce}, pages={303--310}, year={2007}, ORGANIZATION={ACM}}
There is a trick to get this: Enter the name of the paper you want to quote in Google Scholarship, then click the "Quote" link, and then tap "Import BibTeX", and the format of the quote comes 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 body, use \CITE{KDE}
It is worth noting that if your text does not refer to the article, it will not be available in the reference list of the generated PDF even if you have information about the article in the. bib.
2.3 Chapters
\section{model1}, \subsection{...}, \subsubsection{...} Wait a minute
2.5 Indent
To indent at the beginning of each paragraph, or not to indent: \indent \noindent
2.6 Line change: \
2.7 Mathematical formula
Remember to enclose the contents of the formula with $ $, or use \begin{equation} \end{equation}. The bold in the formula represents the 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 ^{exponent part}, subscript with _{subscript part}, score with \frac{molecule} {denominator}, Winedit also have very handy shortcut button:
2.8 List
\begin{enumerate}
\item..
\item..
\end{enumerate}
This is a list with serial numbers. Replace enumerate with itemize, which is without 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}. Pictures can be cropped, use such as: \includegraphics[trim={0 4cm 0 2cm},clip,width=0.5\textwidth]{char_cate2.pdf}
If the layout is two columns, the picture is larger want to cross two columns, you can use \begin{figure*}
Show more than one image by side:
\BEGIN{FIGURE*}[HTBP]
\centering
\begin{subfigure}{.33\textwidth}
\centering
\includegraphics[ trim={1cm 4cm 1cm 3cm},clip,width=1\textwidth]{charts/geo_auc.pdf}
\caption{gpredictors}
\LABEL{FIG:G_AUC }
\end{subfigure}%
\begin{subfigure}{.33\textwidth}
\centering
\includegraphics[trim={1cm 4cm 1cm 3cm},clip,width=1\textwidth]{charts/mobility_auc.pdf}
\caption{u predictors}
\label{fig:u_auc}
\end{subfigure}
\begin{subfigure}{.33\textwidth}
\centering
\includegraphics[trim={1cm 4cm 1cm 3cm},clip,width=1\textwidth]{charts/ratings_auc.pdf}
\caption{r predictors.}
\LABEL{FIG:R_AUC}
\end{subfigure}
\CAPTION{AUC Performance comparison for individual predictors of Different groups.}
\label{fig:heatmap}
\end{figure*}
2.10 Table
Essentially, you control the form box with instructions. Note (1) \label{tab:d2} to be placed before \end{table}, can not be placed after \begin{table}, or reference \ref{tab:d2} when the problem (2) forms and other elements can not be used in footnote, We're going to use Footnotemark+footnotetext instead.
\begin{table}
\centering
\caption{basic statistics of Three cities}
\begin{tabular}{|c|c|c|l|} \hline
City&\ #column1 &\ #column2 &\ #column3 \footnotemark\\ \hline
shanghai&127,503 & 80,914& 7,190 \ \hline
beijing&10,396 & 6,772&5,917\\ \hline
Guangzhou & 1,273 & 1,844 & 1,747 \
\hline\end{tabular}
\LABEL{TAB:D2}
\end{table}
\footnotetext{we only count the shops which has at least one review in 2012.}
Well, that's all I've used last time. Hope to look back later, can be used as a reference for memory. Long-term updates.
Other:
A less brief introduction to LATEX Http://www.mohu.org/info/lshort-cn.pdf
Mathematical symbols:
From:http://www.cnblogs.com/sylvanas2012/archive/2013/05/28/3102880.html