2

I'm looking for an example on how to use the specifier p in a LaTeX's figure. Moreover does it make sense to use both hp specifiers simultaneously in the same figure?

  • 1
    p should always be there to allow the figure to go to a float page too. see also https://tex.stackexchange.com/a/39020/2388 – Ulrike Fischer Apr 05 '21 at 16:32
  • Not understood. It is just \begin{figure}[p] vs \begin{figure}[hp]. I'd say the former is only used when doing finishing touches on a project. In most cases you'd be using [htp] or [htbp] (not everyone likes bottom figures). Imo [hp] does not make much sense compared to [htp] – daleif Apr 05 '21 at 16:32
  • Hello @daleif my goal is to understand with examples how the p specifier works – Gennaro Arguzzi Apr 05 '21 at 16:34
  • 2
    Why do you need examples for that? If only p is available the figure is 9laced on a page that only contains other figures or tables. – daleif Apr 05 '21 at 16:36
  • @daleif I tried to use it in a file where there are 2 figures, one with the option h and the other one with the option p. The figure with p is placed on a new page. Maybe if I organize the figures so that all of them have the p specifier, they will placed on the same page? – Gennaro Arguzzi Apr 05 '21 at 16:42
  • 1
    If space permits – daleif Apr 05 '21 at 16:43
  • thenk you so much @daleif – Gennaro Arguzzi Apr 05 '21 at 16:44
  • @daleif if h means "Place the float here, i.e., approximatelyat the same point it occurs in the source text (however, not exactly at the spot)", what does hp mean? Maybe h has a higher priority than p? By using hp I got the same result of h – Gennaro Arguzzi Apr 05 '21 at 17:39
  • 1
    See Peters answer which is also found in the manual for the memoir class. The need for h to become t, is because else a [h] would never det placed. Also note that if at the bottom of a page, h is not the same as b. h explicitly require there to be a certain amount of non float above and below. – daleif Apr 05 '21 at 17:59

1 Answers1

7

Float placement parameters are, and are checked in the following order.

  1. If ! is specified ignore most restrictions and continue.

  2. If h is specified try to place the float where it is. If nothing else is specified change h to t (try the top of the next page).

  3. If t is specified try to put it at the top of the current page.

  4. If b is specified try to put it at the bottom of the current page.

  5. If p is specified try and put it on a float page after the current page.

  6. If necessary steps 3 and 4 are repeated at the start of each new page, followed by 5 at its end.

So, \begin{figure}[hp] will try and put the figure here and if that does not work then on the next page by itself.

Peter Wilson
  • 28,066