4

I am using unicode-math to specify fonts for my math equations. I would like that small parentheses (and other delimiters) to use one font, and large ones use a different one. The reason for this is the font which I have set most of the document in does not support multiple sizes of parentheses. In this example, I have replaced that font by TeX Gyre Pagella which does support multiple parentheses sizes since the font I'm using is not as common.

\documentclass[]{report}

\usepackage[no-math]{fontspec}
\setmainfont[]{TeX Gyre Pagella}

\usepackage{amsmath,amssymb,amsthm}
\usepackage{unicode-math}

\setmathfont[]{TeX Gyre Pagella Math}
\setmathfont[range={"005B,"005D,"0028,"0029,"007B,"007D,\langle,\rangle,\Vert,\mid}]{Latin Modern Math} % only for big parentheses


\begin{document}

This is a test
\begin{equation*}
    ( f ) % this should be TeX Gyre Pagella
    \leq 
    \bigg( \frac{f}{g} \bigg) % this should be Latin Modern
\end{equation*}

\end{document}

0

You must log in to answer this question.

Browse other questions tagged .