Problem with Latex Figures Skipping Paragraphs

Asked

Viewed 5,730 times

3

Hello, a little more than a month ago I started using Latex to write my tcc, from a few days ago I started to insert figures and everything was going well, until suddenly when inserting more figures, some that were included before were unstructured. They just started skipping paragraphs, I thought maybe it was something lost in the middle of the text but I didn’t find anything like it.

I will try to explain what happens. What happens is as follows:

Source: Gonzales and Woods (2007)

[Paragraph]

[Imagery]

The image simply skips a following paragraph for no reason when it should actually appear above the source. Here is the code of the figure below:

    \begin{figure}[!htb]
    \caption{Exemplo de Histograma de uma imagem em escala de cinza.} 
    \centering
    \includegraphics[width=9.5cm]{Figuras/Figura_3_ExemploHistograma.png} \\
\end{figure}
Fonte: Gonzalez e Woods (2007). \\

Would anyone know possible problems that would be causing this? Thanks in advance.

2 answers

5

Try using the option [H] After the \begin{figure}. Still try the code below:

\begin{figure}[H]
    \IBGEtab{
        \caption{Exemplo de Histograma de uma imagem em escala de cinza.}
        \label{GrayScale}
    }
    {\includegraphics[width=9.5cm]{Figuras/Figura_3_ExemploHistograma.png}}
    {Fonte: Gonzalez e Woods (2007).}
\end{figure}
  • 1

    I already voted +1 because the answer is really very good. But it would be good to explain to the AP why these decisions (the h used to indicate the positioning of the figure as "here" [here], and the text "Source: ..." within the scope of the floating element). : ) P.S.: I did not understand the/the reason/need of the command \IBGEtab.

  • 1

    @Luizvieira, I saw reference to an Ibgetab in the package abntex2 (also called absurd technical norms...) that reformats the caption to conform to a norm (which in general I find ugly)...

  • Avelino, like +1

2

This answer is actually a longer comment...

As @Avelino very well said, \begin{figure}[H] can be used to force a figure to be inserted at that exact point. This operation force figures or tables to no longer be floating bodies.

However That’s usually bad for the construction of quality text: almost always generates additional white spaces (generates texts with more pages and worse aspect).

Usually agree (excuse the paternalism):

  1. use small sized figures
  2. let the figures float and refer to them by their label (e.g.: fig. label{Grayscale} is shown ......)
  3. force positions in special cases...
  • Hello, thank you all very much for the answers, and I apologize for the delay in responding, well at the end q the solution was what you said and above, the size of the figures were very large compared to the text of the page, this made the image skip parts of the text. The solution I found when I could not decrease the size of the images was to use the /pagebreak function for page breaking. Thank you again for your reply.

  • @Yuripires If you think this answer is the solution to your problem, do not forget to mark it with the right visa.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.