I'd like to define a family of math operators that have the same superscript, but different subscripts. My first attempt was:
\DeclareMathOperator{\Upd}[1]{U^M_{#1}}
But the log tells me that:
l.3 \DeclareMathOperator{\Upd}[1
]{U^M_{#1}}
! Missing $ inserted.
<inserted text>
$
l.3 \DeclareMathOperator{\Upd}[1]{U^
M_{#1}}
! You can't use `macro parameter character #' in math mode.
l.3 \DeclareMathOperator{\Upd}[1]{U^M_{#
1}}
! Extra }, or forgotten $.
l.3 \DeclareMathOperator{\Upd}[1]{U^M_{#1}}
This is a kind of work-around, but not ideal.
\newcommand\UPD[1]{\mathop{\mathrm{U}^\mathrm{M}_\mathrm{#1}}}
Is there a way to make \DeclareMathOperator take arguments or am I stuck with the work around?


DeclareMathOperatoris to make something likesin,exp, etc. As far as I can remember there are no math operators of this kind (roman with stuff in brackets to the right) that take arguments. – Mark S. Everitt Nov 14 '11 at 16:33\newcommand{\expup}[1]{mathrm{e}^{#1}}. – Mark S. Everitt Nov 14 '11 at 16:35\newcommand{\expup}[1]{\mathrm{e}^{#1}}. – Mark S. Everitt Nov 14 '11 at 17:27