0

I would like to scale an image to the maximum size possible while still staying on a certain page with text on the same page.

Is it possible to let latex do the sizing work by saying something like \includegraphics[width=\vfill]{foo}?

Textheight

I tried textheight but it returns - as expected - the textheight of a page and therefore the image will consume an entire page which is not the wanted behavior. The wanted behavior is that the image consumes all remaining space on the page where it is placed.

Natan
  • 137
  • You can use height=0.98\textheight. From experience, it is sometimes better to keep a few percent space. – MaestroGlanz Jun 10 '22 at 14:51
  • but doesn't textheight take all space where text can be written in general (used and not used)? Or does it just take the remaining (not used) space where text can be written? I tried it now and it did what I thought (used and not used) and therefore starts a new page. – Natan Jun 10 '22 at 14:58
  • 1
    Ah, now I get it. Please add a picture for explanation. But I'm pretty sure, it doesn't work, as I think fills are glue and not boxes. – MaestroGlanz Jun 10 '22 at 15:05
  • 1
    You can have a look at the easyfig package which provide a min size / max size feature. But nothing fully automatic… – NBur Jun 10 '22 at 15:59
  • 2
    you can do some things in some cases (I may find an answer on this site) but the problem is under specified (and may take several latex runs to converge) the "available space on this page" depends on the pagbreaking and float positioning algorithms, the outcome of which are affected by the size of the image ..... – David Carlisle Jun 10 '22 at 19:02

0 Answers0