Although I am putting the figures after some subsection, they do not appear in which I am putting in them.
-
2Check the answers to this question: Keeping tables/figures close to where they are mentioned. If that solves your problem, we'll close this as a duplicate.– Alan MunnMay 27, 2011 at 17:30
-
2Have a look at this question. (That one is about tables, but the answers also apply for figures and custom-made floats.)– lockstepMay 27, 2011 at 17:30
-
I used \begin{figure}[!htbp] but nothing happened.– HephaestusMay 27, 2011 at 18:28
-
1well something must have happened. What do you mean then by "don't appear"? Are they in the wrong place, or are they not there at all? Do you get an error? Do the captions show up, but not the figures? Do no figures show up, or just certain ones? You should edit your question to make this clearer.– Alan MunnMay 27, 2011 at 19:38
Add a comment
|
1 Answer
Alan Munn posted a link to Keeping tables/figures close to where they are mentioned. Here's some code showing a way mentioned there, using the placeins package:
\usepackage{placeins}
...
\FloatBarrier
\subsection{A subsection}
...
\begin{figure}[ht]
% your figure
\end{figure}
...
\FloatBarrier
\subsection{Another subsection}
The \FloatBarrier
command prevents floating of the figure into another subsection.