I have a wrapped figure and I want to make it float the bottom of the page (like one can do with the figure
environment).
Using wrapfigure
I can choose left or right {l}
({L}
) or right {r}
({R}
), but I can't choose top or bottom. I read the manual many times, it mentions the enviroment of wrapfloat
but still I cannot tell how to force it to be at bottom of page.
Perhaps wrapfigure
is not the right tool (see linked questions); if so, I welcome alternative ways of getting the same or very similar result.
In summary, what I want is to have frame or figure that is both floated (for example at the bottom of the page) and that the main text wraps around it (see figure below).
This is the MWE
\documentclass{article}
\usepackage{mdframed}
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}
\section{Hello}
\lipsum[2]
\begin{wrapfigure}{l}{0.5\textwidth}
\begin{mdframed}
should be at left (ok), bottom (how?)
\end{mdframed}
\end{wrapfigure}
\section{Bye}
\lipsum[30]
\lipsum[30]
\lipsum[30]
\end{document}
This was asked before but I don't think it is a general solution: Wrapfig floating to bottom (Article) . There is another failed attempt: Package wrapfig and vertical float. Is it possible?
Best Answer
TeX breaks paragraphs into lines before deciding where to make page breaks so it is hard to automate floating of any kind of cutout that affects line lengths locally.
However if you just place the
wrapfig
"somewhere close" then it is usually a simple matter to move it by hand when the document is done, just see where the linebreak naturally happens and then force a "fake" paragraph at that point using{\parfillskip0pt\par}
to end the partial paragraph without leaving a short line and\noindent
to re-start the paragraph without an indent, you can then insert the wrapfig at this point.