希望没有什么副作用...
\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\setmathfont[
range={
up/{num,latin,Latin,greek,Greek},
it/{latin,Latin,greek,Greek},
bfup/{num,latin,Latin,greek,Greek},
bfit/{latin,Latin,greek,Greek},
"0021,"002C,"002E,"003B,"003F
}
]{texgyretermes-math.otf}
\DeclareSymbolFont{yhlargesymbols}{OMX}{yhex}{m}{n}
\Udelcode 40 = \symyhlargesymbols 0
\Udelcode 41 = \symyhlargesymbols 1
\begin{document}
123abcABC,.;?! +-*/
$123abcABC,.;?!\alpha\beta\Gamma\Delta$
\[
\iint_S \vec{F}\cdot d\vec{S},
\oint_C \vec{B}\cdot d\vec{l},
\sum_{i=1}^{N}a_i,
\prod_{k=1}^{n}(x-x_k)
\]
\[
\begin{bmatrix}
\dfrac{\partial^2 f}{\partial x^2} &
\dfrac{\partial^2 f}
{\partial x \partial y} \\
\dfrac{\partial^2 f}
{\partial x \partial y} &
\dfrac{\partial^2 f}{\partial y^2}
\end{bmatrix}
=
\begin{pmatrix}
a_{11} & a_{12} & \cdots & a_{1n} \\
a_{21} & a_{22} & \cdots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{pmatrix}
\]
\end{document}



















问 让unicode-math的range参数兼容yhmath提供的"圆括号"?