1

my question is quite simple but I haven't found a good solution yet. I want a certain image to be placed after a specified text passage. If I use [h] as the positioning parameter, the image will likely not appear exactly after the passage (which is not what I want) and if I use [H] (from float) the image will be the next thing after the specified passage but the page is distorted in a way that the content always ends at the end. This means I sometimes have big blank parts in the middle of a page (which is also not what I want). I know that I should use [h] in most cases since it yields the most visually pleasing results but sometimes I actually need the images at the specified position. How can I achieve a similar effect to using [H] but with the blank spaces being at the end of the page so that no stretching appears in between the contents of a page?

Thanks in advance!

Mika R.
  • 41
  • Welcome to TeX.SE! Never use just h but some of combinations h (here), t (top), b (bottom) or p (page) and allow that image float to the best position. For example with ht image will be after point of its insertion in document, if there will be enough space for it, if not, it will float to the top of the next page. BTW, your question is not entirely clear, what you after. – Zarko Oct 24 '21 at 14:00
  • Welcome to tex.sx. If you know there's space on the page, it's not necessary to embed the image in a figure environment. You can use center instead. If you need a caption, you can use \captionof from the caption package. – barbara beeton Oct 24 '21 at 14:00
  • @Zarko But if I use ht the next text passage will still be placed before the image if it doesn't fit on the page. I basically want that if the figure does not fit on a page anymore, it is placed on top of the next page without any next text filling the page before or text stretching the previous page just to be filled till the bottom. If the image needs to be placed on the next page, I'm fine with having some blank space at the bottom of a page as long as the text is not stretched. – Mika R. Oct 24 '21 at 14:46
  • This is a (very) FAQ: https://texfaq.org/FAQ-figurehere – Thruston Oct 24 '21 at 15:18
  • 2
    you are asking for [H] (or simply don't use figure at all, since you don't want floats) that will not stretch the page. If you are seeing white spece stretch then you are using \flushbottom and you want \raggedbottom – David Carlisle Oct 24 '21 at 15:40

0 Answers0