I'm kinda new to the (Lua)LaTeX world but what I love especially about LuaTeX is the ability to include truetype system fonts in my document. For text fonts I find this easy, but for math fonts, I find it a real challenge.
I'm trying to use the Math & Technical math fonts in my document, I have the fonts installed on my system. These have names MathTechnicalP01
through P17
, each family member having some glyphs. The character map is shown on the aforementioned site, but I'm struggling to make it work. I tried also with MathematicalPi fonts with no success. Can you please help me out?
Here is what I have tried so far:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{fontspec,unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont[range=\mathup/{num}]{TeX Gyre Termes} % for numbers
\setmathfont[range=\mathit]{MathTechnicalP12} % for Greek
\setmathfont[range={"0023,"0041}]{MathTechnicalP09} % for \int, \sum ...
\begin{document}
Main text here is times roman ...
\[ x(t)=\int_{-B}^B X(f)e^{j2\pi ft} df \]
%
\[ \left(\frac{\mathrm{d}\phi}{\mathrm{d}\theta}\right)^{\top} \frac{\mathrm{d}\eta}{\mathrm{d}\mu} \quad \mathbf{R}^2 \sqrt{1/2\pi f} \]
%
\[ \sum\int f(t)e^{j\omega t}dt{\rho\omega\pi}\mathcal{H} 2\pi\lambda \]
%
\[ \sum\int a\otimes b \vec{c} - x + 2zp\gamma \]
%
\begin{align*}
& \left(\dfrac{a}{2}\right)^2\cdot\pi+\left(\dfrac{b}{2}\right)^2\cdot\pi-\left(\dfrac{\sqrt{a^2+b^2}}{2}\right)^2\cdot\pi+ab &=ab\\
\Leftrightarrow & \dfrac{a^2}{4}\cdot\pi+\dfrac{b^2}{4}\cdot\pi-\dfrac{a^2+b^2}{4}\cdot\pi+ab &=ab\\
\Leftrightarrow & \dfrac{a^2}{4}\cdot\pi+\dfrac{b^2}{4}\cdot\pi-\left(\dfrac{a^2}{4}\cdot\pi+\dfrac{b^2}{4}\cdot\pi\right)+ab &=ab\\
\Leftrightarrow & ab&=ab
\end{align*}
\end{document}
which outputs a bizarre of math:
TeX Gyre Termes
butTeX Gyre Termes Math
.otf
? and how does this MATH table relate to the character map of the font published on the site? Ulrike, thank you for your comment, you mean these commercial fonts are not main math fonts and cannot be used in LuaLaTeX? Forgive my shallow knowledge in this regard.