*一个空文档模板:

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\title{Empty Article}
\author{apc999}
\date{\today}
\begin{document}
\maketitle
Put your text here
\end{document}
*改变文档边距
在tex文档头部引用geometry宏包并加入边距参数:
\usepackage[top=1.0cm,right=0.5cm,bottom=1.0cm,left=0.5cm]{geometry}*插入数学公式
\begin{eqnarray}
E=MC^2
\label{eq:relativity}
\end{eqnarray}*插入图片
首先需要在tex文档头部引用graphicx这个宏包
\usepackage{graphicx}在需要插入图片的地方:\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{foo.eps}
\caption{caption of figure foo}
\label{fig:foo}
\end{figure}*插入子图
首先需要在tex文档头部引用subfigure这个宏包
\usepackage{subfigure}然后在你需要插入图片的地方:\begin{figure}
\centering
\subfigure[caption of foo]{
\label{fig:subfigure:foo}
\includegraphics[width=0.48\textwidth]{foo.eps}}\hfill
\subfigure[caption of bar]{
\label{fig:subfigure:bar}
\includegraphics[width=0.48\textwidth]{bar.eps}}
\caption{caption of subfigures foo and bar}
\label{fig:subfigure}
\end{figure}
** subfig包用法与subfigure基本一样,就是把\subfigure换成\subfloat**小的"花招":子图之间可以用\vline加一条竖线隔开,或者用\hfill,\hspace等命令控制间隔
*插入表格

\centering
\begin{table}[h]
\begin{tabular}{ll}
x & x \\
x & x
\end{tabular}
\caption{caption of table foo}
\label{tab:foo}
\end{table}
更多table的用法*数学环境中大括号

\begin{eqnarray*}
y = \left\{ \begin{array}{ll}
a & \textrm{if $d>c$}\\
b+x & \textrm{in the morning}\\
l & \textrm{all day long}
\end{array} \right.
\end{eqnarray*}
实际上还有一个更简单的做法--用cases环境. 不过需要amsmath这个package\usepackage{amsmath}
\begin{eqnarray*}
y = \begin{cases}
a & \textrm{if $d>c$}\\
b+x & \textrm{in the morning}\\
l & \textrm{all day long}
\end{cases}
\end{eqnarray*}
*贴源代码

\usepackage[]{listings}
\lstset{language=Python,tabsize=4}
\begin{lstlisting}
import sys
sys.stdout.write("Hello World")
\end{lstlisting}*引用一段话
\begin{quote}
the quoted text
\end{quote}*使用bibtex database file
\bibliographystyle{xxx} % 使用style文件xxx.bst
\bibliography{yyy} %使用reference 数据库文件yyy.bib"xxx可以为 IEEE, acm, plain, abbrv等等yyy为用户自己定制的bib文件
参考 BibTeX and bibliography styles
常用命令
\appendix: 这个命令本身不产生任何文本, 但是会改变其之后的section的标号
\hrule 产生一条水平线 http://www.personal.ceu.hu/tex/spacebox.htm
\gg,\ll 远远大于,远远小于
