I am having a wrapfigure at the bottom of my page in the last paragraph which refuses a nice looking position.
x -> text, # -> wrapfigure:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ######### some equation ##########
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Because the equation is relatively small, I do not want that much whitespace. I want the text to float under and above the wrapfigure, like this (the whole paragraph is 14 lines long, so there is enough space):
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ######### some equation ##########
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ##################################
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The wrapfigure (in the code) is above the paragraph and whenever I move it down in the paragraph (even in the middle of the first sentence) it instantly moves to the next page.
Code looks like this:
\begin{wrapfigure}[8]{R}{0.5\textwidth}
\begin{small}
\begin{gather}
I_{in} =
\begin{bmatrix}
46 & 42 & 50 \\
44 & 65 & 56 \\
41 & 52 & 58 \\
\end{bmatrix}
\\
I_{out}(2,2) = 131
\end{gather}
\end{small}
\end{wrapfigure}
% paragraph...
Best Answer
You can what you want with the
plaintex
packageinsbox
. It defines\InsertBoxL
and\InsertBoxR
commands, with two arguments: the number of untouched lines before inserting the box, and the contents of the box. Also an optional argument: the number of supplementary wrapped lines, if the height of the box is not correctly calculated.