5

I think this question is novel. Here is the problem I have. I have a relatively short piece of text associated with a lot of figures and a table. I want floats to appear on pages just for floats but in the order I specify. I have set all of the table and figure parameters to [hp] and placed them in the order I want them to appear in the source e.g.

Figure 1

Figure 2

Figure 3

Table 1

Figure 4

Figure 5

The problem I have is that no matter what I do the document typesets like this

Table 1

Figure 1

Figure 2

etc....

I have tried trashing the Aux files before typesetting. I am aware of the endfloats package but I still want latex to place the floats in between larger sections of txts in other parts of the document. Any help is greatly appreciated.

Thanks

user476160
  • 71
  • 1
  • 1
  • 3

3 Answers3

9

I'll try to explain why the fix by @user476160 (placement modifier hp instead of just p) works. A figure is a float, i.e. an element that cannot be broken across a page. The figure environment accepts a parameter list with placement hints:

\begin{figure}[placement parameters]
% ...
\end{figure}

The placement specifier h stands for here and places the figure approximately at the same point as in the source text. The placement specifier p puts the figure in a special page that contains only floats:

\begin{figure}[hp]
% ...
\end{figure}

Wikibooks has an excellent article on figure placement if you want to fine-tune your figure and table placement.

I also recommend posting LaTeX-related questions in the TeX Stack Exchange Q&A.

Community
  • 1
  • 1
Jaime Soto
  • 3,168
  • 1
  • 21
  • 19
2

Problem solved, the first figure in my list had the parameter [p] rather [hp]. This seemed to cause latex a lot of grief for some reason. Anyhow problem solved for now. The figures and txt all appear in the order I have specified.

user476160
  • 71
  • 1
  • 1
  • 3
1

It is quite easy. All you have to do is use this package.

\usepackage{float}

And you have to change the figure parameters to

\begin{figure}{H}
%..
\end{figure]}

Let me know if it works :)