Vertical space after minipage (EDIT : in an environment)
minipage
are centred by default which means that (typically) they have both height and depth larger than \baselineskip
this means that when lines containing such large boxes are stacked baseline spacing can not be preserved and so TeX just separates the resulting boxes by \lineskip
which is normally 1pt. All information about the baselines within the box is gone so there is no equal spacing between lines in different boxes.
If you only need to worry about space above or below a minipage
you can use [t]
or [b]
which puts the reference point for the box on the top or bottom line so normal baselineskip
calculation can be made. But this only works at one end of the box. To do both you could use a box that records both reference points (the infamous expl3 coffin for example) but simpler just case the boxes to be abutted with no space by setting \lineskip
to zero, and then use a \strut
at the start and end of the text so that the baseline of the first row is \ht\strutbox
from the top of one box and the baseline of the previous row is \dp\strutbox
from the bottom of its box, so the visible baselines are the height+depth of a \strut
apart, that is, normal baseline spacing.
\showoutput
\showboxdepth=3
\documentclass[12pt]{article}
\def\alpha{abcdefghijklmnopqrstuvwxyz}
\newcommand\alphabet{%
\noindent\begin{minipage}{5.5cm}%
\strut\alpha\ \alpha\ \alpha\strut
\end{minipage}%
}
\begin{document}
{\setlength\lineskip{0pt}
\alphabet\ \alphabet\ \alphabet\ %
\alphabet\ \alphabet\ \alphabet\ %
\alphabet\ \alphabet\ \alphabet\ %
\strut some more text for illustration purposes
}
\end{document}
In TeX boxes have a width, height and depth (cf. Understanding minipages - aligning at top). The "bottom" of the minipage gets aligned with the baseline of the main page, but what you want is for the final baseline of the minipage to be aligned with the baseline of the text of the main page. You need to add in the space of the depth of the final line in the minipage:
\documentclass[12pt]{article}
\def\alpha{abcdefghijklmnopqrstuvwxyz}
\newcommand\alphabet{%
\noindent\begin{minipage}{5.5cm}%
\alpha\ \alpha\ \alpha\ %
\sbox0{\alpha}%
\vspace{\dp0}%
\end{minipage}%
}
\begin{document}
\alphabet\ \alphabet\ \alphabet\ %
\alphabet\ \alphabet\ \alphabet\ %
\alphabet\ \alphabet\ \alphabet\ %
some more text for illustation purposes
\end{document}
For a quick fix you can simply insert some space by hand -- which in my opinion corresponds to something like a fifth of \baselineskip
:
\documentclass{article}
\newcommand\alphabet{abcdefghijklmnopqrstuvwxyz}
\newcommand\tripplealphabet{%
\noindent
\begin{minipage}{5.5cm}
\noindent\alphabet\ \alphabet\ \alphabet
\end{minipage}
\vskip.2\baselineskip
}
\begin{document}
\tripplealphabet
some text
some more text
\end{document}
For a double check of this soulution you might wanna try:
...
\setlength\parindent{0em}
...
\begin{document}
\tripplealphabet
\alphabet
\alphabet
\end{document}