I'm looking for a way to replace \DeclareMathOperator{\Operator}{Operator} by something which would resemble \MathOperator{Operator}. I tried to define a new command \newcommand\MathOperator[1]{\DeclareMathOperator{\#1}{#1}} and then call it \MathOperator{MyOperator} but this doesn't seem to work, I got the following error: "Undefined control sequence." when calling $\MyOperator$. Any idea what I should do?
Thanks a lot.
\MyOperatorabove. That's for sure. – LaRiFaRi Sep 09 '14 at 12:46\#1is understand by TeX as 2 tokens, not as 1. I'm no expert though. – Pece Sep 09 '14 at 12:47\csname #1\endcsnameinstead of\#1. See What exactly do\csnameand\endcsnamedo? – Werner Sep 09 '14 at 12:53"! Argument of \DeclareMyOperator has an extra }."when calling\DeclareMathOperators{Rep,Tet,Maps,Diff}, any idea why? – G Viaud Sep 09 '14 at 13:15\forcsvlist, I have no idea why. But the exact and complete answer I was looking for is indeed what @Andrew pointed out. Thanks. – G Viaud Sep 09 '14 at 17:57