latex

本文详细介绍了在LaTeX中如何正确地插入图形并利用子图宏包(subfigure)实现多行多列的图片布局。通过具体示例展示了如何设置图形位置、尺寸、标题及引用标签。

.sty宏包不存在的问题

CTex安装后会自动安装好各种依赖包,
因此,先安装好CTex,再安装TexStudio;

图包

% 引入图包
\usepackage{graphicx}
% 使得图描述居中
\usepackage{caption}
% 多行或多列的图
\usepackage{subfigure}

正常的图

% figure加* 实现跨栏显示图片
\begin{figure*}[!t]
	\centering
	% Requires \usepackage{graphicx}
	\includegraphics[scale=0.6]{./image/SFnet.png}
	\centering
	\caption{Our SFnet framework. Input Best is the selected duide image, and Input Test is the image to be predicted.}
	% label中的内容作为‘引子’在正文中引用  正文中的用法:\ref{fig:SFnet_framework}
	\label{fig:SFnet_framework}
\end{figure*}

多行多列的图

\begin{figure}[htbp]
	\centering	
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select00.png}
			%\caption{fig1}
		\end{minipage}%
	}%
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select01.png}
			%\caption{fig2}
		\end{minipage}%
	}%
	% 换行
	\quad
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select10.png}
			%\caption{fig2}
		\end{minipage}
	}%
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select11.png}
			%\caption{fig2}
		\end{minipage}
	}%
	\quad
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select20.png}
			%\caption{fig2}
		\end{minipage}
	}%
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select21.png}
			%\caption{fig2}
		\end{minipage}
	}%
	\quad
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select30.png}
			%\caption{fig2}
		\end{minipage}
	}%
	\subfigure[]{
		\begin{minipage}[t]{4cm}
			\centering
			\includegraphics[width=1.5in]{./image/select31.png}
			%\caption{fig2}
		\end{minipage}
	}%	
	\centering
	\caption{Imagse selected by the selection module. (a) The first image to be predicted. (b) Corresponding the selected guide image for (a). (c) The second image to be predicted. (d) Corresponding the selected guide image for (c). (e) The third image to be predicted. (f) Corresponding the selected guide image for (e). (g) The fourth image to be predicted. (h) Corresponding the selected guide image for (g). }
	\label{fig:selected_images}
\end{figure}

#一个subfigure中可以添加多个\includegraphics[width=1.5in]{./image/select00.png}
在这里插入图片描述

\begin{figure}[htbp]
	\centering	
	\subfigure[]{
		\begin{minipage}[t]{2.7cm}
			\centering
			\includegraphics[width=1in]{./image/select00.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select10.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select20.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select30.png}\vspace{7pt}
			%\caption{fig1}
		\end{minipage}%
		
	}%
	\subfigure[]{
		\begin{minipage}[t]{2.7cm}
			\centering
			\includegraphics[width=1in]{./image/select01.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select11.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select21.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select31.png}\vspace{7pt}
			%\caption{fig2}
		\end{minipage}%
	}%
	\subfigure[]{
		\begin{minipage}[t]{2.7cm}
			\centering
			\includegraphics[width=1in]{./image/select02.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select12.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select22.png}\vspace{7pt}
			\includegraphics[width=1in]{./image/select32.png}\vspace{7pt}
			%\caption{fig2}
		\end{minipage}%
	}%
	% \quad	
	\centering
	\caption{Imagse selected by the selection module. The first column is the image to be predicted. The second column is the selected guide image. The third column is an image that is not selected as the guide image.}
	\label{fig:selected_images}
\end{figure}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值