[Tex/LaTex] \bar vs. \overline – when to use what, semantically


Following the question "The \bar and \overline commands" which is simply about the lengths of both, I'd like to know when to use \bar and when to use \overline from a semantically viewpoint.

I always used \bar, because up until now I only had single letter mean values to type. But now I came to a problem where I needed a wider "bar".

Then I just tried


  \[ \bar{a} \overline{a} \]
  \[ \bar{abc} \overline{abc} \]

where one can see that they also differ in position (\overline is lower), and also in thickness (\overline is thicker).

So, the question here is:

What does \bar represent semantically? And when to choose it over \overline and vice versa?

Best Answer

Semantically, don't use either. Use \conj, or \mean, or \variant or whatever the overline is meant to mean. Then in your preamble, do:



  1. Your document source becomes readable: you can determine the meaning right there and then.
  2. Your document becomes more flexible: if you decide to denote complex conjugation by a star instead you can simply redefine \conj without worrying about changing what \mean does.
  3. You can change from \bar to \overline on a whim and don't have to make that crucial decision now.
Related Question