Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

You can use the range feature of unicode-math to set the math font for a specific unicode slots or the macro accessing the glyph. I tried this with the sum sign & Latin Modern, see my example:

\documentclass{scrartcl}

\usepackage{amsmath}
\usepackage{unicode-math} % use unicode in math & setup math fonts
\setmathfont{Asana Math}
%\setmathfont[range=\sum]{Latin Modern Math} % substitute Sum sign

\begin{document}

Notice the different sum sign $\sum$, as intended. 

Notice also, the difference in spacing, not intended:
\begin{equation}
    \begin{bmatrix}
        0           & \frac{1}{2}   & \frac{2}{3} \\
        \frac{3}{4} & 0             & \frac{4}{5} \\
        \frac{5}{6} & \frac{6}{7}   & 0
    \end{bmatrix}
    \begin{pmatrix}
        A \\
        B \\
        C
    \end{pmatrix}
\end{equation}
\end{document}

However, not only the sum sign, but also the spacing in the matrices changes. With Latin Modern commented out (as in the example): Latin Modern Deactive With Latin Modern active (remove % before relevant line): Latin Modern Active Why is that? BTW, I'm using Lualatex from TeXLive 2012.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

LuaTeX takes global math constants from the last defined font (I’m not yet sure if this can be considered a bug or a feature). A simple workaround is to call Asana Math again with an empty range (calling it without a range will undo previous font calls):

\usepackage{amsmath}
\usepackage{unicode-math} % use unicode in math & setup math fonts
\setmathfont{Asana Math}
\setmathfont[range=\sum]{Latin Modern Math} % substitute Sum sign
\setmathfont[range={}]{Asana Math}

\begin{document}

Notice the different sum sign $\sum$, as intended.

Notice also, the difference in spacing, not intended:
\begin{equation}
    \begin{bmatrix}
        0           & \frac{1}{2}   & \frac{2}{3} \\
        \frac{3}{4} & 0             & \frac{4}{5} \\
        \frac{5}{6} & \frac{6}{7}   & 0
    \end{bmatrix}
    \begin{pmatrix}
        A \\
        B \\
        C
    \end{pmatrix}
\end{equation}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.