0

I m wiring one report in which i need to add images in each section. Each section start on new page but i found when there is not enough space on one section, image float to another section and there is no more new page. How can i keep image within the section so that it can not float to next section (page break).

   <Section1> 
       some text xyz
       image1
   </Section1>
   \newpage
   <Section2> 
       Some Text ABC
       image2
   </Section2>

In the above example is image1 is bigger than space left for section1, it floats to section2 and image remove pagebreak. How can i control it?

1

About that this looks quite odd, maybe the really peculiar is put a figure in a extreme of the page and left the center completely empty. Promoting the only important thing in the page and fill as munch space as possible perhaps is more fective/elegant but we're so used to the default format of word processors that this look the wrong way.

Anyway, in the top or the center, a small figure in a empty page look a poor design. Probably is worth in this case re-design the whole work, changing float placements, figure sizes, page breaks and even rewriting some text to avoid this, before of change the floats behavior.

Apart from these ruminations, you can change the normal behavior of top-align of floats setting \@fptop. Check in this MWE:

\documentclass{article}
\usepackage{blindtext}
\usepackage[demo]{graphicx}
\begin{document}
\section{section}
\blindtext
\section{section}
\blindtext
\section{section}
\blindtext
\makeatletter
\setlength{\@fptop}{0pt} % default: 0pt plus 1fil
\makeatletter
\begin{figure}
\centering
\includegraphics[scale=1.00]{demo}
\caption{Caption}
\end{figure}
\clearpage
\section{section}
\blindtext
\section{section}
\blindtext
\section{section}
\blindtext
\makeatletter
\setlength{\@fptop}{0pt plus 1fil} %return to defaults 
\makeatletter
\begin{figure}
\centering
\includegraphics[scale=1.00]{demo}
\caption{Caption}
\end{figure}
\end {document}
0

Using \clearpage (\cleardoublepage) instead of \newpage forces floats to appear.

  • Yes it helps but image appears that appears before clearpage it in center of page. Page looks quite odd with one image in center. How can i make it upper justified with empty space after the image. – manish Apr 26 '13 at 1:43
  • @user15662 You have at least two possibilities: 1. Moving your picture to some earlier place in your text. 2. Forcing new page, then making an empty text (e.g. $\,$)on the following page, and your figure will be (nearly) properly placed. – Przemysław Scherwentke Apr 26 '13 at 11:38

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.