0

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?

  • 2
    Please help us help you and add a minimal working example (MWE) that illustrates your problem. – user36296 Sep 22 '16 at 9:24
  • 1
    if you want us to spot an error in your code, it helps if you show the code. I would guess that you closed a group before the end of the paragraph so the baseline setting went out of scope but since there is no example it is impossible to guess. (why are you putting the tikz in a minipage?) – David Carlisle Sep 22 '16 at 9:58
  • also, don´t use `\\` to create new lines, outside of math- and tableenvironments. Use a empty line instead. – Runar Sep 22 '16 at 11:49
  • @RunarTrollet -- the blank line, while often the best approach, also starts a new paragraph, and thus indents the first line of what follows. since what folllows here is a minipage, it would be indented, and result in a report of an overfull box. – barbara beeton Sep 22 '16 at 12:21
  • 1
    @cfr -- yes, a \noindent before the minipage would avoid an underfull box, but it wouldn't really get rid of the problem that the space between the preceding text and the minipages wouldn't necessarily always be the same size. i think that adding a strut at the end of the preceding text, and applying a [t] to the minipage would do what's wanted, but i'm not sure enough without testing, and i don't want to assume that \documentclass{article} is what's being used. – barbara beeton Sep 23 '16 at 1:59
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.