67

Possible Duplicate:
Keeping tables/figures close to where they are mentioned

I want to make it like this:

text
image
text
image

But even if I put [h!] to the position the figures, the figure is moved to the next page because it is too large. The text which should be under the figure goes up over it!!!

How I can fix it?

1
  • 2
    You can simply use [H], this forces the figure to be placed exactly Here. Or even better, don't use a float environment at all if you don't want the figure to float.
    – DerWeh
    Feb 28, 2018 at 8:43

1 Answer 1

119

You can use \FloatBarrier from the placeins package to prevent floats (figures) pass some point such as start of the text that follows. For example:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{placeins}
\begin{document}
Text
\begin{figure}[h!]
\includegraphics{pic1.jpg}
\end{figure}
\FloatBarrier
Text
\begin{figure}[h!]
\includegraphics{pic2.jpg}
\end{figure}
\FloatBarrier
Text
\end{document}
0

Not the answer you're looking for? Browse other questions tagged .