![如何将整个文档中的数字样式转换为 \mathsf 样式?](https://linux22.com/image/410908/%E5%A6%82%E4%BD%95%E5%B0%86%E6%95%B4%E4%B8%AA%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%E6%95%B0%E5%AD%97%E6%A0%B7%E5%BC%8F%E8%BD%AC%E6%8D%A2%E4%B8%BA%20%5Cmathsf%20%E6%A0%B7%E5%BC%8F%EF%BC%9F.png)
答案1
0
我对您的请求的解释如下:您希望9
当且仅当这些数字出现在数学模式下时,才使用无衬线样式呈现这些数字。
如果这个解释是正确的,最小修改@egreg 的回答对你之前的查询可以完成以下工作:
\documentclass[14pt]{memoir}
\DeclareSymbolFont{sansletters}{\encodingdefault}{\sfdefault}{m}{n}
\SetSymbolFont{sansletters}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
\DeclareSymbolFontAlphabet{\mathsf}{sansletters}
\DeclareMathSymbol{0}{\mathalpha}{sansletters}{`0}
\DeclareMathSymbol{1}{\mathalpha}{sansletters}{`1}
\DeclareMathSymbol{2}{\mathalpha}{sansletters}{`2}
\DeclareMathSymbol{3}{\mathalpha}{sansletters}{`3}
\DeclareMathSymbol{4}{\mathalpha}{sansletters}{`4}
\DeclareMathSymbol{5}{\mathalpha}{sansletters}{`5}
\DeclareMathSymbol{6}{\mathalpha}{sansletters}{`6}
\DeclareMathSymbol{7}{\mathalpha}{sansletters}{`7}
\DeclareMathSymbol{8}{\mathalpha}{sansletters}{`8}
\DeclareMathSymbol{9}{\mathalpha}{sansletters}{`9}
\begin{document}
0123456789 vs.\ $0123456789ABC$
\end{document}