I am typesetting a long mathematical text (lecture notes), in which I use the alphabets
\mathbb A
\mathcal A
\mathfrak A
very often, so I decided to name them
\A \sA \fA
(For bb A, script A, fraktur A resp.). Now I want to shorten my preamble by creating a helper
\newcommand{\mathletter}[1]{%
\newcommand{\#1}{\mathbb #1}
\newcommand{\s#1}{\mathcal #1}
\newcommand{\f#1}{\mathfrak #1}
}
which doesn't work since the \#1 etc. seem to not be expanded.
How can I wirte a macro which defines those three commands given a single letter as input?
Thanks for any help.
\mathletter{A}
?\newcommand{\X}{\mathbb X}
lines\documentclass{article} \usepackage{amssymb} \def\B#1{\mathbb #1} \def\C#1{\mathcal #1} \def\F#1{\mathfrak #1} \begin{document} $\B A \C A \F A $ \end{document}