本文主要介绍了一些Latex写文档时,一些常见的用法【持续更新中......】
\title{ 文档标题 }
\author{
作者1 \footnote{电子邮件: [email protected]}, 作者2 \\
系别:某某系别 \\
指导老师:赵老师 \\
}
\date{2017年01月11日}
\begin{abstract}
摘要内容 \\
\textbf{ 关键词:人脸识别,LBP,BP神经网络 }
\end{abstract}
\section{相关算法及其原理介绍}
\subsection{BP神经网络}
\subsection{LBP特征}
\begin{enumerate}[1)]
\begin{spacing}{1.3} % 行距
\item 第一点
\item 第二点
\item 第三点
\end{spacing}
\end{enumerate}
\begin{figure}
\centering
\includegraphics[width=0.4\textwidth]{./images/xxx.jpg}
\caption{文字说明图片}
\end{figure}
\newpage
-- 7.1 不换行输入公式:$ 公式 $
$S_j = \sum_{i=0}^{m-1}w_{ij}x_i + b_j$
-- 7.2 换行输入公式:\$$ 公式 \$$ (两个$符号,没有\斜线)
$$ S_j = \sum_{i=0}^{m-1}w_{ij}x_i + b_j $$
-- 7.3 集群输入公式,并且公式后带有编号:
\begin{gather}
S_j = \sum_{i=0}^{m-1}w_{ij}x_i + b_j
x_j = f(S_j)
\end{gather}
\begin{eqnarray*}
f'(x) &=& \frac{Ae^{-\frac{x}{B}}}{B(1 + e^{-\frac{x}{B}})^2}\\
& = & \frac{1}{AB}\cdot\frac{A}{e^{-\frac{x}{B}}}\cdot(A-\frac{A}{1 + e^{-\frac{x}{B}}})\\
& = & \frac{f(x)[A - f(x)]}{AB}
\end{eqnarray*}
\usepackage{url}
\url{http://blog.csdn.net/houchaoqun_xmu/article/details/53948647}
\begin{table}[!hbp]
\begin{spacing}{1.5}
\caption{基于20组测试数据的结果比较}
\end{spacing}
\begin{spacing}{1.5}
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
& 训练样本 & 训练时间 & 基于模型的预测时间 & 准确率 \\
\hline
未加入训练样本 & 100 & 1114.200249 秒 & 每组1s 内 & 68.421053 \% \\
加入训练样本 & 117 & 914.200249 秒 & 每组1s 内 & 100.0\% \\
\hline
\end{tabular}
\end{spacing}
\end{table}
-- 编写好bib内容后,进行LatexPDF编译,再进行Bib编译,再进行LatexPDF编译
@incollection{BP,
author = {Rumelhart, David E. and Hinton, Geoffrey E. and Williams, Ronald J.},
chapter = {Learning Representations by Back-propagating Errors},
title = {Neurocomputing: Foundations of Research},
editor = {Anderson, James A. and Rosenfeld, Edward},
year = {1988},
isbn = {0-262-01097-6},
pages = {696--699},
numpages = {4},
url = {http://dl.acm.org/citation.cfm?id=65669.104451},
acmid = {104451},
publisher = {MIT Press},
address = {Cambridge, MA, USA},
};
@BOOKLET{BP2,
author = {ACdreamers},
title = {BP neural network},
address = {博客:CSDN},
url = {http://blog.csdn.net/acdreamers/article/details/44657439},
year = {2015}
};
@article{LBP,
author = {Timo Ojala, Matti Pietikainen and Topi Maenpaa},
title = {Gray Scale and Rotation Invariant Texture Classification with Local Binary Patterns},
journal = {IJCV},
volume = {60},
number = {2},
pages= "91-110",
year = {2004}
};
@BOOKLET{MatlabPython,
author = {Houchaoqun},
title = {实现python调用Matlab的.m文件},
address = {博客:CSDN},
url = {http://blog.csdn.net/houchaoqun_xmu/article/details/53948647},
year = {2016}
};
参考图如下所示:
\usepackage{listings}
\begin{lstlisting}[ language=C]
int main(int argc, char ** argv)
{
printf("Hello world! \n");
return 0;
}
\end{lstlisting}
\usepackage{algorithm,algorithmic}
\usepackage{multicol}
\begin{algorithm}
\caption{Calculate $y = x^n$}
\label{alg1}
\begin{multicols}{2}
\begin{algorithmic}[1]
\REQUIRE $n \geq 0 \vee x \neq 0$
\ENSURE $y = x^n$
\STATE $y \Leftarrow 1$
\IF{$n < 0$}
\STATE $X \Leftarrow 1 / x$
\STATE $N \Leftarrow -n$
\ELSE
\STATE $X \Leftarrow x$
\STATE $N \Leftarrow n$
\ENDIF
\WHILE{$N \neq 0$}
\IF{$N$ is even}
\STATE $X \Leftarrow X \times X$
\STATE $N \Leftarrow N / 2$
\ELSE[$N$ is odd]
\STATE $y \Leftarrow y \times X$
\STATE $N \Leftarrow N - 1$
\ENDIF
\ENDWHILE
\end{algorithmic}
\end{multicols}
\end{algorithm}
-- 算法的效果图:
14. Winedit 编辑内容的时候,自动换行:
把最下边状态栏里的wrap单击点亮即可,如下图所示: