[Tex/LaTex] LaTeX ignores \setstretch or changing \baselinestretch in one paragraph

line-spacingsetspace

I have a LaTeX document that looks like this:

...
\usepackage{setspace}
\setstretch{1.5}
...
\begin{document}
...
some text\\
\begin{minipage}{\textwidth}
% some TIKZ image
\end{minipage}
some text

new paragraph\\
\begin{minipage}{\textwidth}
% some TIKZ image
\end{minipage}
...
\end{document}

The text before the "new paragraph" appears correctly spaced, however the text under "new paragraph" and some of the paragraphs following it appear with a very small space between the lines.

Any idea why it happens and how to fix it?

Best Answer

the minipage is treated as a single line, with the baseline through its center. therefore, the height between the line preceding the minipage will almost always be too close to the first line of the minipage. this is especially apparent when the preceding line contains no descenders.

you will need to manually add more space between the preceding line and the minipage. the exact amount will depend on the type size of the font being used.