I am attempting to make a macro shortcut for the \mathrm
command from amsmath
.
My idea is that in lieu of writing, for example, \mathrm{R}
to get the Roman R
in math mode, I'd like to enter \RR
instead. Likewise, suppose I wanted Roman P
, I'd like instead to enter \PP
.
The following MWE gets me the Roman R
symbol, but I'd like this to be maximally flexible for any letter without having to define 52 separate \aa
, \bb
, \cc
commands.
\documentclass{book}
\usepackage{amsmath}
\newcommand{\RR}{\mathrm{R}}
\begin{document}
$ \RR$
\end{document}
\aa
etc. already. Your request would break this – user31729 Sep 29 '17 at 19:25\aa
and\tt
what's wrong with\newcommand\R{\mathrm}
then you can use\R R
,\R x
etc – David Carlisle Sep 29 '17 at 19:25