2

I must hand in a document where floats on the first page are only allowed to be placed at the bottom of the page (not t and not h).

I know that I can forbid all floats on a page with \suppressfloats and that I can forbid floats on the top of a page with \suppressfloats[t]. But \suppressfloats[h] does not work.

I have tried

\usepackage{float}
\usepackage{afterpage}
\floatplacement{figure}{b}

\begin{document}
\afterpage{\floatplacement{figure}{htbp}}

but it does not work.

How can I suppress floats at t and h while allowing them at b on the first page and allowing them at htbp for the rest of the document?

Example:

\documentclass{article}
\usepackage{blindtext}

\usepackage{float}
\floatplacement{figure}{b} % I would like to have `htbp` here

\usepackage{afterpage}

\begin{document}
\suppressfloats[t] % works
\suppressfloats[h] % seems to have no effect
\afterpage{\floatplacement{figure}{htbp}} % seems to have no effect
\blindtext

\begin{figure}
    \centering
    \rule{.3\linewidth}{2cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{.7\linewidth}{5cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{10cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{.6\linewidth}{8cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{7cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{2cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{4cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{5cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{11cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{9cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{4cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{5cm}
    \caption{something black}
\end{figure}


\listoffigures
\end{document}

EDIT David Carlisle's answer avoids floats here on the first page. But it does not place the float at the bottom instead as long as I basically allow the here in \floatplacement. (But when I change it to \floatplacement{figure}{b} it is placed on the bottom of the first page as it should.) Could it be that LaTeX first decides to place it here, then realizes it can not actually place it here because \intextsep is too big and then moves it to the next page without checking whether putting it at the bottom would be possible?

Can someone recommend a good documentation which explains how the placing of floats exactly works?

8
  • Worst case hack if you don't get an answer: since it's the first page, when the text is in final form position the first figure(s) manually where you want them (bottom of the page). Jun 19, 2017 at 13:10
  • why not just put [bp] on the first float so it is not placed top or here? Jun 19, 2017 at 13:34
  • @DavidCarlisle sure, I could do that when the document is otherwise finished, but it is something I would have to keep in mind. I would prefer an automatic solution.
    – jakun
    Jun 19, 2017 at 16:38
  • @jakun I'd added an automatic version as an answer, but I think I'd use the simpler version I suggest in the comment above. It isn't really any less automatic, you can tell from the source which is the first figure and you only need the optional argument on that one. Jun 19, 2017 at 16:50
  • 1
    @jakun I don't think the bottom placement is prevented in that case, it just doesn't take that option. But I'll trace later. Jun 19, 2017 at 16:53

1 Answer 1

0

You could do something like this which allows h later (eg figure 14 on page 10)

\documentclass{article}
\usepackage{blindtext}

\usepackage{float}
\floatplacement{figure}{htbp} % I would like to have `htbp` here

\usepackage{afterpage}
\newlength\zzz
\setlength\zzz{\intextsep}
\begin{document}
\suppressfloats[t] % works
\intextsep\textheight
\afterpage{\global\intextsep\zzz} % seems to have no effect
\blindtext

\begin{figure}
    \centering
    \rule{.3\linewidth}{2cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{.7\linewidth}{5cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{10cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{.6\linewidth}{8cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{7cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{2cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{4cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{5cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{11cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{6cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{9cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{4cm}
    \caption{something black}
\end{figure}

\blindtext

\begin{figure}
    \centering
    \rule{\linewidth}{5cm}
    \caption{something black}
\end{figure}


\listoffigures
\end{document}

You must log in to answer this question.

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