Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?
|
|
|||||||||
|
|
Easing the float placement by options: You could use more positioning options. Not just
Useful package regarding float placement:
Further reading: Because it's an important and not easy subject, there's a lot of material to be found, for instance in FAQ collections. There's an extensive document dealing with graphics inclusion, manipulation and placement:
The interesting part for your question may be Part IV: The Figure Environment beginning on page 55. There is also Frank Mittelbach's excellent answer describing the floating mechanism and related options in great detail: |
|||||||||||||
|
|
Controlling floats isn't difficult once you understand what LaTeX is trying to do with them. Requisite FAQ link: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats Three things, broadly speaking, will prevent floats from staying close to their definition:
Above all, forget about formatting your floats until the document is absolutely finished. You'll produce better results and write the document faster that way. |
|||||||
|
|
Check out the |
||||
|
|
|
try
it prevents placing floats before the section. |
|||
|
|
|
Fairly often all that you need is to declare tables and figures earlier, before the first point of reference (for example, one or two paragraphs before the point of reference, or before the previous subsection heading). Unfortunately, it tends to be a little bit of trial and error. Some kinds of floats need to be declared earlier than others; for example, floats with placement |
||||
|
|
|
As @asia1281 mentioned, the Another thing that may help is one of |
|||||||
|
|
An easy way to specify for LaTeX to place something is by adding an optional argument for position:
where the
where the |
|||||||||||||
|