I suggest you load the subcaption package, which provides an environment called subfigure
. I further suggest you load the cleveref package to help streamline making cross-references to items such as subfigures.
\documentclass{article}
\usepackage{subcaption} % provides 'subfigure' environment
\usepackage[demo]{graphicx} % omit 'demo' option in real document
\usepackage[capitalize]{cleveref} % for "clever" cross-referencing
\begin{document}
\begin{figure}
\begin{subfigure}{0.475\textwidth}
\includegraphics[width=\linewidth]{fig1}
\caption{First subfigure} \label{fig:1a}
\end{subfigure}\hfill% leave no blank line between subfigures
\begin{subfigure}{0.475\textwidth}
\includegraphics[width=\linewidth]{fig2}
\caption{Second subfigure} \label{fig:1b}
\end{subfigure}
\caption{A figure with two subfigures} \label{fig:1}
\end{figure}
\noindent
A cross-reference to \cref{fig:1b}.
\end{document}
Addendum: If you don't need to cross-reference the subfigures individually, and if you're fine with providing a long caption that describes the contents of the two image files, there's certainly no need to load the subcaption
package or to place the image files in minipage
environments.
\documentclass{article}
\usepackage[demo]{graphicx} % omit 'demo' option in real document
\usepackage[capitalize]{cleveref} % for "clever" cross-referencing
\begin{document}
\begin{figure}
\includegraphics[width=0.475\textwidth]{fig1}
\hfill
\includegraphics[width=0.475\textwidth]{fig2}
\caption{Left-hand panel: taghyer jabejaei, $R$ is the reference configuration and $D$ is the deformed configuration. Right-hand panel: Salam Khub hasti density $\mathbf{f}$ agr bashe en ro dorost kard force density $\mathbf{t}$ at both points} \label{fig:m}
\end{figure}
\noindent
A cross-reference to \cref{fig:m}.
\end{document}
\label
-\ref
approach. Could you include a complete, minimal example that highlights your setup? We want to copy-and-paste-and-compile and see exactly what you're seeing.subfig
package and the normal\label
-\ref
mechanism.