What I would like to do is define a new command \kodim
which I can index in math mode. With the following solution
\newcommand{\kodim}{kodim \,}
the result is unsatisfactory, because from
\kodim_V U
I get the space between the word kodim
and the index V
, instead of between kodim_V
and the argument U
.
How do I have to define the command instead to get the same result as from \dim_V U
?
I also notice that my new word is not displayed in the same way in math mode as the built-in macro \dim. It is displayed in italic instead. How can I get the same result as with the built-in macro?
Thanks for help.
\DeclareMathOperator\kodim{kodim}
(amsmath package) will make\kodim
act like\log
and just add the space when needed