# [NTG-context] Grouping with \dosingleempty

Tue Jun 6 01:04:33 CEST 2006

Hi,
I am confused why the following definition does not work as expected.

\def\PM{\dosingleempty\doPM}
\def\doPM[#1]{\iffirstargument P_{M_{#1}}
\else P_{M_t}\fi}

\starttext
Why is $\widetilde \PM[T]$ not the same as $\widetilde P_{M_T}$
\stoptext

Can I change the definition so that

$\widetilede \PM$ is same as $\widetilde P_{M_t}$
and
$\widetilede \PM[T]$ is same as $\widetilde P_{M_T}$

Thanks,