TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I'm doing something dumb here but I can't figure it out.

I am creating a .tex file with a header:

%% XXXXXXXXXXXXXX created this file.
breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
pdfauthor={Autogenerated by XXXXXX}}

Then a number of sections:

\section{\textsf{Section Name}}

Each containing several tables and graphs:

& 1 Month & 3 Month & 6 Month & Average & Total\tabularnewline
Data Title&-12.6867&-14.984&-19.1529&-15.9345&-95.6071\tabularnewline
\vspace*{.25 cm}


Each section is far larger than a page, but before each section I have a


For simple (ie very few sections / tables / graphs) the rendering to pdf via xelatex is often perfect. However once the document gets larger the tables are always in order but the graphs are all over the place - almost randomly.

I know I'm doing (or not doing) something really dumb here. I just want everything to appear in the order I write it.

Can anyone offer any assistance please?

share|improve this question
Hi Tom, welcome to TeX.sx. I removed the thanks which is just the style here. I also removed the sign off, which is not necessary as your user icon is placed with the question. – qubyte Dec 22 '11 at 15:51
up vote 3 down vote accepted

figures are floating environments, tabulars are not. So the tabulars go exactly where they are in the source, but LaTeX puts the figure where it thinks makes the document "look" the best.

My understanding is that even with the [h] or [h!] options to the figure environment the figure cannot always be placed "right here." LaTeX will disobey you.

A workaround (via Mark Mengel) would be to avoid the figure environment:

    {\center Figure \arabic{figure} #1\\ }

Then instead of a figure environment you can do:


Another workaround would be to hack the float-placement algorithms. But I don't know how to do that.

share|improve this answer
The caption package provides \captionof{figure}{This is the caption.}. To avoid a pagebreak between figure and caption, perhaps a minipage instead of center? Lastly, the float package provides the H float specifier, which basically disables floating. – Torbjørn T. Dec 22 '11 at 16:10
Ha, perfect, cheers! – Tom Dec 22 '11 at 16:18
@Tom: An upvote beats a cheers! – qubyte Dec 22 '11 at 16:32
@TorbjørnT. Agreed, the float package does the necessary hacking. I learned about it after I posted, but got the upvotes and accept before I could delete my inferior answer. – Matthew Leingang Dec 22 '11 at 18:22

Not knowing how large your figure and table floats are, it's hard (impossible?) to diagnose the problem fully. (From the [scale=...] options, though, I'm surmising that the figures are quite large.) You could try changing some of LaTeX's float-placement parameters and check if the float placement problems are at least partially alleviated. Start with the following settings:

share|improve this answer

Your Answer


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.