I am writing a document class report that has a maximum page limit. I tend to stay away from float environments for tables and figures since I like to have them where I code them in (I try [h], and sometimes it works, sometimes it doesn't).
For example, for figures I usually do this:
\begin{center}
\includegraphics[scale=0.6]{figure.png}
\captionof{figure}{caption}
\label{fig:figure}
\end{center}
But I have to make a subfigure for some of my report's pictures. Here is the code for the subfigure:
\begin{figure}[h]
\centering
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\linewidth]{figure1.png}
\caption{caption}
\label{fig:figure1}
\end{subfigure}
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\linewidth]{figure2.png}
\caption{figure2 caption}
\label{fig:figure2}
\end{subfigure}
\caption{figures}
\label{fig:figures}
\end{figure}
Is there a way to convert this into a non float environment or some package to ensure it will be always where I code it in?


figureenvironment it will float anyway? – May 04 '14 at 18:24figureandtablein LaTeX? – Werner May 04 '14 at 18:24Hoption (from thefloatpackage). If the figure doesn't float anymore, I can't see why the subfigures would. – Bernard May 04 '14 at 18:29