latex使用记录使用latex一下排版多列子图,如有错误,恳请指正
使用subfloat要导入包
\usepackage{subfig}
\usepackage{subcaption}
\begin{figure}[H]%H是在当前位置插入,[htbp]t:top页面上,b:下,p:浮动,H 要实现此浮动说明符,必须使用软件包\usepackage {float}
\centering %图片和所有子图大标题居中设置
\subfloat[子图1小标题]{\includegraphics[width=0.3\columnwidth]{pic1.png}%列宽的0.3,会自动编号(a)
\label{pic1xxx}%标签,以便在文中引用
}
\hfill
\subfloat[子图2小标题]{\includegraphics[width=0.3\columnwidth]{pic2.png}
\label{pic2xxxx}
}
\hfill
\subfloat[子图3小标题]{\includegraphics[width=0.3\columnwidth]{main_text/pic/信号数据可视化/5dB信号图样.png}
\label{pic3xxxx}
}
\\图*\quad \zihao{5}输入信号形式 %子图大标题
\end{figure}
伪代码
%使用之前要导包
\usepackage{algorithm}
\usepackage{algpseudocode}
\floatname{algorithm}{算法}
\begin{algorithm}[H]
\caption{DSS-PCNN}
\begin{algorithmic}[1]
\State 生成随机矩阵,以初始化各节点网络参数 $W_{i}^j$, $j = 1,2 \cdots,{J}$,$i = 1,2,\cdots,l$
\For{$epoch$}
\For{$batch$}
\For{每个 SU-$j$, $j = 1,2 \cdots ,{J}$}
\State 根据(10)进行局部训练$ \rightarrow W_{i}^{j}$
\EndFor
\State 参数共享:$\overline {{W_1}} = \frac{1}{J}\sum\nolimits_{j = 1}^J {W_1^j}$
\State 根据(11)更新浅层网络
\EndFor
\EndFor
\end{algorithmic}
\end{algorithm}