90

I have a couple of floats in my document, which contain large Images (it consumes the half of the page). In this case, the figure get's its own page and no text goes on this page.

How can I configure this? I'd like to have text before and after the floats until the float doesn't use more then 75% of the page height.

3
  • 1
    Are you using the options for the placement? For example, \begin{figure}[h].
    – Sigur
    Aug 23, 2012 at 23:13
  • 3
  • 2
    May be ignoring LaTeX rules with ! option ([!tbph], for example) could be also useful in addition to @Werner comment (uhm...answer).
    – Fran
    Aug 28, 2012 at 3:03

5 Answers 5

87

I didn't have had success with the \topfraction, but there is another important setting which gave me less float-only pages. With \renewcommand{\floatpagefraction}{.8}% I was able to specify that only pages with more than 80% of floats, will become pure float-only pages. The default is 0.6 so if a figure consumes 60% of the page it will get its own float-page.

HTH math.

5
  • Very nice. This worked in my case. I had two figures which took one page even though there was plenty of space for text. Dec 18, 2017 at 19:43
  • 5
    For anyone who gets here after me, this method alone will postpone the processing of figures, move figures to the end of the document, and generate a lot of "LaTeX Error: Too many unprocessed floats." Using this method with "\renewcommand{\topfraction}{.75}" of the next answer solves the problem for me. Nov 2, 2018 at 15:27
  • HTH stands for Hope That Helps, btw, hth.
    – GiuTeX
    Apr 9, 2021 at 8:21
  • 1
    I'm late to this, but this answer appears to have worked for me, and I don't have the error that @wangguoqin1001 reports. As a side note, does anyone know what the default value for \floatpagefraction is, or if there is a way to return/print what fraction of a page a specfiic float is using? Oct 18, 2021 at 13:40
  • For adjusting further parameters, I found this page useful. Jan 11, 2022 at 13:17
27

Default for LaTeX is to allow up to 70% of the top of a page to be float (set by \topfraction as .7); up to 30% of the bottom of the page (set by \bottomfraction as .3) and at least 20% text (set by \textfraction as .2). Perhaps increase \topfraction using \renewcommand{\topfraction}{.75} as a start.

For more on TeX's float algorithm, read How to influence the position of float environments like figure and table in LaTeX?.

11

I had the exact same problem and I fixed it by setting the [ht] options for the figure environment.

1
  • 2
    Providing correct placement options is a good start. However, as Werner says in his answer, you also have to adjust the parameters that LaTeX uses to get the proportions the questioner is asking for. Jul 18, 2013 at 13:47
3

I had exactly the same problem, but in a two-column environment. Concretely, I wanted to have two figures in the rightmost column of the last page of an article, but the second figure went on a new page even if there was clearly enough space left in the column.

None of the proposed solutions (htbp options, float fraction, \vspace, etc.) worked for me, but the solution that did work was using the H option of the float package:

\usepackage{float}
...
\begin{figure}[H]
   ...
\end{figure}

This had the last figure move back to the previous page.

0

I had a similar issue, but the solutions with renewing the commands for the spacing around floats did not work for me. Perhaps because I used it in a double column environment, but redefining the \dbltopfraction and \floatpagefraction also did not work.

Instead I found the following make-shift solution that worked for me:

\vspace{-50mm}
\begin{figure*}[!ht]
\centering
\includegraphics[scale=1.0]{figure.eps}
\vspace{-50mm}
\caption{}
\label{fig:label}
\end{figure*}
\vspace{50mm}

In this solution solution I reduced the vertical space with \vspace{} right before the figure environment, inside it the environment (after the include), and right after the environment I added the same vertical space again.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.