如何自动将所有大写字母加粗?

如何自动将所有大写字母加粗?

每次我在数学模式中写一个大写字母时,我都希望它以粗体显示。

例如我想写 $B$ is a matrix and $b$ a scalar 但又不想写,$\mathbf{B}$ is a matrix and $b$ a scalar 但结果相同: 在此处输入图片描述

怎么办?:D

答案1

在此处输入图片描述

\documentclass{article}
\DeclareSymbolFont{bfletters}{OT1}{cmr}{bx}{n}
\DeclareSymbolFontAlphabet{\mathbf}{bfletters}

\DeclareMathSymbol{A}{\mathalpha}{bfletters}{`A}
\DeclareMathSymbol{B}{\mathalpha}{bfletters}{`B}
\DeclareMathSymbol{C}{\mathalpha}{bfletters}{`C}
\DeclareMathSymbol{D}{\mathalpha}{bfletters}{`D}
\DeclareMathSymbol{E}{\mathalpha}{bfletters}{`E}
\DeclareMathSymbol{F}{\mathalpha}{bfletters}{`F}
\DeclareMathSymbol{G}{\mathalpha}{bfletters}{`G}
\DeclareMathSymbol{H}{\mathalpha}{bfletters}{`H}
\DeclareMathSymbol{I}{\mathalpha}{bfletters}{`I}
\DeclareMathSymbol{J}{\mathalpha}{bfletters}{`J}
\DeclareMathSymbol{K}{\mathalpha}{bfletters}{`K}
\DeclareMathSymbol{L}{\mathalpha}{bfletters}{`L}
\DeclareMathSymbol{M}{\mathalpha}{bfletters}{`M}
\DeclareMathSymbol{N}{\mathalpha}{bfletters}{`N}
\DeclareMathSymbol{O}{\mathalpha}{bfletters}{`O}
\DeclareMathSymbol{P}{\mathalpha}{bfletters}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{bfletters}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{bfletters}{`R}
\DeclareMathSymbol{S}{\mathalpha}{bfletters}{`S}
\DeclareMathSymbol{T}{\mathalpha}{bfletters}{`T}
\DeclareMathSymbol{U}{\mathalpha}{bfletters}{`U}
\DeclareMathSymbol{V}{\mathalpha}{bfletters}{`V}
\DeclareMathSymbol{W}{\mathalpha}{bfletters}{`W}
\DeclareMathSymbol{X}{\mathalpha}{bfletters}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{bfletters}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{bfletters}{`Z}

\begin{document}

$ b + B + c + C$

\end{document}

相关内容