1

Why does picinpar paragaph text overlap the caption of the figure whenever I put equations in the paragraph?

\documentclass[a4paper,10pt]{book}

\usepackage{graphics}
\usepackage{graphicx}
\usepackage{picinpar}
\usepackage{lipsum}
\usepackage[T1]{fontenc}

\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

\lipsum[75]

\begin{figwindow}[3,l,\includegraphics[width=5cm]{example-image-a}, {Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.} \label{fig:example-image-a}]
Blabla

\begin{equation}
 \begin{split}
   5 m + 2 m                    & = (5+2) m         = 7 m \\
   5{\times}4 + 2{\times}4      & = (5+2){\times}4  = 28 \\
   5 x + 2 x    & = (5+2) x         = 7 x \\
 \end{split}
\end{equation}

Blabla

\begin{equation}
 \begin{split}
   5 m + 2 m                    & = (5+2) m         = 7 m \\
   5{\times}4 + 2{\times}4      & = (5+2){\times}4  = 28 \\
   5 x + 2 x    & = (5+2) x         = 7 x \\
 \end{split}
\end{equation}

Blabla

\begin{equation}
 \begin{split}
   5 m + 2 m                    & = (5+2) m         = 7 m \\
   5{\times}4 + 2{\times}4      & = (5+2){\times}4  = 28 \\
   5 x + 2 x    & = (5+2) x         = 7 x \\
 \end{split}
\end{equation}

Blabla

\begin{equation}
 \begin{split}
   5 m + 2 m                    & = (5+2) m         = 7 m \\
   5{\times}4 + 2{\times}4      & = (5+2){\times}4  = 28 \\
   5 x + 2 x    & = (5+2) x         = 7 x \\
 \end{split}
\end{equation}

Blabla

\begin{equation}
 \begin{split}
   5 m + 2 m                    & = (5+2) m         = 7 m \\
   5{\times}4 + 2{\times}4      & = (5+2){\times}4  = 28 \\
   5 x + 2 x    & = (5+2) x         = 7 x \\
 \end{split}
\end{equation}

\end{figwindow}

\lipsum[75]

\end{document}

Paragraph text overlaps with caption text if equations are used.

Edit:

I'm using Overleaf.

Edit:

This is how my real document looks:

This problem in my "real" document.

Edit:

This is the result after deleting blank lines before equations.

Result after deleting blank lines before equations.

12
  • 1
    Are you open to other solutions that doesn't use (the legacy) picinpar package?
    – Werner
    Feb 1, 2016 at 20:06
  • 1
    possibly unrelated but you should never have a blank line before a displayed equation the spacing will always be wrong in that case. Feb 1, 2016 at 20:19
  • @Werner Yes, as long as it's not something like using tabular and manually adjusting the amount of paragraph text that goes beside the picture-caption set. BTW, I used wrapfigure before, but I changed this one instance to picinpar because of a problem of wrapfigures next to lists. Feb 1, 2016 at 20:54
  • @LeonardoCastro: Why do you use this layout in the first place? What is the preferred wrapping? What do you mean by "manually adjusting the amount of paragraph text that goes beside the picture-caption set"?
    – Werner
    Feb 1, 2016 at 20:57
  • 1

0

You must log in to answer this question.

Browse other questions tagged .