I'm trying to typeset `$\frac{x^*}{2}$`, but I can't find a (simple) way to make the alignment look nice. So far, I've tried the following:

```
\documentclass{article}
\begin{document}

\begin{equation}
\frac{x^*}{2} \qquad \frac{x^*}{2\phantom{{}^*}}
\end{equation}

\end{document}

```

With the following output:

![alignment issues](https://i.stack.imgur.com/xaL0R.png)

In the left one, it looks odd because the `x` is very off-center, and in the right example the fraction bar is extended way more to the right than what's really necessary.

Is there a nicer (and still simple enough) way to typeset this fraction?
['https://tex.stackexchange.com/questions/100326', 'https://tex.stackexchange.com', 'https://tex.stackexchange.com/users/223/']
```
\begin{equation*}
\frac{x^*}{2} \quad \frac{x^*}{2\phantom{{}^*}} \quad
\frac{x\rlap{$^*$}}{\,2\,}
\end{equation*}

```

The correct one is the first one, as the ugly syntax of the other two demonstrates :-) However, I have to admit that the third one is the best looking one:

![Result](https://i.stack.imgur.com/TFIy2.png)

Update
======

As egreg noted in a comment, the problem with the third solution is that it is not clear if the \* applies only to x, or to the whole fraction. Thiking about this, I've found another solution which avoids this problem, has a cleaner syntax, and still (imho) looks better than the first one.

The following MWE shows first the standard way, second my first attempt, and third my new proposed solution. I put them in the context of a bigger expression, and aligned them vertically at the right bar, for easier comparison:

```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\Big|\frac{x^*}{2}               \Big|&=y \\
\Big|\frac{x\rlap{$^*$}}{\,2\,}  \Big|&=y \\
\Big|\frac{x^*\!}{2}             \Big|&=y
\end{align*}
\end{document}

```

![enter image description here](https://i.stack.imgur.com/CJXyd.png)
Aligning things that should not be aligned is a bad idea. Very similar example to yours is adding `\phantom{-}` in front of `0` and `1` in matricis comprising only `0`, `1` and `-1`. You align the numbers, but you lose the visual distinction between `1` and `-1`.

Here, it is a bit different but still valid: I, as a reader, would really get the impression that there's a missing symbol after `2`, just because the whole denominator is not centered, whereas I expect it to be centered.

Conclusion: Two options are correct: `\frac{x^*}{2}` and `x^*/2`.