I've been trying to use the wrapfigure
and wraptable
from the wrapfig
package, but to no avail.
This works for text.
\begin{wrapfigure}{l}{40mm}
\begin{center}
Some random text
\end{center}
\end{wrapfigure}
This should be to the left of the table. \blindtext
But once I add a table
(see code below), it fails.
\begin{wrapfigure}{l}{40mm}
\begin{center}
\begin{table}
\begin{tabular}{l | c}
A & Cell 1 \\ \hline
B & Cell 2 \\ \hline
\end{tabular}
\end{table} \\
Some random text
\end{center}
\end{wrapfigure}
This should be to the left of the table. \blindtext
What am I doing wrong?
Thanks.
Best Answer
The
table
environment is for normal floating tables. You do not need to put atabular
inside atable
environment. You should use thewraptable
environment instead.