2

Possible Duplicate:
How to define a figure size so that is consume the rest of a page?

Hi all,

I've seen How to compute the remaining space on the current page - but that doesn't really address what I want to do.

Say, I type, I type, and then I insert an image - and in a lot of cases I usually want to enter images "here"; and there seems to be some blank space on the bottom of the page. So I do :

... blah blah blah.... 

\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{../path/to/image.png}
\caption{Some caption here}
\label{fig:somelabel}
\end{figure}

... and more often than note, image will take up more vertical space than what is remaining on page, and LaTeX will push it onto the next page, which I hate :) Because then, I have to manually change values, to width=0.7\textwidth, then width=0.6\textwidth, then width=0.5\textwidth, then width=0.55\textwidth - each of these requiring a new recompile - to finally discover that it is for 0.55\textwidth, that the height of the image is such, that it fits (along with caption) in the remaining bottom space of the page, and finally get the image where I want.

Basically - what I'd like is some macro, so that instead of scaling the width as in [width=0.8\textwidth] - I would scale the height according to remaining space, as in this (pseudo) example:

\includegraphics[height=0.9\RemainingVerticalSpaceOnPage]{../path/to/image.png}

... which utilizes the (imaginary) \RemainingVerticalSpaceOnPage macro.

So my question is: Does anything resembling this \RemainingVerticalSpaceOnPage exist?

Thanks in advance for any answers,
Cheers!

sdaau
  • 17,079

0 Answers0