This question was asked, but I don't seem to resolve my case by adapting solutions from others.
I am simply trying to put two figures side by side. However, regardless of the linewidth setting, my figures constantly placed top and bottom. My code is very simple.
\begin{figure}[h!]
\centering
\begin{subfigure}{.5\linewidth}
\includegraphics[width=\linewidth]{pic1.jpg}
\caption{pic1caption}
\end{subfigure}
\begin{subfigure}{.5\linewidth}
\includegraphics[width=\linewidth]{pic2.jpg}
\caption{pic2caption.jpg}
\end{subfigure}
\caption{Figure caption}
\end{figure}
Any help / pointer would be appreciated!
\documentclass{...}
and ending with\end{document}
. – skpblack Oct 15 '14 at 4:37\caption
in each subfigure instead of the option of the command\subfigure[caption]
where you should add each subcaption, and the\caption
is for the set of subfigures. Take a look that\subfigure
is a command or macro, bot an environment. Maybe you're confused with the usage of thesubfig
packages that replaces thesubfigure
one that is deprecated. – Aradnix Oct 15 '14 at 4:41