# Is xskak compatible with wrapfig?

I would like to show some (chess) moves, wrapping them around the resulting chessboard. The following code:

\documentclass[twocolumn]{article}

\usepackage{xskak}
\usepackage{wrapfig}
\usepackage{lipsum}
%\raggedright

\begin{document}

\newchessgame

\setchessboard{tinyboard,
showmover=false,
marginwidth=0pt,
labelleft=false,
labelbottom=false}

\hidemoves{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1
b5 7. Bb3 O-O 8. a4 Bb7 9. d3 Re8 10. Nbd2 Bf8}

\begin{wrapfigure}{r}{80pt}
\chessboard
\end{wrapfigure}
%\lipsum[1]
\variation{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1
b5 7. Bb3 O-O 8. a4 Bb7 9. d3 Re8 10. Nbd2 Bf8}

\end{document}


produces the following, where the moves get in the way of the board. However, normal text flows nicely, as you can see uncommenting the lipsum line. How could I get the moves to flow around the board?

-

The problem is that all the printing is done inside a group and so also the paragraph starts inside the group. This seems to be the cause of the problem. As soon as you print something before the game it works. You can e.g. use \leavevmode\variation{...} or \leavevmode\printchessgame. I will add the \leavevmode to \printchessgame, but I can't change \variation as this command comes from the skak package.