# Problem with balancing multicols with minipage inside

I have two minipages one above the other with [b] and [t] options set to have right baselineskip. Second minipage/varwidth is in the multicols environment and if it have more then two lines, it getting outside the textheight. What to do?

\documentclass{article}

\usepackage[paperwidth=10cm,paperheight=5cm,showframe]{geometry}

\usepackage{varwidth}

\usepackage{multicol}

\premulticols0pt
\postmulticols0pt
\columnsep0pt
\setlength{\multicolsep}{0pt}

\begin{document}

\noindent LABORE ET DOLORE

\vfill

\noindent\begin{minipage}[b]{\linewidth}
\raggedleft
LOREM IPSUM

LOREM IPSUM
\end{minipage}

\begin{multicols}{2}

\null
\vfill

\noindent DOLOR SIT

\columnbreak

\noindent\hfill\begin{varwidth}[t]{.5\textwidth}
\raggedleft
MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA
\end{varwidth}
\end{multicols}
\end{document}


Update

I change slightly @alephzero code in order to flush baseline of the tabular text to the bottom (with descenders out of textheight). I know it isn't pretty solution. But it works.

\documentclass{article}

\renewcommand{\arraystretch}{0}

\usepackage[paperwidth=10cm,paperheight=5cm,showframe]{geometry}

\newlength{\myheight}

\begin{document}

\setlength{\myheight}{\fontchardp\fontp}

\noindent LABORE ET DOLORE

\vfill

\noindent\begin{minipage}[b]{\linewidth}
\raggedleft
LOREM IPSUM

LOREM IPSUM
\end{minipage}\strut

\noindent\begin{tabular}{@{}l@{}l@{}}
\parbox[t]{0.5\linewidth}
{DOLOR SIT}
&
\parbox[b]{0.5\linewidth}
{\raggedleft
MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA\vphantom{p}}
\end{tabular}

\enlargethispage{\myheight}

\end{document}


• What are you trying to do? What you should do depends on what you are trying to do, and I'm not sure what that is. But I suspect the answer will begin with 'don't use multicols here. If you are using minipage environments, you already have control over the alignment. Why put them in a multicols environment as well? – cfr Apr 30 '15 at 23:34
• @cfr I do a template for standard book page which always have texts of different lengths in three corners and could have another one text at the bottom (right under lower corner texts). Here you can see example. Exactly I don't know how to do it in a right way. – web-stranger Apr 30 '15 at 23:43
• @cfr I put minipage inside multicols because I need to have correct baselineskip between right-sided minipages and bottom aligning of left-sided text (DOLOR SIT) at the same time. – web-stranger Apr 30 '15 at 23:46
• I don't see why just using minipages wouldn't be easier. I understand why you want minipages. I don't understand why you want multicols. But, to be honest, I don't know what you are trying to align with what. – cfr Apr 30 '15 at 23:53
• @cfr here i used only minipages. But there is another problem: how to make correct baselineskip between right-sided minipages and at the same time bottom aligned left-sided minipage. I can't do it, because for correct baselineskip I need upper minipage with [b] and lower minipage with [t], but for bottom aligning I need both lower minipages having [b]. So it why I trying to do it with multicols. – web-stranger Apr 30 '15 at 23:58

This seems to do what you want, without \multicol or \varwidth.

\documentclass{article}

\usepackage[paperwidth=10cm,paperheight=5cm,showframe]{geometry}

\begin{document}

\noindent LABORE ET DOLORE

\vfill

\noindent\begin{minipage}[b]{\linewidth}
\raggedleft
LOREM IPSUM

LOREM IPSUM
\end{minipage}\strut

\noindent\begin{tabular}{@{}l@{}l@{}}
\parbox[t]{0.5\linewidth}
{DOLOR SIT}
&
\parbox[b]{0.5\linewidth}
{\raggedleft
MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA

MAGNA ALIQUA}
\end{tabular}

\end{document}


The \strut after the minipages is to give the correct baselineskip between LOREM IPSUM and MAGNA ALIQUA, but in your example link, there seems to be a bigger vertical space there.

You could use minipages instead of parboxes, but parbox` is shorter to type.

• Thank you! There is extra space at the bottom of page, but I found a solution (you can see in updated post). – web-stranger May 1 '15 at 11:19