4

I work in a simple document which contains text then a figure. It happened that there is not enough space after the text to fit the figure in the first page. Latex placed the figure in page 2 and placed the References at the bottom of page 1. It is not right for me to see the References before the figure. I want to References to be always at the end. However, in future when I expand the document, if it is normal text (non References) I want Latex to place the text in the empty space if the figure can not fit in that space. How to do this?

2

2 Answers 2

7

You can use \FloatBarrier from the placeins package. It prevents your floats from being moved behind this barrier. Example:

\documentclass{article}
\usepackage{placeins}
\begin{document}
Some dummy text
Image
\FloatBarrier
More Text or your references
\end{document}
2

You could use the H option for float placement from the float package, which forces the float to be placed right where you positioned it in your code.

Example:

\documentclass{article}
\usepackage{float}
\begin{document}
Lorem ipsum...
\begin{figure}[H]
the figures content
\end{figure}
\end{document}
2
  • It should be [h], but otherwise a good suggestion
    – Dai
    Commented Dec 7, 2020 at 11:46
  • @Dai Nope, the float package has the H option. Commented Jan 11, 2021 at 13:53

You must log in to answer this question.

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