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

enter image description here

Above is an example produced by S\overline{n}=\overline{n+1}. The overlines are not aligned vertically, which is highly undesirable. Is there any way to produce overlines of the same height throughout a whole formula?

share|improve this question
\overline{\strut...} – David Carlisle Mar 15 '13 at 20:21
@DavidCarlisle Well, strut is too high... – 4ae1e1 Mar 15 '13 at 20:24
if you need it to be high enough for brackets and superscripts and things with all the overlines the same height then that's what you need, if you have it lower then more expressions will have a raised overline, but you can make a strut of any height \def\mystrut{\rule{0pt}{.6em}} experiment with whatever height you like. – David Carlisle Mar 15 '13 at 20:28
You might be be interested in this post: Can I get a \widebar without using the mathabx package? – Hendrik Vogt Mar 15 '13 at 21:40
up vote 5 down vote accepted

If you want the same height, here's a way:


but the result is far from pretty. To be honest, I prefer the version you get.

enter image description here

share|improve this answer
Yeah, it is a little bit off expectation, but it looks okay in 10pt or 11pt. Better than the original one, I mean. – 4ae1e1 Mar 15 '13 at 20:39
Of course, the code becomes really annoying both to write and to read, even if shortcut is used. – 4ae1e1 Mar 15 '13 at 20:42
@KevinSayHi TeX is not clairvoyant, so small manual adjustments are sometimes needed when object with different characteristics need to be set next to each other. – egreg Mar 15 '13 at 20:45

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.