2

I'm having issues with aligning superscript with subscript in math mode. My MWE is:

% arara: xelatex
\documentclass[preview,8pt,varwidth=true]{standalone}
\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{fontspec}
\setmathfont(Greek,Digits,Latin){CMU Bright Roman}
\usepackage[normalweight=Light,largedelims=true]{mdsymbol}
\setmathrm[ItalicFont=CMU Bright Roman, BoldFont=CMU Bright Roman,BoldItalicFont=CMU Bright Roman]{CMU Bright Roman}
\begin{document}
\thispagestyle{empty}
$v_{\alpha\beta}^\star$
\end{document}

If you take a closer look, you'll see that the star is pushed to the left slightly.

0

1 Answer 1

3

No, it's not pushed to the left; the visual effect depends on how \alpha sits in its bounding box. Read in the manual of mathspec about the use of ".

With a proper math font, the subscript would probably be pushed a bit left, to take into account the shape of the letter “v”, but mathspec can't do that. It's just a hack, notwithstanding its cleverness.

\documentclass[border=4]{standalone}
\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{fontspec}
\setmathfont(Greek,Digits,Latin){CMU Bright Roman}
\usepackage[normalweight=Light,largedelims=true]{mdsymbol}
\setmathrm[
  ItalicFont=CMU Bright Roman,
  BoldFont=CMU Bright Roman,
  BoldItalicFont=CMU Bright Roman
]{CMU Bright Roman}

\begin{document}

$v_{\smash{\vrule width 0.1pt height 1cm\kern-0.1pt}\alpha\beta}^\star$

$"v_{\smash{\vrule width 0.1pt height 1cm\kern-0.1pt}\alpha\beta}^\star$

\fboxsep=0pt \fboxrule=0.1pt

\fbox{$\star$} \fbox{$\alpha$}

\end{document}

enter image description here

2
  • Thanks for your response! And what would be the way to push the star to the right, so that left point of the star is not above the letter "v"?
    – MarkoP
    Commented Nov 5, 2018 at 14:44
  • @MarkoP Something like ^{\,\star} or, for finer control ^{\mkern2mu \star}. Experiment what's best.
    – egreg
    Commented Nov 5, 2018 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .