Well the logical solution is to setup a new math version, which should be independant from the normal math version.
But imho there is today not much chance to get the version
key working in your use case. As long as only real math fonts are involved it works fine, but in the combination with range
and text fonts it is buggy as one math version affects the other.
Currently I would implement a bold mathversion by embolden a real math font. In xelatex this can be done with FakeBold
and version
(as long as no other text fonts are involved). In lualatex you could use a pdfliteral:
\documentclass{article}
\usepackage{fontspec,amsmath}
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
\[ \hat f(t) = \int_0^t \hat f'(x)\, dx \]
\pdfliteral direct {2 Tr 0.2 w} %the second factor is the boldness
\[ \hat f(t) = \int_0^t \hat f'(x)\, dx \]
\pdfliteral direct {0 Tr 0 w}%
\end{document}
(I've updated the answer to reflect the arrival of the STIX Two text and math fonts in late 2016. The STIX Two fonts weren't available yet in Sept. 2016, when this query was posted.)
I'm not in a position to evaluate the STIX Text and STIX Math fonts. Whatever it is that's afflicting them, there's good news: The STIX Two text and math fonts, which were released in Dec. 2016, have much better properties, as is shown below.
If, for some reason, your TeX distribution doesn't (yet) have the STIX Two text and math fonts, you may wish to consider using the XITS and XITS Math fonts. They are derived from STIX and STIX Math, but they don't generate the problem behavior you've run into. (Well, there's a different, and fortunately minor problem: The lower limit of integration is typeset too far to the right when using XITS Math. This may be fixed by issuing a directive such as \mkern-9mu
, which is equivalent to three negative thin-spaces.) Speaking for myself, I must say that I much prefer the shape of the integral symbol used by STIX Two Math over the version that's used by both STIX and XITS.
The following code was compiled on a Mac running MacOS10.12 "Sierra", MacTeX2016, LuaTeX 0.95, and LuaLaTeX format dated 2017/02/25. I understand that MacTeX2017, which will be released later this quarter, will use LuaTeX 1.04. The latest version of LuaTeX reportedly does a much better job of placing the limits of integration.
\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage[math-style=ISO]{unicode-math}
\newcommand\myeq{%
\[
P(\vec{k}) = \int_a^b e^{i\vec{k} \cdot \vec{R}} P(\vec{R}) \,\mathrm{d}\vec{R}.
\]}
\setlength\textwidth{7cm}
\begin{document}
\setmainfont{STIX}\setmathfont{STIX Math}
\renewcommand{\vec}[1]{\symbf{#1}}
STIX
\myeq
\medskip
\setmainfont{STIX Two Text}\setmathfont{STIX Two Math}
\renewcommand{\vec}[1]{\symbf{#1}}
STIX Two
\myeq
\medskip
\setmainfont{XITS}\setmathfont{XITS Math}
\renewcommand{\vec}[1]{\symbf{#1}}
XITS
\myeq
\end{document}
Update, Oct. 2017: Prompted by a follow-up comment by @HaraldHanche-Olsen, here's the "look" of the equation using the Stix Two text and math fonts, but now with MacTeX2017, LuaTeX 1.0.4, and unicode-math
2017/08/02 v0.8f:
As Harald has noted, the positioning of the lower limit of integration is now just fine.
Best Answer
As explained in an answer by nlogax to microtype + siunitx and \micro - mysterious warnings Unicode has—besides the Greek Small Letter Mu character µ—a special Micro Sign µ.
That is to be used here. For some reason this is not present in
unicode-math
.I assume that you also use TeX Gyre Pagella as your text font so we can use it from there with
\text
.Code
Output