How to Use Subfigure in Latex

First add the subfigure macro package in the introduction area.

\usepackage{subfigure}

Suppose I want to arrange three images as three sub-images to solve the problem of cross-page arrangement of images, then use the following code:

\begin{figure}[h]
	\addtocounter{figure}{-1} %%%%%%%%%note1
	\centering
	\subfigure{
		\begin{minipage}[t]{1\linewidth}%%%%%%%%%note2
			\includegraphics[width=0.9\linewidth]{Index}%%%%%%%%%note3
		\caption{Image 1 Name}
		\label{0}
		\end{minipage}%
	}%

%%%%%%%%%note4
	\subfigure{
		\begin{minipage}[t]{1\linewidth}
				\includegraphics[width=0.9\linewidth]{Index}
			\caption{Image 2 Name}
			\label{1}
		\end{minipage}%
	}%


	\subfigure{
		\begin{minipage}[t]{1\linewidth}
			\includegraphics[width=0.9\linewidth]{Index}
		\caption{Image Name}
		\label{2}
		\end{minipage}
	}%
	
	\centering
\end{figure}


Description:
Note 1: Note that you need to subtract 1 from the image label manually when using a subfigure, because the larger image composed of three subfigures is also involved in counting. Note 2: This controls the width of each subgraph. For example, if you want to put 4 graphs in a row, set this to 0.25\linewidth. Note 3: This controls the size of each subgraph. Note 4: Note that this line (there may be several pictures) has been arranged, move to the next line.


Read More: