0

I have two minipages (actually one of them is varwidth) standing one above the other. How can I keep same baseline skip in them?

I have somewhat strange layout, so I can't set [t] option for lower minipage/varwidth.

\documentclass{article}

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

\usepackage{varwidth}

\begin{document}

\noindent LOREM IPSUM

\vfill

\noindent\begin{minipage}[b]{\textwidth}
\raggedleft

LOREM IPSUM

LOREM IPSUM
\end{minipage}

\noindent\begin{minipage}[b]{.5\textwidth}
LOREM IPSUM
\end{minipage}%
\noindent\hfill\begin{varwidth}[b]{.5\textwidth}
LOREM IPSUM

LOREM IPSUM

\end{varwidth}

\end{document}

Two minipages set one above other

jub0bs
  • 58,916

1 Answers1

1

enter image description here

TeX automatically does the right thing if the baseline of the top box is on its bottom baseline and that of the bottom box is on its top baseline.

\documentclass{article}

\usepackage{varwidth}

\begin{document}

\noindent
\begin{minipage}[b]{\textwidth}
LOREM IPSUM

LOREM IPSUM
\end{minipage}

\noindent
\begin{varwidth}[t]{\textwidth}
LOREM IPSUM

LOREM IPSUM
\end{varwidth}

\end{document}
David Carlisle
  • 757,742