I'm new in LaTeX and I'm trying to use the environments \subfigure and \subcaption. The two images inside the main image are OK, but the image containing the other two isn't in the correct position. And, in the code, when I write some text at the bottom of the figure, then it appears up, and the figure in the middle of the next page. I share with you this image so you can see my situation:
Page 9:
Page 10:
and the code:
La arquitectura de UFSBI se muestra en la figura
\ref{fig:disenoUFSBI}.
\begin{figure}
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=0.9\linewidth, height=5cm]{Architecture}
\centering
\caption{Architecture of UFSBI}
\label{fig:architecture}
\end{subfigure}
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=0.9\linewidth, height=5cm, right]{Diagram}
\centering
\caption{Module Inter-connection diagram}
\label{fig:interconnectionUSBF}
\end{subfigure}
\caption{UFSBI Design}
\label{fig:disenoUFSBI}
\end{figure}
Afeter aa sfdasdf asdfas dfasd fasdfas df.as .fas.d f.asd.fa.sd.f .sad.f .asd.f.a sd.f.a sd.f. as.df. as.df. as.
Can someone help me? Thanks from before.


figureenvironment float to some other place, that is precisely the purpose of a “floating” environment likefigure. Could you further clarify the issue, and include a complete code sample (from\documentclass{...}to\end{document}) that reproduces it? – GuM Nov 10 '16 at 23:00subfigureenvironment you're supposed to use\captionnot\subcaption, I think. – Torbjørn T. Nov 11 '16 at 00:00figureenvironments are floating environments (i.e. they can move around so you avoid bad pagebreaks), that's the point of them. I guess http://tex.stackexchange.com/questions/8625/force-figure-placement-in-text will solve your problem? – Torbjørn T. Nov 11 '16 at 00:05\begin{figure}[t]? The normal options are[t],[b], and[h], fortop,bottom, andhere, though you shouldn't usehby itself.... – jon Nov 11 '16 at 00:06figureare probably what is wanted here. – cfr Nov 11 '16 at 00:45