[XeTeX] Primes and unicode-math.

Stratos Paschos paschos.s at gmail.com
Mon Oct 11 21:23:42 CEST 2010

On Sun, Oct 10, 2010 at 11:19 PM, Cole Leahy <coleleahy at gmail.com> wrote:
> This is more or less a continuation of the thread
> at http://tug.org/pipermail/xetex/2010-October/018741.html. Unfortunately, I
> don't know how to include this message in that thread, since I don't
> actually receive email from this list. Please excuse me. Anyway, Khaled's
> suggestion from that thread worked; using the following source, Greek and
> Latin characters appear in the desired font within math mode.
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{unicode-math}
> \setmainfont{Linux Libertine O}
> \setmathfont{xits-math.otf}
> \setmathfont[range=\mathit/{latin,Latin,greek,Greek}]{Linux Libertine O  Italic}

Put the line
\setmathfont{xits-math.otf} AFTER the line
\setmathfont[range=\mathit/{latin,Latin,greek,Greek}]{Linux Libertine O  Italic}

> \begin{document}
> Since $X$ is club in $\kappa$, so is the derivative $X\prime$. Therefore
> each superset of $X'$ is stationary. Blah blah. It follows that $\{\xi < > \kappa : \xi \text{ is Mahlo} \} \supseteq \{\xi < \kappa : \xi \text{ is > the } \xi^{\text{th}} \text{ Mahlo} \}$ is stationary in $\kappa$, and that
> $\kappa$ is the $\kappa^{\hspace{0.2mm}\text{th}} \text{ Mahlo}$.
> \end{document}
> Yet, as you'll see if you compile it, the primes are tiny and
> misplaced. (The related thread from a few days ago, at
> http://tug.org/pipermail/xetex/2010-October/018636.html, isn't helping me
> here.) Furthermore, if in the final line of the preamble one uses, say,
> Minion Pro instead of Libertine, the primes vanish. If the issue is that
> unicode-math is looking for the prime glyph in Libertine (or Minion, as the
> case may be) how can I tell it to look in XITS instead? Also, as I feared
> would happen, the kerning on exponents, commas, and the like isn't ideal. Is
> there a way to get around this that's more efficient than tweaking hspace as
> needed?
> Thanks again,
> Cole
>

Stratos