The c
option (which is the default for both \parbox
and minipage
) doesn't center with respect to the baseline, but with respect to the formula axis, which is where fraction lines are, a bit above the baseline.
This is somewhat masked when the \parbox
has more than one line, but becomes evident when it has just one line.
Let's do an experiment.
\documentclass{article}
\newsavebox{\testbox}
\begin{document}
$ $ % to activate math
\sbox{\testbox}{\parbox{2em}{ll}}
Height: \the\ht\testbox
Depth: \the\dp\testbox
Formula axis: \the\fontdimen22\textfont2
\end{document}
This will produce

Indeed, 5.97223pt minus 2.5pt is 3.47223pt and 0.97221pt plus 2.5pt is 3.47221. The difference in the fifth decimal digit is negligible and results from the roundings made by TeX to achieve machine independence.
You can get centering with respect to the baseline by lowering the resulting box by the height of the formula axis:
\documentclass{article}
\makeatletter
\newcommand{\cparbox}[2]{%
\check@mathfonts
\raisebox{-\fontdimen22\textfont2}{\parbox{#1}{#2}}%
}
\makeatother
\begin{document}
ll\parbox{2em}{ll}ll
ll\cparbox{2em}{ll}ll
\end{document}

\vcenter
primitive (for math mode) which doesn't align at baselines. Try with a longer text (to get some line breaking). – Phelype Oleinik Aug 4 '20 at 21:19t
andb
alignments, which use\vtop
and\vbox
internally, which do align at baselines. See this example (minipage
is a\parbox
in disguise, so the effect is the same). In that picture the alignment looks to be on the baseline due to the size of the text. Removeconsequat
from my example and it will also appear to be on the baseline. – Phelype Oleinik Aug 4 '20 at 21:27