I want to have not only italic numbers but also italic dollar sign in Latex math mode.
I found that some people get this with the \pounds symbol, however I do not achieve to do it and anyways this seems to be an undesired effect:
Special sign \pounds changed to dollar sign in alignment surrounding
So what is the proper way to get an italic dollar sign? If numbers can be italic, sure the dollar sign can be, right?
Added a minimal working example:
\documentclass[]{article}
\usepackage[T1]{fontenc}
\begin{document}
\begin{tabular}{lll}
\verb+\$+ & \$ & as expected\\
\verb+\textit{\$}+ & \textit{\$} & as expected\\
\verb+$\$$+ & $\$$ & as expected\\
\verb+$\mathit\$$+ & $\mathit\$$ & not expected\\
\verb+$\mathit{\mathchar"0024}$+ & $\mathit{\mathchar"0024}$ & not expected\\
\verb+$\mathit{\mathdollar}$+ & $\mathit{\mathdollar}$ & not expected\\
\end{tabular}
\end{document}
Best Answer
As long as you only use letters and numbers in
\mathit
(no Greek uppercase, in particular), just change\mathdollar
to respect the math group, adding"7000
to the math code.This requires changing the font associated to
\mathit
into one that's T1 encoded.A different strategy is to redefine
\mathdollar
to use\text
for the\mathit
case.The output is the same for both codes.