[Tex/LaTex] How to redefine a character such as the (actual text) dollar sign

fontsize

I am using text/old-style figures in my document with the Palatino font, and I find that the dollar sign (\$) is too large for most dollar figures. I've found that it looks good if I take the font size of just the dollar sign down by one, like so:

{\small\$}1,000

But this is a pain, so I'd like to change \$ so it handles the size shift automatically.

My immediate thought was to do \def\${{\small\$}}, but obviously (obvious after you've naïvely tried it anyway), that results in infinite recursion. What sort of control sequence can I use to represent the font dollar sign other than \$?

Best Answer

Here's a possibility; we have just to redefine \textdollar (and possibly \mathdollar, if you plan to use it in math). I scale it vertically, but not horizontally.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[osf]{mathpazo}
\usepackage{graphicx}

\DeclareTextCommand{\textdollar}{T1}{\scalebox{1}[.85]{\symbol{`\$}}}

\begin{document}

\$100 or \$600

{\footnotesize \$100 or \$600}

\end{document}

enter image description here

Note. The command \$ is defined (with the T1 encoding) to either do \textdollar or \mathdollar, depending on the context. So there's no need to redefine \$.