I often have a whole bunch of definitions such as
\newcommand{\R}{\ensuremath{\mathbb{R}}}
with R
replaced by R,Z,C
, etc.
I might also have a bunch of math operators or category definitions, e.g.
\newcommand{\cC}{\ensuremath{\mathscr{C}}}
What I would love is a way I could define this all at once. For example I could have some function \bb
that I could just write
\bb{Z,R,C,...}
\operators{Hom,Tor,Ext,....}
\category{C,S,H,...}
and this would then allow me to just use \Z
for \mathbb{Z}
in the document.
Is such a thing possible?
\ensuremath
with commands like\N
. I don't think that$\N$
costs much more typing than\N
. And imagine you want to write$-\N$
and you forget the dollars and write-\N
, then it gets completely different meaning.