-1

I am getting

LaTeX Warning: `h' float specifier changed to `ht'.

h is an option to place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot). Thus if h should place the float only approximately, the option description is non-functioning.

6
  • The question is different. Does h mean exactly here or approximately here.
    – Vinkel
    Commented Jun 16 at 21:56
  • Please read the answer and references therein. Commented Jun 16 at 21:59
  • To mean exactly here there is the argument H, So latex should not change h to ht. But do what h is supposed to do. Without messaging the user about anything.
    – Vinkel
    Commented Jun 16 at 22:03
  • H is a non standard option added by a package and really should never be needed, the only reason to put text in a float is to allow it to be moved and the only reason to use H is to stop it moving, so a more consistent approach would be to not use a floating environment. Commented Jun 16 at 22:22
  • Correct. But for float one should allow possibility for placing to the top or bottom. And the user should not be informed where it was placed. The title of the suggested answer is misleading because I am using h float specifier when specifying a float. Or perhaps not, does figure make a float ?
    – Vinkel
    Commented Jun 16 at 22:54

1 Answer 1

2

The question is different. Does h mean exactly here or approximately here.

It doesn't mean either, it means do not allow the float at the top of the page or the bottom of the page or on a page on its own as it means the option is removing the t b and p possibilities.

That means that if the float does not fit exactly at that position (which for example for a float that is half textheight high will occur on average half the time as the natural position will fall more than half way down the page) then the float may not be positioned anywhere.

In the original latex that would mean that [h] floats usually drifted to the end of the document where they were flushed out, but in latex2e if the [h] float can not be placed at its position in the source then h is changed to ht with that warning to allow the float to be placed at the top of the next page.

18
  • Contrasting it with H, it is sensible to have h to mean approximately here. Then if the float is placed with some shift, it would be something to be expected, without needing a warning. At this moment it looks to me that I have done something wrong,
    – Vinkel
    Commented Jun 16 at 22:31
  • I fail to understand how placing something with the possibility of some drift be interpreted to exclude the t or b possibilities. Because then you actually change it to include t or b as well. In essence one can assume that h includes possibility for t or b. No need to warn users.
    – Vinkel
    Commented Jun 16 at 22:49
  • I also have this problem that I use documents with two columns. A bad point is that figures are placed only at the top of the page or on their own page. Specifying their position using modifiers like h or b, they will be ignored.
    – Vinkel
    Commented Jun 16 at 23:09
  • @Vinkel no. in two column mode single column figures (figure) support all the htbp options. spanning figures (figure*) support t or p (h wouldn't really make sense) and you can add b with the dblfloatfix and some other packages Commented Jun 16 at 23:19
  • 1
    If you haven't already done so, please study the posting How to influence the position of float environments like figure and table in LaTeX?
    – Mico
    Commented Jun 17 at 0:19

Not the answer you're looking for? Browse other questions tagged .