I have this code where, for demonstrative purposes, I have drawn in red lines at integer values of \baselineskip and framed the minipages:
\documentclass{article}
\usepackage{calc}
\usepackage[margin = 1.0in, showframe, heightrounded]{geometry}
\usepackage{lipsum}
\setlength{\fboxsep}{-\fboxrule}% Remove space between fbox frame and content
% Red lines at baselines.
\usepackage{eso-pic}
\usepackage{atbegshi,picture,xcolor}
\AtBeginShipout{%
\AtBeginShipoutUpperLeft{%
\color{red}%
\put(\dimexpr 1in+\oddsidemargin,
-\dimexpr 1in+\topmargin+\headheight+\headsep+\topskip)%
{%
\vtop to\dimexpr\vsize+\baselineskip{
\hrule
\leaders\vbox to\baselineskip{\hrule width\hsize\vfill}\vfill
}%
}%
}%
\begin{document}
\fbox
{%
\begin{minipage}[t][\heightof{Lorem} + 9\baselineskip]{0.85\textwidth}
\lipsum[1]
\end{minipage}%
}
\hfill
Hello,
\end{document}
My question is simple: why isn't the baseline of "Hello," at precisely the next red line after the minipage?


\vtopin the definition of\AtBeginShipout. i can't figure out why the\hfillshould be needed, but removing it only makes things worse, and\struts don't help either. – barbara beeton Jul 02 '15 at 13:51\lipsum*[1]\strutand add a\parbeforeHelloit seems to match. Some of the box wizards my explain the actual size of the boxes – daleif Jul 02 '15 at 14:09[b]not[t]– David Carlisle Jul 02 '15 at 15:41