Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 8 down vote accepted

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

share|improve this answer
    
hmm I wonder if the lack of a \relax in vline allowing it to parse a following height was intentional, it's very un-latex-like: +1 anyway:-) –  David Carlisle Nov 29 '12 at 17:36

\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.

share|improve this answer
    
the 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.