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.

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... –  KevinSayHi Mar 15 '13 at 20:24
3  
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
add comment

1 Answer

up vote 4 down vote accepted

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

\documentclass{article}
\begin{document}
$S\overline{n\vphantom{+1}}=\overline{n+1}$
\end{document}

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. –  KevinSayHi Mar 15 '13 at 20:39
    
Of course, the code becomes really annoying both to write and to read, even if shortcut is used. –  KevinSayHi Mar 15 '13 at 20:42
1  
@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
add comment

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.