Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Given following situation:

\begin{figure}[ht!]
    ...
\end{figure}
\begin{equation}
    ...    
\end{equation}
Some one-line text.
\begin{eqnarray}
    ...
    ...
\end{eqnarray}

how can I make sure that the float doesn't get placed between the equation and the equation array? Also the part to protect goes over two pages, if that's of any importance.

share|improve this question

1 Answer

up vote 10 down vote accepted
  • The placeins package gives the command \FloatBarrier, which will make sure any floats will be put in before this point.

  • The flafter package ensures that floats don't appear until after they appear in the code.

This means that you could use something like:

\usepackage{placeins} % put this in your pre-amble
\usepackage{flafter}  % put this in your pre-amble

...
\begin{figure}[ht!]
...
\end{figure}
\FloatBarrier % new bit
\begin{equation}
...    
\end{equation}
Some one-line text.
\begin{eqnarray}
...
...
\end{eqnarray}
% with the flafter package, this figure won't appear before this point
\begin{figure}[ht!]
...
\end{figure}

On another note, you might like to see this post: \eqnarray vs \align

share|improve this answer
Seems to work fine. Thanks for the link! While eqnarray doesn't cause any issues in my current work, I'll keep in mind that there are some drawbacks and will use align in the future. – htorque Aug 17 '11 at 12:46
1  
You're welcome; I made an edit to include the flafter package, which might also be of interest. – cmhughes Aug 17 '11 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.