I have defined a command FZ for defining mathematical symbols:
\newcommand{\FZ}[1]{\textcolor{blue}{\ensuremath{#1}}\xspace}
I want to define a Symbol CV first and then create some variants with different indices like CV_D, CV_{D,\,\mathrm{Gr}}...
To make that consistently, I tried to define it "stepwise", but then I get problems with the spacing. See minimal example:
- how can I get the
Dcloser to theCVlike in the black version which is "directly" typeset? - how can I get the "Gr" on the same height as the index "D"?

Minimal example:
\documentclass{scrbook}
\usepackage{color, xspace}
\newcommand{\FZ}[1]{\textcolor{blue}{\ensuremath{#1}}\xspace}
\newcommand{\CV}{\FZ{CV}}
\newcommand{\CvD}{\FZ{\CV{}^{*}_{D}}}
\newcommand{\CvDGr}{\FZ{\CvD_{,\,\mathrm{Gr}}}}
\begin{document}
\CV
\CvD
wish: $CV_D$
\CvDGr
wish: $CV^{*}_{D,\,\mathrm{Gr}}$
\end{document}

$...$around all math commands? What happens then, if I use one already defined command "in" another one? E. g. I define\Das $D$ and later use it in\CVDwhich shall look like$CV_{\D}$? (The hint about the color command is extremely helpful as well!) – MostlyHarmless Jul 27 '11 at 09:54$D$to\D? – egreg Jul 27 '11 at 10:13\Dwhich originally was calledCV_{D}, but might have to change his name. I'm also using a lot of indices which shall be easily toggled between english and german, for example. Defining those commands proved very helpful for me, as I (a) am not very good in regular expressions, so (b) the risk would be too high to destroy something with simple find and replace... – MostlyHarmless Jul 27 '11 at 10:33$CV_D$, but there are the D's and CV_D's of different product states during the manufacturing process. I've made up a quite complicated system, but I prefer defining it once and using it consistently to reduce the risk of errors. – MostlyHarmless Jul 27 '11 at 10:35\newcommand{\D}{D}. I really don't see any advantage in being able to write\Din text instead of$\D$, when this adds complications to the definitions;$\D$is straigthforward, well visible in the input file, and has no "spaces problems". – egreg Jul 27 '11 at 10:39\ensuremathin the general case from answers like yours, are there any drawbacks for the particular instance\ensuremath{\left(...\right)}? Would\mbox{$\left(...\right)$}be preferable? Or would they both screw up things like sub/superscript spacings and/or other things? (It doesn't seem to at first glance) – Steven B. Segletes Oct 11 '13 at 18:11