\DeclareSymbolFont{symbols} 不起作用

\DeclareSymbolFont{symbols} 不起作用

问题描述

我一直在尝试更改 TEX 中文档的数学字体,但不起作用。编译并运行代码后,我Math formula deleted: Insufficient symbol fonts.在输入第一个公式时收到此错误/警告。此外,.pdf输出除了页码外不显示任何内容...

有人知道我该怎么办吗?

梅威瑟:

\documentclass{article}
\usepackage[no-math]{fontspec}

\newfontfamily{\miletra}{MILETRA}[
  NFSSFamily=MiLetra,
  Path=./,
  Extension=.ttf,
  UprightFont=*,
  BoldFont=*,
  BoldFeatures={FakeBold=3},
]

\DeclareSymbolFont{numbers}{TU}{MiLetra}{m}{n}
\SetSymbolFont{numbers}{bold}{TU}{MiLetra}{bx}{n}
\DeclareMathSymbol{0}\mathalpha{numbers}{"30}
\DeclareMathSymbol{1}\mathalpha{numbers}{"31}
\DeclareMathSymbol{2}\mathalpha{numbers}{"32}
\DeclareMathSymbol{3}\mathalpha{numbers}{"33}
\DeclareMathSymbol{4}\mathalpha{numbers}{"34}
\DeclareMathSymbol{5}\mathalpha{numbers}{"35}
\DeclareMathSymbol{6}\mathalpha{numbers}{"36}
\DeclareMathSymbol{7}\mathalpha{numbers}{"37}
\DeclareMathSymbol{8}\mathalpha{numbers}{"38}
\DeclareMathSymbol{9}\mathalpha{numbers}{"39}

\DeclareSymbolFont{operators}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{operators}

\DeclareSymbolFont{letters}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{letters}

\DeclareSymbolFont{symbols}{TU}{MiLetra}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{symbols}

\begin{document}

$a=123$

\mathversion{bold}

$a=345^\alpha + 2$

\end{document}

相关内容