I am using the following LaTeX code to put four figures in two rows with two figures side by side so that both of them are on a line and have a one common caption. Unfortunately when I am using the caption the LaTeX file does not execute properly. How can I do the above procedure? There is other code that does not work. I am using MiKTeX 2.8 and TeXnicCenter stable 2.3.
Here is my code:
\begin{figure}[htp]
\begin{tabular}{cc}
% Requires \usepackage{graphicx}
\includegraphics[width=13cm]{fig1.eps}&
\hspace{-5cm} \includegraphics[width=13cm]{fig2}\caption{}\
\includegraphics[width=13cm]{fig3.eps}& \hspace{-5cm} \includegraphics[width=13cm]{fig4.eps}\caption{}\
\end{tabular} \end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SECOND CODE IS
\begin{figure}
\centering
\begin{tabular}{cc}
\includegraphics{fig1} &
\includegraphics{fig2}
\end{tabular}
\caption{.....}
\end{figure}
\begin{figure}
\centering
\begin{tabular}{cc}
\includegraphics{fig3} &
\includegraphics{fig4}
\end{tabular}
\caption{.....}
\end{figure}
\documentclass{...}
and ending with\end{document}
.SECOND CODE
not work?