1

I am using the wrapfig package but footnotes are not properly wrapping:

enter image description here

Here is the source

\documentclass{article}
\usepackage{graphicx, wrapfig}
\graphicspath{ {./images/} }

\title{Learning to Deconflict Constraints}
\author{Ethan Brooks}
\begin{document}
\hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\
\hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\
\hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\
\hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\
\hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill \\ \hfill
\begin{wrapfigure}{r}{50pt} %this figure will be at the right
    \centering
    \includegraphics[height=50pt]{6b2}
    \includegraphics[height=35pt]{6r3}
\end{wrapfigure}

\footnote{That is, move the top block from column from column 3 to column1, then the top block from column 2 to column 1, etc.
}.

\end{document}

I'll add that this is related to wrapfig Positioning (Footer is overlapping figure) but the answer to that post recommends packages that have not been updated in 30 years and are not as fully featured as wrapfig.

  • it would be very hard to get that to work automatically, by hand you can use \\ to force a linebreak after the comma in the footnote. – David Carlisle Sep 12 at 19:40
  • also this example has a wrapfig with no following paragraph that can wrap around the figure and a footnote with no preceding text, either of these puts the document in some slightly strange edge case that's not likely to produce reasonable output. Perhaps that is just a feature of the small example, and does not represent your real document? – David Carlisle Sep 12 at 19:50
1

A solution can be found with the plain TeX macro package insbox. It defines commands \InsertBoxL and \InsertBoxR, with two mandatory arguments: the number of lines in the following paragraph which remain unshortened and the inserted box, and an optional argument: the number of supplementary shortened lines, in case TeX didn't do a correct computation for the necessary shorter lines.

\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum, xcolor, eqparbox}
\input{insbox.tex}
\graphicspath{ {./images/} }

\title{Learning to Deconflict Constraints}
\author{Ethan Brooks}

\begin{document}

\lipsum[1-2]

Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non enim. Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum pellentesque felis eu massa.\footnote{That is, move the top block from column from column 3 to column1, then the top block from column 2 to column 1, etc. }
Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In hac habitasse platea dictumst. Integer tempus convallis augue. Etiam facilisis. Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae risus porta vehicula.

\bgroup\InsertBoxR{-1}{%
\eqparbox{W}{%
 \includegraphics[height=50pt]{pepe-le-pew2}\\
 \includegraphics[height=50pt]{wolf}}%
 }[3]

Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla a faucibus semper, leo velit ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis sagittis posuere, turpis lacus congue quam, in hendrerit risus eros eget felis. Maecenas eget erat in sapien mattis porttitor. Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus commodo facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus sagittis dui, et vehicula libero dui cursus dui. Mauris tempor ligula sed lacus. Duis cursus enim ut augue. Cras ac magna. Cras nulla. Nulla egestas. Curabitur a leo. Quisque egestas wisi eget nunc. Nam feugiat lacus vel est. Curabitur consectetuer.
\egroup

\lipsum[3-8]

\end{document} 

enter image description here

  • I'm not sure this is an answer, you could do the same with wrapfig if you (as here) supplied text to wrap around the figure. I think the OP (for some reason) wants the figure to protrude into the footnote area and for the footnote text to be set to shorter lines to accommodate that. – David Carlisle Sep 13 at 8:14
  • @DavidCarlisle: Protruding would be no problem (replacing \eqparbox with \parbox would do the trick), but I had not understood the footnote text wrapping. – Bernard Sep 13 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.