[texhax] \overline and \phantom

Lars Madsen daleif at imf.au.dk
Mon Jul 30 21:18:04 CEST 2012

On 2012-07-30 20:47, Paul Stanley wrote:
> Hi
> does the below code draw a line whose length equals the length of the
> expression a+x and whose height is equal to or greater than the x height
> of the tallest glyph in the expression?
> Many thanks,
> Paul
> \documentclass{article}
> \usepackage{amssymb}
> \begin{document}
> $$\overline{\phantom{a+x}}$
> \end{document}

something like that, basically \phantom{...} takes up the same space as 
... would

there are two variants as well, \vphantom who give the same height and 
depth, but no width, and \hphantom, that provide width but no depth or 

Note that none of the phantoms print their argument

At the other end there is \smash, which is like \hphantom, but it also 
prints its argument


More information about the texhax mailing list