有三种方式:
- 使用
unicode-math设置数学字体,range键可以设置仅使用字体的某些字符;会改变全局的数学字体 - 使用
unicode-math的\setmathfontface,然后像使用\mathrm一样使用,不能改符号的字体 - 使用
\DeclareMathRadical之类的来改个别符号
\documentclass{standalone}
\usepackage{tikz,amsmath}
\usepackage{xcolor}
\usepackage{xeCJK}
\usepackage{unicode-math}
\newfontfamily\prof[Path=MyFonts/]{ArchitectsDaughter.ttf}
%% 第一种
\setmathfont{Latin Modern Math}
\setmathfont{ArchitectsDaughter.ttf}[range={up/{num},`+,`=},Path=MyFonts/]
%% 第二种
\setmathfontface\mathprof{ArchitectsDaughter.ttf}[Path=MyFonts/]
\begin{document}
\begin{tikzpicture}
\node[blue,font=\fontsize{20}{0}\selectfont] at (0,5) {\prof 0.02+0.015=0.035 };
%% 第一种
\node[red,font=\fontsize{20}{0}\selectfont] at (0,4) {$0.02+0.015=0.035$};
\node[red,font=\fontsize{20}{0}\selectfont] at (0,3) {$\sqrt{0.0004}+0.015=0.035$};
%% 第二种
\node[red,font=\fontsize{20}{0}\selectfont] at (0,2) {$\sqrt{\mathprof{0.0004}}\mathprof{{}+0.015=0.035}$};
\end{tikzpicture}
\end{document}













问 数学公式的演算,如何使用自己引用的数字字体?