# Mixing some math fonts

I want the symbols such \int or \sum from the Latin Modern Math font and the \nabla and all the greek letter such \alpha \beta \psi etc from the Latin Modern Math but all numbers and letters from the EB Garamond. How can i do that?

\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{unicode-math}

\setmathfont[range=\mathup]  {EB Garamond}
\setmathfont[range=\mathbfup]{EB Garamond}
\setmathfont[range=\mathbfit]{EB Garamond}
\setmathfont[range=\mathit]  {EB Garamond}

\usepackage{mathptmx}

\setmainfont{EB Garamond}

\begin{document}
$\int f(\alpha+x)=\sum\beta$
Some text\dots
\begin{equation}
\begin{split}
\frac{\partial^2 \nabla}{\partial \nabla^2}&=x^2 + yimc^2=z^2 \\
&=\mathrm{x^2 + y^2 = z^2} \\
&=\mathbf{x^2 + y^2 = z^2}
\end{split}
\end{equation}

\begin{equation}
i\hbar \frac{\partial \psi }{\partial t}=\frac{\hbar c}{i}\left(\alpha _1\frac{\partial \psi }{\partial x^1}+\alpha _2\frac{\partial \Psi }{\partial x^2}+\alpha _3\frac{\partial \psi }{\partial x^3}\right)+\alpha _4mc^2\psi
\end{equation}

\end{document}


And the shape of \partial how this example

\documentclass{article}

\usepackage[T1]{fontenc}

\usepackage{txfonts}

\begin{document}

\begin{equation}
\frac{\partial}{\partial}
\end{equation}

\end{document}

• By doing this a large amount of cute furry animals will die horribly, are you really sure this is what you want? – N3buchadnezzar Aug 2 '12 at 16:20
• haha lool is not good idea? – Aurelius Aug 2 '12 at 16:39
• From \usepackage{mathptmx} till \setmainfont should be removed as it makes no sense at all with unicode-math. – Khaled Hosny Aug 2 '12 at 21:36
• Also you shouldn’t be loading amsfonts, amssymb or type1ec packages, they too make no sense here. – Khaled Hosny Aug 2 '12 at 21:38
• @KhaledHosny i have updated my answer, but if i remove \usepackage{mathptmx} the \hbar disappears... – Aurelius Aug 3 '12 at 8:43

You have to carefully select the ranges and the symbols you need. Here's an example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}

\setmathfont[range=\mathup]  {EB Garamond}
\setmathfont[range=\mathbfup]{EB Garamond}
\setmathfont[range=\mathbfit]{EB Garamond}
\setmathfont[range=\mathit]  {EB Garamond}
\setmathfont[range={\partial,\nabla,\hslash}]{TG Termes Math}
\setmathfont[range=\mathit/{greek,Greek}]{Latin Modern Math}

\setmainfont{EB Garamond}

\begin{document}
$\int f(\alpha+x)=\sum\beta$
Some text\dots
\begin{equation}
\begin{split}
\frac{\partial^2 \nabla}{\partial \nabla^2}&=x^2 + yimc^2=z^2 \\
&=\mathrm{x^2 + y^2 = z^2} \\
&=\mathbf{x^2 + y^2 = z^2}
\end{split}
\end{equation}

\begin{equation}
i\hbar \frac{\partial \psi }{\partial t}=\frac{\hbar c}{i}\left(\alpha _1\frac{\partial \psi }{\partial x^1}+\alpha _2\frac{\partial \Psi }{\partial x^2}+\alpha _3\frac{\partial \psi }{\partial x^3}\right)+\alpha _4mc^2\psi
\end{equation}

\end{document} • Shouldn’t \mathit use “EB Garamond Italic”? – Khaled Hosny Jan 6 '13 at 9:34
• @KhaledHosny I think so, but that's what the OP seemed to want. – egreg Jan 6 '13 at 10:34