1

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:

enter image description here

Page 10:

enter image description here

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.

  • 4
    Welcome to TeX.SX! If your problem is that the contents of the figure environment float to some other place, that is precisely the purpose of a “floating” environment like figure. 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:00
  • Inside a subfigure environment you're supposed to use \caption not \subcaption, I think. – Torbjørn T. Nov 11 '16 at 00:00
  • The problem is that the all text that i write at the bottom of the image, appears at the top, the image is floating in the middle of the page, and that's not my purpose. – tonydelalg Nov 11 '16 at 00:02
  • It was wrong, but the "/subcaptions" doesn't fix my problem – tonydelalg Nov 11 '16 at 00:05
  • 1
    figure environments 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
  • Use \begin{figure}[t]? The normal options are [t], [b], and [h], for top, bottom, and here, though you shouldn't use h by itself.... – jon Nov 11 '16 at 00:06
  • @jon The red arrow suggests the OP wants not a float at all, doesn't it? In which case, the existing suggestions to not use figure are probably what is wanted here. – cfr Nov 11 '16 at 00:45
  • @cfr -- well, it sure looks that way now that the question has been edited. But before there was no picture and the title of the question does not suggest 'at the top of some arbitrary chunk of text'..! – jon Nov 11 '16 at 00:51

0 Answers0