[Tex/LaTex] Adjusting the height of \vline

rules

Is there a way to adjust the height of \vline?

Best Answer

If the height and depth of a \vrule is not specified, then they are taken from the surrounding box. But it is possible to specify them explicitly:

\documentclass{article}
\begin{document}

\mbox{%
  \vline
  A
  \vline height 1ex
}

\mbox{%
  \vline
  B
  \vline height 5pt depth 3pt width 1pt
}
\end{document}

Result

Related Question