1

My problem is the following: I have a lot of figures to add in my report. These figures are usually about 0.4 of the height of the page. With the caption, the height is more like 0.55 or something. Anyway, two figures do not fit on one page.

In the end I'm left with something like this for example :

Page 0 and 1 Page 2

In the .tex file, this would look like this :

\documentclass[a4paper,titlepage]{article}
\usepackage[pass]{geometry}
\usepackage{changepage} 
\usepackage[margin=0.8cm]{caption}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\section{Section 1}

    Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1Paragraph Fig1 Paragraph Fig1

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 1}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2Paragraph Fig2 Paragraph Fig2

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 2}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

      Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3Paragraph Fig3 Paragraph Fig3

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 3}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4Paragraph Fig4 Paragraph Paragraph Fig4

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 4}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

      Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5Paragraph Fig5 Paragraph Fig5

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 5}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6Paragraph Fig6 Paragraph Paragraph Fig6

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[h!]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 6}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

\clearpage
\newpage

\section{Section 2}
    Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph 

\end{document}

Usually, I add a '\clearpage' '\newpage' at the end of the section in order to avoid figures of section 1 to be found in section 2. So basically, see picture, I have :

  • page 0 with the beginning of the section and comments about Fig. 1
  • page 1 with Fig. 1 and comments about Fig. 2,3,4
  • page 2 with Fig. 2 and comments about Fig. 5,6
  • page 3 with Fig. 3 only
  • page 4 with Fig. 4 only
  • page 5 with Fig. 5 only
  • page 6 with Fig. 6.

This last part, with only one single figure on pages 3, 4, 5 and 6 bothers me...

I would like to know if there is an option that allows me to change the geometry of the pages in order to fit two figures on one page once there is no more text. In the example, we would then have the exact same thing for page 0, 1 and 2 but then I would have

  • page 3 with Fig. 3 and Fig. 4
  • page 4 with Fig. 5 and Fig. 6.

I imagine I could clearly do it by hand, by simply compile the code I have already, look at my pdf and notice which figures are placed after the text. Then simply take them away from the text and use '\newpage' then include all these figures while changing the geometry of these particular pages... But I don't really like this idea and I wondered if it was possible to automize this.

I also wonder if it might even be possible to do this in the middle of the text : we see that on page 2, we are commenting Fig. 5 and 6 while Fig. 3, 4 have not yet been shown. Would it be possible to force Latex to change the geometry of this page and allow Fig. 3 to appear just after Fig. 2 (on the same page) then on the following page to have Fig. 4 and then the paragraphs about Fig. 5 and Fig. 6...

We would then have

  • page 0 with the beginning of the section and comments about Fig. 1
  • page 1 with Fig. 1 and comments about Fig. 2,3,4
  • page 2 with Fig. 2 and Fig. 3
  • page 3 with Fig. 4 and comments about Fig. 5 and 6
  • page 4 with Fig. 5 and 6

(I don't know if all this is very clear but do not hesitate to ask if you want more information). I know I should let LaTeX do it for me, since it's its purpose, but I wondered if it might be done without too much effort.

Thanks !

  • 2
    This is very less information so I can only guess. Did you use \usepackage{float} in your preamble? – Peter Ebelsberger Apr 18 '15 at 16:26
  • 3
    Don't use \include for figures. See When should I use \input vs. \include? – Werner Apr 18 '15 at 16:27
  • 2
    Why dont you use \begin{figure} \includegraphics[..]{...} \caption[..]{...} \end{figure} – Peter Ebelsberger Apr 18 '15 at 16:34
  • 3
    don't use the epsfig package (ever!) It was written in 1994 to emulate a package that was old then to help people move from latex2.09 to latex2e, why would you use it now? – David Carlisle Apr 18 '15 at 18:19
  • 2
    Please fix your example so that it runs without error and can be used to test possible answers. Replace \includegraphics[..]{...} by \rule{3cm}{1cm} or whatever size produces an example that demonstrates the problem and can be reproduced locally. – David Carlisle Apr 19 '15 at 10:59
3

[h!] just makes it harder for latex to position the figures, it complains a lot and changes it to [ht!] to give itself a chance, but you should always include p really unless you have a really good reason not to. Also it makes no sense to routinely use ! as that means to ignore the user-set constraints. It's better to change the constraints if they are not suitable rather than set them then ignore them.

The code used here to squeeze two figures on to a float page is a bit of a hack but works OK, personally I'd just make the figures smaller so two fit in a normal page then it wouldn't be needed.

enter image description here

\documentclass[a4paper,titlepage]{article}
\usepackage[pass]{geometry}
\usepackage{changepage} 
\usepackage[margin=0.8cm]{caption}
\usepackage{graphicx}
\usepackage{subcaption}
\renewcommand\floatpagefraction{0.7}
\makeatletter
\setlength\@fpbot{-.5cm plus 1fil}
\setlength\@fptop{-1.5cm}
\setlength\@fpsep{-2cm plus 1fill}
\makeatother
\begin{document}

\section{Section 1}

    Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1 Paragraph Fig1Paragraph Fig1 Paragraph Fig1

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 1}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2 Paragraph Fig2Paragraph Fig2 Paragraph Fig2

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 2}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

      Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3 Paragraph Fig3Paragraph Fig3 Paragraph Fig3

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 3}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4 Paragraph Fig4Paragraph Fig4 Paragraph Paragraph Fig4

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 4}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

      Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5 Paragraph Fig5Paragraph Fig5 Paragraph Fig5

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 5}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

    Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6 Paragraph Fig6Paragraph Fig6 Paragraph Paragraph Fig6

     %%%
%%%%%%%%%%%%%%%%               FIGURE               %%%%%%%%%%%%%%%%%
\begin{figure}[htp]
\centering
\makebox[\columnwidth]{\rule{\columnwidth}{10.5 cm}}
\caption{FIG 6}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%

\clearpage


\section{Section 2}
    Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph Paragraph 

\end{document}
  • I will follow your advice and change the size of my figures but I keep your answer in mind, thank you very much for your time ! – mwoua Apr 21 '15 at 15:36

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.