[Tex/LaTex] Difference between [h] and [H] in float position

floatspositioningtables

I'm trying to choose the positions of my tables but I can't figure out the difference between [H] and [h]. I've seen both advised over my search. If I use [h] the row spacing is different than [H] use.

Best Answer

Never use [h] on its own, it is basically an error waiting to happen and LaTeX will most likely give a warning and change it to [ht].

LaTeX has four float areas into which a float may be placed: top of page (t), bottom of page (b), here where the float appears in the source (h) and on a float page with only floats and no text (p).

H makes the environment essentially not a float at all it is more or less the same as using minipage except that \caption works, but you can caption minipages using the capt-of package.

H should be used sparingly, like any large box, it is likely to produce bad page breaks with large amounts of white space.

If you use the optional argument of a float you are mostly restricting the float areas to which the float may be allocated. If you over-restrict it is likely that the float can not be positioned at all, and will then go to the end of the document. So if you want to allow h it is best to allow t and p as well so use [tph]. You should almost always use p if you use the optional argument.

Related Question