XeTeXSubscripts at uneven Level

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
tafi
Posts: 42
Joined: Sat May 07, 2011 12:01 am

Subscripts at uneven Level

Post by tafi »

I'm currently using Minion Pro as my main text font and the Times based STIX fonts for maths via the mathspec package.

Code: Select all

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{mathspec}

\defaultfontfeatures{Scale=MatchLowercase}
%
\setmainfont[Mapping=tex-text]{Minion Pro}
\setsansfont[Mapping=tex-text]{Myriad Pro}
\setmonofont[Mapping=tex-text]{Courier New}
%
\setmathsfont(Digits)[Numbers={Lining,Proportional}]{Minion Pro}
\setmathsfont(Latin)[Scale=MatchLowercase]{STIXGeneral}
\setmathsfont(Greek)[Scale=MatchLowercase]{STIXGeneral}

\begin{document}

Scaling between Minion and STIX is correct, eg: $4X$

But subscripts are NOT placed at uniform height

\begin{equation}
C_{3} = \frac{n^{*}_{3}}{n_3} = \frac{p_{1}\varepsilon_{1}\varepsilon_{2}}{p_{3}\varepsilon_{3}}
\end{equation}
%
\begin{align}
a^{c} &= b^{c} = A^{c} \\
A_{c} &= p_{c} = a_{c}
\end{align}

\end{document}
When setting equations, the subscripts appear to be placed at non-uniform height depending on the character they are appended to.

If, instead I choose not to specify a maths font, xelatex reverts to using Computer Modern for maths

Code: Select all

\documentclass[11pt]{article}

\usepackage{amsmath}

\usepackage{mathspec}

\defaultfontfeatures{Scale=MatchLowercase}
%
\setmainfont[Mapping=tex-text]{Minion Pro}
\setsansfont[Mapping=tex-text]{Myriad Pro}
\setmonofont[Mapping=tex-text]{Courier New}
%
\setmathsfont(Digits)[Numbers={Lining,Proportional}]{Minion Pro}

\begin{document}

Scaling between Minion and CM is NOT correct, eg: $4X$

But subscripts are placed at uniform height

\begin{equation}
C_{3} = \frac{n^{*}_{3}}{n_3} = \frac{p_{1}\varepsilon_{1}\varepsilon_{2}}{p_{3}\varepsilon_{3}}
\end{equation}
%
\begin{align}
a^{c} &= b^{c} = A^{c} \\
A_{c} &= p_{c} = a_{c}
\end{align}

\end{document}
In this case, subscripts are displayed correctly (ie at uniform vertical position). But CM is scaled differently compared to Minion and i have no idea how to equalise their x-heights (since I didn't specify a maths font, how can i change its characteristics?)

I have tried using the unicode-math package with STIX and the result is the same as in the first example. Neither package can display the subscripts correctly when system fonts are used for math latin or math greek.

So, in summary, two quetions:

How to alter subscript positions to match up vertically for ALL characers?

How to scale Computer Modern to match x-height of the body text?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply