Spurious [?] vertical space introduced by multicols
In order to have the first lines at the same height as in normal setting, multicol
sets \splittopskip
to \topskip
. This means that TeX will add glue equal to \topskip-<height of first line>
above each column, ensuring they will be at the same reciprocal height, unless it's bigger than \topskip
(in this case zero glue would be inserted).
In your setting, the added glue above each column is 3.84921pt (10pt minus the height of a “t”, because the standard value of \topskip
is 10pt, with the 10pt
class option).
You can zero this added space by setting \topskip
to a more sensible value, for instance the height of a capital letter.
\documentclass[10pt]{article}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage{calc}
\setlength{\fboxsep}{3mm}
\setlength{\fboxrule}{1pt}
\begin{document}
\noindent\fcolorbox{red}{red!20}{%
\begin{minipage}[t]{\textwidth-2\fboxrule-2\fboxsep}
\setlength{\topskip}{\fontcharht\font`B }
\begin{multicols}{3}
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text
\end{multicols}
\end{minipage}}
\noindent\fcolorbox{red}{red!20}{%
\begin{minipage}[t]{\textwidth-2\fboxrule-2\fboxsep}
text text text text text text text text text text text text text
text text text text text text
\end{minipage}}
\end{document}
The problem doesn't come from multicol itself :
The minipage environment eat all space around multicol, and the fcolorbox add some spurious space :
\documentclass[10pt]{article}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage{calc}
\setlength{\fboxsep}{3mm}\setlength{\fboxrule}{1pt}%
\setlength{\multicolsep}{20pt}
\begin{document}
\hrule
\begin{multicols}{2}%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{multicols}
\hrule
\begin{minipage}[t]{\textwidth-2\fboxrule-2\fboxsep}%
\setlength{\multicolsep}{0pt}
\begin{multicols}{2}%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{multicols}
\end{minipage}
\noindent\fcolorbox{red}{red!20}{%
\begin{minipage}[t]{\textwidth-2\fboxrule-2\fboxsep}%
\setlength{\multicolsep}{0pt}
\begin{multicols}{2}%
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{multicols}
\end{minipage}}
\noindent\fcolorbox{red}{red!20}{%
\begin{minipage}[t]{\textwidth-2\fboxrule-2\fboxsep}%
text text text text text text text text text text text text text text text text text text text
\end{minipage}}%
\end{document}