1

Good morning everybody.

Here is the problem: I have a book with a lot of wrapfigures (aligned to the left or to the right). Wrapfig does an excellent job, except when the figure is close to the top or to the bottom of the page (see attachment).

Is it possible, even with some trick or macro, to float vertically this figures, as in the environment figure? Or have I to check manually?

Thanks a lot in advance.

enter image description here

enter image description here

Marco
  • 105
  • Where is the code please. You can use upper case letters in parameter #2 like R –  Oct 04 '15 at 13:04
  • the code is just a normal wrapfig code:code\begin{wrapfigure}{r}{4cm} \includegraphics[width=4cm]{img/cardano.jpg} \caption{Girolamo Cardano.} \end{wrapfigure}code – Marco Oct 04 '15 at 13:12
  • 1
    Moreover, 'r' is for horizontal alignment, I need something for vertical positioning without checking manually. – Marco Oct 04 '15 at 13:13
  • If you know how much space you need, you can force a page break if there isn't enough room, but that isn't what you want. You can write the current location to the aux file and test it next time, but what are you going to do then? If the page ends in the middle of a paragraph, you would have to complete the paragraph on the next page before starting the wrapfig. – John Kormylo Oct 04 '15 at 15:44
  • Well, I have some degree of freedom for placing images, I can put them in previous or following pages. I would like to place automatically them at the top or the bottom or, at least, avoid the black space effect as you see in the attachments, but I can't find a package able to do so... – Marco Oct 04 '15 at 16:29
  • It might be possible to delay the onset of the wrapfig until it just fits on the page. Of course you would have to start earlier. – John Kormylo Oct 04 '15 at 16:33
  • This type of floats requires heavy manual intervention. In these two cases, you need to start the wrap figure in the preceding paragraph. – egreg Oct 04 '15 at 18:09
  • What about using wrapfig + minipage environment? – Marco Oct 04 '15 at 19:00
  • So, If I understood correctly, this is one of the few things latex can't do.. – Marco Oct 08 '15 at 12:53
  • Re: "r" vs "R". @Marco should not reject the correct answer "R" placement. Uppercase placement letters signal the picture can float to the next page to avoid a page break. Alas Marco did not understand correctly. – Donald Arseneau Sep 14 '20 at 05:06

0 Answers0