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}? – Sigur Jan 27 '14 at 14:23\newcommand{\X}{\mathbb X}lines – AlexR Jan 27 '14 at 14:26\O). – Snicksie Jan 27 '14 at 14:27LaTeX Error: Command \# already defined.when doing that. – AlexR Jan 27 '14 at 14:27\emptyset, I can live without\O, so I'll just redefine it – AlexR Jan 27 '14 at 14:29\ois not empty set. These very short names does not help much in the readability of your source code. – daleif Jan 27 '14 at 14:31\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}– Steven B. Segletes Jan 27 '14 at 14:34