有没有办法设置它,以便数学模式自动地停止斜体大写字母?也就是说,这样$U$
会产生现在的效果$\mathrm{U}$
?我正在使用现代计算机。我知道其他字体有此选项,但我想在现代计算机中执行此操作。但是,如果某些解决方案与字体无关,那就太好了,这样我就可以在它们之间切换并保留此设置。
答案1
对于 LaTeX,请参阅 Philippe Goutet 的回答!
为了纯 TeX定义可以是:
\mathcode`A="7041
\mathcode`B="7042
\mathcode`C="7043
% ...
\mathcode`Z="705A
$ ABC\dots Z $
\bye
答案2
如果你使用的是 LaTeX 而不是纯 TeX,你应该更喜欢\DeclareMathSymbol
。\mathcode
你甚至可以避免明确给出字体中大写字母的位置,`A
而是使用相应的数字41
:
\DeclareMathSymbol{A}{\mathalpha}{operators}{`A}
\DeclareMathSymbol{B}{\mathalpha}{operators}{`B}
\DeclareMathSymbol{C}{\mathalpha}{operators}{`C}
\DeclareMathSymbol{D}{\mathalpha}{operators}{`D}
\DeclareMathSymbol{E}{\mathalpha}{operators}{`E}
\DeclareMathSymbol{F}{\mathalpha}{operators}{`F}
\DeclareMathSymbol{G}{\mathalpha}{operators}{`G}
\DeclareMathSymbol{H}{\mathalpha}{operators}{`H}
\DeclareMathSymbol{I}{\mathalpha}{operators}{`I}
\DeclareMathSymbol{J}{\mathalpha}{operators}{`J}
\DeclareMathSymbol{K}{\mathalpha}{operators}{`K}
\DeclareMathSymbol{L}{\mathalpha}{operators}{`L}
\DeclareMathSymbol{M}{\mathalpha}{operators}{`M}
\DeclareMathSymbol{N}{\mathalpha}{operators}{`N}
\DeclareMathSymbol{O}{\mathalpha}{operators}{`O}
\DeclareMathSymbol{P}{\mathalpha}{operators}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{operators}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{operators}{`R}
\DeclareMathSymbol{S}{\mathalpha}{operators}{`S}
\DeclareMathSymbol{T}{\mathalpha}{operators}{`T}
\DeclareMathSymbol{U}{\mathalpha}{operators}{`U}
\DeclareMathSymbol{V}{\mathalpha}{operators}{`V}
\DeclareMathSymbol{W}{\mathalpha}{operators}{`W}
\DeclareMathSymbol{X}{\mathalpha}{operators}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{operators}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{operators}{`Z}