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
D
closer to theCV
like 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}