# Globally raising the math axis

Is there a way to raise the position of binary relations and operators by a set amount, so that =,+,-, etc. is raised a little bit without explicit markup?

For instance, in the following example, most probably due to the fact that this font was not designed for professional math typesetting in the first place, < and = look too low to my eyes:

% !TeX program = xelatex
\documentclass[10pt]{article}
\usepackage{mathspec}
\setmainfont{Helvetica Neue}
\setsansfont{Helvetica Neue}
\setmathfont(Latin,Digits)
[Scale=MatchLowercase,Uppercase=Regular,Lowercase=Regular]{Helvetica Neue}

\begin{document}
$A>B>C=D$
\end{document}

I really hate to have to use Helvetica (and in upright shape!) for typesetting math, but unfortunately I have no choice in this matter.

If raising the math axis is not possible or creates more problems than it may solve, I am also open to other suggestions.

• Only the operators such as \sum are centered with respect to the math axis. – egreg Mar 2 '17 at 21:14
• @egreg I see that now, thanks to David's illustration. As I mentioned, then, I am open to other suggestions. – balcinus Mar 2 '17 at 21:20

You can raise the math axis (fontdimen22)

\documentclass[10pt]{article}
\usepackage{mathspec}
\setmainfont{Arial}
\setsansfont{Arial}
\setmathfont(Latin,Digits)
[Scale=MatchLowercase,Uppercase=Regular,Lowercase=Regular]{Arial}

\begin{document}
$\sum A>B>C=D$

\edef\savedaxis{\the\fontdimen22\textfont2}
\fontdimen22\textfont2=10pt
$\sum A>B>C=D$
\fontdimen22\textfont2=\savedaxis

{
\global\mathchardef\oldgt\mathcode>
\global\mathcode>"8000
\catcode>\active
\gdef>{\mathrel{\raisebox{1pt}{$\oldgt$}}}

\global\mathchardef\oldeq\mathcode=
\global\mathcode="8000
\catcode=\active
\gdef={\mathrel{\raisebox{1pt}{$\oldeq$}}}
}
$\sum A>B>C=D$

\end{document}

But as seen here only display operators, and fractions etc are explicitly positioned on the axis, characters such as < are just assumed to be designed to match.

you could make all affected characters math-active (mathcode "8000) and have a definition that raised each character. I suppose...

• Could you provide a line of code for < and/or + to make them math-active, and say, to raise them by 2pt (or something else) for illustration purposes? If you don't mind. I'd appreciate it much. – balcinus Mar 2 '17 at 21:17
• @balcinus done. – David Carlisle Mar 2 '17 at 21:28
• Perfect. Thank you: this solves my problem then. – balcinus Mar 2 '17 at 21:30