I have a large image that needs to be scaled and put onto one page, which has a section title as well. The image should fill the maximum space avaiable.

I tried passing different arguments to the \includegraphics command, but it doesn't seem to work, because it doesn't take the section header into account.

I've tried different variations of


2 Answers 2


If you can be sure that the section header will always be at the top of the page, you could try executing the commands

\renewcommand\bottomfraction{0.9} % default value: 0.3
\renewcommand\textfraction{0.1}   % default value: 0.2

in the preamble and issuing a command such as

% If the graphics file is not embedded in a LaTeX "float" environment such 
% as "table" or "figure", you may be able to set "height=0.9\textheight"

after the respective \section header. Depending on how much space the section header takes up, you may have to fiddle a bit with the height you assign to the graphics file, i.e., you may have to try 0.7\textheight or 0.75\textheight.

Addendum: The form of the \includegraphics command above assumes, implicitly, that the limiting element for the image size is its height, i.e., that even if the height is maximized the width will not exceed the \textwidth parameter. If this assumption is incorrect, i.e., if there's a chance that the image's width will exceed \textwidth when the image's height is maximized, you should use the following version of the command instead:

  • 2
    \bottomfraction and \textfraction are for floats and not required here. The image seems not to be in a float and if it is then [b!] should do it, because it disables the fraction limits. Jun 13, 2012 at 8:49
  • @Martinscharrer: I thought there was a possibility that the OP was using a float construct, so that's why I provided the extra code (about the page fractions). Of course, if no floats are involved, the case becomes much simpler.
    – Mico
    Jun 13, 2012 at 12:18
  • @Mico, \texttwidth should be \textwidth Apr 13, 2013 at 10:32
  • @mangledorf - Good eye! I've fixed the typo.
    – Mico
    Apr 13, 2013 at 17:10

You can use \dimexpr to subtract the space required for the section header. I guess 2 or 3 times the normal baseline skip should do it:


If you use an older LaTeX version which doesn't support e-TeX, or you don't like \dimexpr, then load the calc package and use height=\textheight-3\baselineskip directly.

You must log in to answer this question.

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