
나는 사용해 왔다
\def\H{\bm{H}}
수학 모드에서 굵은 글자를 정의합니다. 일반적인 규칙을 정의할 수 있는 방법이 있나요?어느편지? 내가 허용하는 규칙을 원하는 것처럼
\*anyletters*{\bm{*anyletter}*
% For example \I -> \bm{I} etc....
답변1
다음 코드는 알파벳의 모든 문자에 대해 실행 되도록 \bmA
정의 합니다. 단일 문자 매크로는 특별한 의미(악센트, 특수 기호)를 갖는 경향이 있으므로 사용하지 마십시오.\bm{A}
A
\documentclass{article}
\usepackage{bm}
\makeatletter
\newcounter{letter}
\setcounter{letter}{1}
\@whilenum\value{letter}<27\do{% loop over all letters in the alphabet
% \def\bmA{\bm{A}}, where A runs over all letters
% Remove letters `bm' vv if you don't care about breaking LaTeX
\expandafter\edef\csname bm\Alph{letter}\endcsname{\noexpand\bm{\Alph{letter}}}
\expandafter\edef\csname bm\alph{letter}\endcsname{\noexpand\bm{\alph{letter}}}
\stepcounter{letter}%
}
\makeatother
\begin{document}
Hungarian umlaut \H{o}
Polish suppressed-L \L
Scandinavian O-with-slash \O
pilcrow \P
section symbol \S
$\bmA \bmZ \bma \bmz$
\end{document}