I'm trying to typeset an article. In the preamble, I defined these two things:
\newcommand{\leftexp}[2]{{\vphantom{#2}}^{#1}{#2}}
\newcommand{\hr}{\leftexp{*}{\mathbb{R}}}
However, when I try to use $\hr$ in a section, as in:
\section{Constructing $\hr$}
I get an error:
Incomplete `\iffalse`; all text was ignored after line 1.
Any idea what could be causing this? Everything works just fine if I don't have the $\hr$ in the section (e.g. It typesets just fine if I have \section{Constructing $\mathbb{R}$}, say).

\section"moves", protecting it seems to solve your problem:\newcommand{\hr}{\protect\leftexp{*}{\mathbb{R}}}, or just using\protect\hrin your sectional header. – Werner Feb 01 '12 at 23:19