[Tex/LaTex] Symbols in XeLaTeX

fontsmathspecsymbolsxetex

From the mathspec documentation

4.2 Symbols

There is currently no way to set the font for general
mathematical symbols such as:

=, ×, ↦, ∂, ∅, ∈, ∫, ⊂

I'm using XeLaTeX for better font support. What can I do to get these symbols from my font?

In particular, I'm interested in (, ) and =.

(Before using XeLaTeX, I used the mathastext package with LaTeX.)

\documentclass[a4paper,twoside,12pt]{article}
\usepackage{mathspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\setmathsfont(Digits,Latin)[Uppercase=Regular,Lowercase=Regular]{Linux Biolinum O}
\setmathsfont(Greek)[Uppercase=Regular,Lowercase=Regular]{Linux Biolinum O}
\setmathrm{Linux Biolinum O}

\begin{document}
$\partial$ doesn't use the partial from Biolinum.

$∂$ doesn't typeset anything.
\end{document}

Best Answer

It's not impossible when you have established a math font which has the symbols you need. It's just time consuming.

\documentclass[a4paper,twoside,12pt]{article}
\usepackage{amsmath}
\usepackage{mathspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\setsansfont[Ligatures=TeX]{Linux Biolinum O}
\setmathsfont(Digits,Latin)[Uppercase=Regular,Lowercase=Regular]{Linux Biolinum O}
\setmathsfont(Greek)[Uppercase=Regular,Lowercase=Regular]{Linux Biolinum O}
\setmathrm{Linux Biolinum O}

% "0 ordinary; "1 operator; "2 relation, "3 binary operation
\Umathcode`=="2 \csname symLatin:m:n\endcsname `=
\Umathcode`×="3 \csname symLatin:m:n\endcsname `× \def\times{×}
\Umathcode`↦="3 \csname symLatin:m:n\endcsname `↦ \def\mapsto{↦}
\Umathcode`∂="0 \csname symLatin:m:n\endcsname `∂ \def\partial{∂}
\Umathcode`∅="0 \csname symLatin:m:n\endcsname `∅ \def\emptyset{∅}
\Umathcode`∈="2 \csname symLatin:m:n\endcsname `∈ \def\in{∈}
\Umathcode`∫="1 \csname symLatin:m:n\endcsname `∫ \def\intop{∫}
\Umathcode`⊂="2 \csname symLatin:m:n\endcsname `⊂ \def\subset{⊂}

\begin{document}
$\partial$ uses the partial from Biolinum.

$∂$ does the same

\textsf{∂} is the proof

$a×b↦∂c∈d⊂∅$

$∫_a^b f(x)\,dx$
\end{document}

enter image description here