I am hunting a bug in my document in the context of the wrapfig
package.
For what it's worth, it seems that it fails miserably as soon as the main (i.e., non-wrapfig'ed) text starts with a non-empty group:
The first paragraph runs over the figure, whereas all subsequent paragraphs exhibit the gap needed to fit the figure in.
Q: Am I doing something wrong?
\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{wrapfig}
\newif\iffailmiserably
\failmiserablytrue % set this to false for comparison!
\begin{document}
\begin{wrapfigure}{r}{0.33\textwidth}
Just a little bit of text in the wrapfigure envoronment.
A full lipsum paragraph would be too much.
We don't want this to fill the page, after all.
\end{wrapfigure}
\iffailmiserably{This} fails miserably. \else This {works fine.} \fi
\lipsum
\end{document}