Im still searching and trying to manage with this float figures but with no success. I really need that my figures stay right at the place that they are called, not on the next page! My document is something like this:

Executamos o algoritmo, geramos nossos dados e plotamos o nosso gráfico. Vide Figura ~\ref{fig:exampleFig5}.

\begin{figure}[htbp] \centering \includegraphics[width=.7\textwidth]{alg3.png} \caption{} \label{fig:exampleFig5} \end{figure}

O resultado do gráfico não representa uma reta, logo, teremos que analisar o comportamento deste algoritmo. Aplicamos o log dos valores do eixo y e replotamos o gráfico. Vide Figura ~\ref{fig:exampleFig6}.

\begin{figure}[htbp] \centering \includegraphics[width=.7\textwidth]{alg3y.png} \caption{} \label{fig:exampleFig6} \end{figure}

Com o grafico gerado, continuamos sem saber a característica deste algoritmo. Vamos tirar o log do eixo x e novamente replotar o gráfico. Vide Figura ~\ref{fig:exampleFig7}.

\begin{figure}[htbp] \centering \includegraphics[width=.7\textwidth]{alg3xy.png} \caption{} \label{fig:exampleFig7} \end{figure}

The text is in portuguese, but this doesnt matter. The question is: why the figures are going to the next page if i call them right after the text with this: [htbp] ?

Sorry, i dont know how to use the code format in this editor

marked as duplicate by Werner floats Mar 16 '16 at 0:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Try using the package \usepackage{float} and insert H instead of htbp.

H places the float at precisely the location in the LaTeX code (from https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions)

  • Actually it really worked. I was trying to use h instead of H ... But it created some strange spaces before and after section number 5: puu.sh/nI3zW/31ec740528.png Do you have any idea why this is happening? – GGirotto Mar 16 '16 at 0:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.