1

I have a page with some content on it and some remaining space at the bottom of this page.

|=========|
| header  |
|---------|
|         |
|  page   |
| content |
|         |
|---------|
|remaining|
|  space  |
|---------|
| footer  |
|=========|

I want to place figure which fit exactly in this remaining page space. Picture must be placed at the end of page without page breaking. \externalfigure[fig][factor=fit] does not work when height of picture is too high to fit in remaining space, and picture placed on next page.

s9gf4ult
  • 535
  • 3
  • 9
  • 1
    Your question lacks some information what exactly you intend to do if the graphic is smaller or larger than the remaining space. This fits the graphic into the remaining space: \externalfigure[cow][height=\dimexpr\pagegoal-\pagetotal-\lineheight\relax, width=\textwidth] – Marco Jan 15 '14 at 12:52
  • I think \externalfigure[wide.jpg][factor=max,maxwidth=\textwidth,maxheight=\dimexpr\pagegoal-\pagetotal-\lineheight\relax] doing exactly what I want. Could you also say in your answer what is \pagegoal \pagetotal \lineheight\relax and how did you know about? – s9gf4ult Jan 16 '14 at 04:47
  • 1
    \pagegoal is the height of the box that TeX aims to fill. \pagetotal is the so far accumulated height. You can read up the details e.g. in the TeXbook or TeX by Topic. Aditya already provided an answer to this question. If that solves your problem I'd suggest to upvote his answer and close this question as a duplicate. – Marco Jan 16 '14 at 19:05

0 Answers0