I'm looking for a way to lay out a series of chess problems, each of which has a figure (a chessboard diagram) and some text. Each figure is about 70x70mm. In an effort to avoid too much wasted page space, I have tried using packages floatflt and wrapfig to get text typeset to wrap around a figure. However, this does not prevent figures overlapping each other -- this can happen if one problem has so little text that its figure extends further down the page than its text.
So how can I prevent figures overlapping?
It would be nice to resume typesetting at a y-coordinate which is just below the lowest figure, or just below the lowest line of text, whichever is the lower.
I envisage something which is like a \FloatBarrier but which is impervious to figures. Perhaps coupled with something like \parshape which controls the margin behaviour of a block of text which includes several paragraphs.
I have tried enclosing each problem (figure and text) in
\begin{minipage}[l]{\textwidth}
...
\end{minipage}
(where \textwidth is the distance between the margins on the full page) but that again fails to keep the figures apart.
I tried
\begin{tabular}{cc}
\rule{0mm}{70mm}&
\begin{minipage}[l]{\textwidth}
...
\end{minipage}
\end{tabular}
but the result is a typographical disaster when there is so little text that it occupies less vertical space than the figure. Again, figures overlap. My intention was to use something which is like a \strut but taller, and taking effect over a block of text which contains a few paragraphs.
MWE:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[LSBC4,T1]{fontenc} % use fontenc before chessboard
\usepackage{chessboard}
\usepackage{placeins,floatflt}
\usepackage{lipsum}
\setboardfontencoding{LSBC4}
\setlength{\hoffset}{-20mm}
\setlength{\textwidth}{180mm}
\setlength{\voffset}{-30mm}
\setlength{\textheight}{262mm}
\newcommand{\figWidth}{69mm}
\begin{document}
\begin{floatingfigure}[l]{\figWidth}
\setchessboard{setfen=/PP/k//K///1q}
\chessboard
\end{floatingfigure}
Frank M\"uller
Mezija, Jan-Mar 1997, no. 883
s\#3
Solution: 1 a8=Q+ Kb6 2 b8=Q+ Kc5 3 Qb4+ Qxb4\#
%\FloatBarrier
%\subsubsection{}
\begin{floatingfigure}[r]{\figWidth}
\setchessboard{setfen=2kr1B/p1pNK1p/RPp2P/4P/2P/1p}
\chessboard
\end{floatingfigure}
Gustav Jönsson
Eskilstuna Kuriren, 1939; FIDE Album 1914--44, no. 334
Proca-retractor. White retracts four moves and then checkmates in one
Keywords: Valladao theme (castling, en passant capture and underpromotion)
Solution: \lipsum[1] And some of this text has overlapped the figure's bottom.
\end{document}