Take the 2-minute tour ×
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
    
You should not use eqnarray since it has incorrect spacing and may print over the equation number. Use align instead. –  queueoverflow Jun 22 '13 at 10:36

1 Answer 1

up vote 11 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
    
FloatBarrier is all nice and well but it puts an additional constraint on figure placement that was not asked for not required to fulfil the aim of not splitting the list: Latex can no longer place the figure after an un-split list, which might be a better figure placement. –  noirdesir Feb 10 at 0:42

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.