一些Latex使用方法记录
插入图片
\begin{figure}[H] %[]中为图片放在当前位置
\centering %居中
\includegraphics[width= 3.3in]{figure/fig2.pdf} %[宽度(A4两栏)]{图片位置}
\caption{this is a figure} %标题
\label{fig2} % 标签
\end{figure}
一张图片多组小图
\begin{figure}[htbp] %图片位置随文章浮动,自动选择合适的位置
\centering %图片全局居中
\subfigure[]{
\label{Fig.sub.1}
\includegraphics[width=0.23\textwidth]{figure/fig3(a).pdf}} %图片宽度:0.23*文章宽度
\subfigure[]{
\label{Fig.sub.2}
\includegraphics[width=0.23\textwidth]{figure/fig3(b).pdf}}
\subfigure[]{
\label{Fig.sub.1}
\includegraphics[width=0.23\textwidth]{figure/fig3(c).pdf}}
\subfigure[]{
\label{Fig.sub.2}
\includegraphics[width=0.23\textwidth]{figure/fig3(d).pdf}}
\caption{this is a figure}
\label{Fig3}
\end{figure}
A4两栏,2*2小图
算法
\begin{algorithm}[htb]
\renewcommand{\algorithmicrequire}{ \textbf{Input:}} %重新定义require
\renewcommand{\algorithmicensure}{ \textbf{Output:}} %重新定义ensure
\caption{Original DMP}
\label{alg:Original DMP}
\begin{algorithmic}[1] %这个1 表示每一行都显示数字
\REQUIRE ~~\\ %算法的输入参数:Input
x,y,z
\ENSURE ~~\\ %算法的输出:Output
a,b,c;
\STATE
\label{ code:fram:extract }%对此行的标记,方便在文中引用算法的某个步骤
\STATE
\label{code:fram:trainbase}
\STATE
\label{code:fram:add}
\STATE
\label{code:fram:classify}
\RETURN ; %算法的返回值
\end{algorithmic}
\end{algorithm}
公式
\begin{equation}
\end{equation}
公式编写参考latex公式
参考文献
\begin{thebibliography}{00}
\bibitem{b1}
\bibitem{b2}
\bibitem{b3}
\bibitem{b4}
\end{thebibliography}