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.
\externalfigure[cow][height=\dimexpr\pagegoal-\pagetotal-\lineheight\relax, width=\textwidth]– Marco Jan 15 '14 at 12:52\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\relaxand how did you know about? – s9gf4ult Jan 16 '14 at 04:47\pagegoalis the height of the box that TeX aims to fill.\pagetotalis 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