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?
Asked
Active
Viewed 1.2k times
3
2 Answers
6
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}
Enno
- 606
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}
Cathode
- 330
- 2
- 12
\clearpagejust before the bibliography or you can use theplaceinspackage and the\FloatBarriercommand just before the bibliography – Guido Jul 23 '16 at 17:49