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.

Typing \frac{W+W^*}{2} gives a fraction in which the denominator appears to the eye to be in the wrong position. Is there a way to correct this, i.e. place the 2 in under the + (without using arbitrary negative spacing)?

share|improve this question
    
Are you using inline-mode or display-mode? –  Johannes_B Dec 18 '13 at 8:38
    
Welcome to TeX.SX! –  Claudio Fiandrino Dec 18 '13 at 8:54
add comment

2 Answers 2

up vote 6 down vote accepted

I propose five possibilities:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
% no adjustment
\frac{W+W^{*}}{2}=
% push the denominator left by the width of the asterisk
\frac{W+W^{*}}{2\hphantom{^{*}}}=
% make the asterisk protrude to the right (and add a correction)
\frac{W+W^{\mathrlap{*}}}{2}\,=
% push the denominator a bit left
\frac{W+W^{*}}{\!2}=
% change the order
\frac{W^{*}+W}{2}
\]
\end{document}

enter image description here

Probably the middle one is the best, in this particular case.

share|improve this answer
add comment

Use \hphantom:

\documentclass{article}
\begin{document}
  \[
  \frac{W+W^*}{2\hphantom{^{*}}}
  \]
\end{document}

enter image description here

The idea is to exploit the fact that ^{*} is the extra parameter in W + W. Adding a horizontal space of extra ^{*} to the denominator (after 2) does the work to bring 2 to the centre of W + W

share|improve this answer
    
Shouldn't it be \hphantom{^{*}}? –  egreg Dec 18 '13 at 8:44
    
I got a different answer in another latex group: use \frac{W+W^{\rlap{$\scriptscriptstyle*$}}{2} with the slight advantage that the horizontal line only reaches until the second W. But your answer is more elegant. –  Chrystomath Dec 18 '13 at 9:01
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.