How to get dollar sign ($) in LaTeX?
Some symbols or characters are known as escape characters, you can not print those characters directly in LaTeX. The dollar sign ($) is also an escape character.
You can print the dollar sign using \$, however, there are lots more packages that provide different styles of this symbol.
In this tutorial, I will show you how to print the $ sign with default command in LaTeX and also I will show you more packages and commands to get this symbol with a slightly different look.
All packages and commands to get $ in LaTeX
| Package | Command | Output |
|---|---|---|
| None | \$ |
$ |
None |
$\mathdollar$ |
$ |
textcomp |
\textdollar |
$ |
dsfont |
$\mathds{S}$ |
|
marvosym |
\EyesDollar |
\documentclass{article}
\usepackage{ textcomp }
\usepackage{ dsfont }
\usepackage{ marvosym }
\begin{document}
\verb|100\$| $\rightarrow$ 100\$ \\[4pt]
\verb|100\mathdollar| $\rightarrow\;100\mathdollar$\\[4pt]
\verb|100\textdollar| $\rightarrow$ 100\textdollar\\[4pt]
\verb|100\mathds{S}| $\rightarrow\;100\mathds{S}$\\[4pt]
\verb|100\EyesDollar| $\rightarrow$ 100\EyesDollar
\end{document}
Output:

Leave a Reply