答案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}