TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to underline alpha's and beta's, but at the same level. I mean, I don't want but . Maybe there is already a command that make it but I couldn't find it. The second image was obtained with the following command :


which is hardly working but not totally. In normal math mode, no pbm. In scriptsize (or tiny or anything else) math mode, no pbm. But if I am in math mode within an exponent, then the \settowidth command does not seem to take into account that I am in sciptsize mode and, as a matter of fact, the underline is too long (e.g. ).

Any idea ?

share|improve this question
Would incorporating a \strut help to put all underlines at the same level? – Christian Lindig Mar 24 '11 at 11:12
A \mathstrut would be more appropriate, assuming math mode is where you want to do it. It will scale with (sub)subscripts, which the regular \strut won't do. – Harald Hanche-Olsen Mar 24 '11 at 12:08
up vote 19 down vote accepted

will do the trick.

share|improve this answer
Excellent! I have one question though: how can I achieve that the line of \underline{mytext} has the same width as mytext? – Leon Jul 29 '11 at 3:36
@Leon: You mean it doesn't? – Harald Hanche-Olsen Jul 29 '11 at 14:39
Yes, in my case, the line of \emph{\underline{\smash{Proof}}}: is shorter than the word Proof. I was hoping there was some option to set the additional width manually, like \underline[2pt]{...} or something like that... – Leon Jul 29 '11 at 18:11
@Leon: Ah. Unrelated to this question, really. But what you need is an italic correction: \emph{\underline{\smash{Proof\/}}}:. Or better yet, restructure your usage to allow \emph to do its job of adding italic correction automagically: \underline{\emph{Proof}}:. – Harald Hanche-Olsen Jul 30 '11 at 9:14

Your Answer


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.