1

Look at the alignment of the following two formulas:

X^* \cong \prescript{*}{}{X}

enter image description here

The right stare, produced with \prescript, is higher than the left one. One solution from this question suggests a \vphantom inside the \prescript, which doesn't change anything here since the two stars are the same size.

Here is a related problem:

\prescript{*}{}{\left(X^*\right)} \cong X \cong \left(\prescript{*}{}{X}\right)^*

enter image description here

Maybe the different heights here are caused by the different sizes of X and (.

In both cases, how do I align the stars to be on the same height?

Turion
  • 4,622
  • 1
    why not just use ^*(X^*) \cong X \cong (^*X)^*, as this solves the height-problem? (possibly remove some spacing). Of course prescript should work the same way, so your question is of course relevant to improve consistency among packages. I guess \prescriptis from mathtools, so it should probably be fixed there. – Runar May 29 '16 at 11:12
  • @runartrollet, good point, I didn't think of it! Do you want to post it as an answer? – Turion May 29 '16 at 12:02
  • You are misusing \left and \right, that should not appear in this context. – egreg May 29 '16 at 12:30
  • @egreg, I was previously under the impression that the brackets were larger if I put something with a superscript inside. Good to learn I was wrong. – Turion May 29 '16 at 13:32
  • You may get larger delimiters with $\left(X^*\right)$, but you don't need them; $(X^*)$ is as clear (and more typographically sound). – egreg May 29 '16 at 13:33
  • @runartrollet, the horizontal spacing is not very good, as you say. But in my first example, even the vertical spacing comes out incorrectly. – Turion May 29 '16 at 13:34
  • @egreg, if it would give me larger delimiters, why would the smaller ones be considered sound (since apparently the content is too big for them)? – Turion May 29 '16 at 13:35
  • There's no need to cover the complete height; the most instructive example is the comparison between \left(\sum_{i=1}^n a_i\right) and \biggl(\sum_{i=1}^n a_i\biggr) in a displayed formula: the latter is good, the former has too big delimiters. Also consider the depth: a bigger delimiter also has bigger depth. – egreg May 29 '16 at 13:37

2 Answers2

2

Use the fouridx package instead:

Edit:

I also included the suggestion by the O.P. to smash the parentheses in order to have lower *s

\documentclass{article}
 \usepackage{mathtools}
 \usepackage{fouridx}

\begin{document}

\[ \fourIdx{*}{}{*}{}{\!(X})\quad (\fourIdx{*}{}{*}{}{\!X)} \]

\[ \fourIdx{*}{}{*}{}{\!\smash{(}X})\quad (\fourIdx{*}{}{*}{}{\!X\smash{)}} \]

\end{document} 

enter image description here

Bernard
  • 271,350
  • For completeness, in order to avoid the * peeking so high out of the brackets, I went for \fourIdx{*}{}{*}{}{\smash{(}X}), which reduces the vertical size of ( to zero. – Turion May 29 '16 at 13:55
  • @Turion: That's a fine idea! I'll add it to my answer, if you don't mind. – Bernard May 29 '16 at 13:59
2

Although this should be fixed for consistensy in mathtools, a fix could be to do something like this, as my original comment mentioned:

\documentclass[11pt]{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
% Original code, \prescript at wrong height
    \prescript{*}{}{\left(X^*\right)} \cong X \cong \left(\prescript{*}{}{X}\right)^*\\
% Just with ^* (no \prescript), also no \left \right, since it's just a single line with no symbols larger than current line
    ^*(X^*) \cong X \cong (^*X)^* \\
% And some cahnge in spacing
    ^*(X^*) \cong X \cong (^*\mkern-4mu X)^* \\
\end{align}
\end{document}

enter image description here

Runar
  • 6,082
  • 1
    (+1) Just a suggestion: the kerning should depend on the fontsize, so you might use something like ^*\mkern-3mu (adapt the value to what fits best, of course. I used this as it corresponds to \!). – Bernard May 29 '16 at 14:04
  • @Bernard You are of course right. I added the change. Thank you. – Runar May 29 '16 at 14:37