Is there a way to adjust the height of \vline?
Asked
Active
Viewed 1.7k times
2 Answers
17
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}
Heiko Oberdiek
- 271,626
4
\vline is designed to make a rule exactly as heigh as the surrounding box so it has no^* control over the height. The LaTeX \rule command has explicit arguments to give the height and width of the rule, so you may be looking for that.
See @Heiko's answer for a partial contradiction to this statement.
David Carlisle
- 757,742
-
1the depth of tex's
\vrules was plumbed a long time ago. see the tugboat warning, on the second page toward the end. – barbara beeton Nov 29 '12 at 18:05

\relaxinvlineallowing it to parse a followingheightwas intentional, it's very un-latex-like: +1 anyway:-) – David Carlisle Nov 29 '12 at 17:36