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.

Why do the figures appear BEFORE instead of AFTER the section title ???

\documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article}

\usepackage[top=1cm,right=1cm,bottom=1cm,left=1.5cm,noheadfoot]{geometry}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,patterns,calc}
\usepackage[heightadjust=all]{floatrow}
\usepackage[labelformat=empty]{caption}

\begin{document}

\section*{Why is this section title BELOW the figures ???!!!}

\begin{figure}
\begin{floatrow}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm,rotate=45] (0,0) rectangle (2,2);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 1.}
\label{fig:_____}}
\hspace{0cm}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm] (0,0) circle (3);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 2.}
\label{fig:_____}}
\end{floatrow}
\end{figure}

The figures should appear between the section title and THIS line !!!

\end{document}
share|improve this question
    
figure is a float... so it moves around, either on the current page, or to following pages. –  Werner Oct 2 '12 at 21:48
    
The following might be a duplicate: How do I ensure that figures appear in the section they're associated with? Please give some feedback. –  Werner Oct 2 '12 at 21:49
    
    
can we vote to close as a duplicate of the links that @Werner provided? Please let us know :) –  cmhughes Oct 3 '12 at 3:39

1 Answer 1

up vote 6 down vote accepted

The Figure environment "floats" to find an optimal position on the page. When you begin a figure, you can use the options [htbp!] to specify whether the figure should go "here", the "top" of this page, the "bottom" of this page, or a special "page" reserved for floats. LaTeX, in its infinite wisdom, will sometimes prevent you from putting a figure in an "ugly" place, but you can (sort of) override its decision using the "!" option. When you haven't used any option, the environment assumes that you provided [tbp], and it's choosing to put the figure at the top of the page, above where your section goes. So using

\begin{figure}[bp!]

should fix your problem.

share|improve this answer
    
For 'prevent' read 'discourage'; there is always the [H] option provided by the float package. –  Ian Thompson Oct 2 '12 at 21:55
    
Only \begin{figure}[h!] fixed my problem. THX ! –  Petoetje59 Oct 2 '12 at 21:59
    
@IanThompson on H a comment on a question earlier today: tex.stackexchange.com/questions/74993/… –  David Carlisle Oct 2 '12 at 22:03
    
@DavidCarlisle --- indeed. I just wanted to point out that it is not impossible. Anyway, it's not as if I created the thing! –  Ian Thompson Oct 2 '12 at 22:35

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.