Dollar sign in LaTeX (\$)
- LaTeX command
\$- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Escaped dollar sign: prints a literal $ instead of starting or ending math mode.
An unescaped $ toggles math mode in LaTeX, so prices need \$, as in \$19.99. It works in both text and math mode, which makes formulas like \$100 \times 1.05 = \$105 straightforward. In Markdown-based tools and KaTeX renderers the same escape applies. For tables full of currency, the siunitx package can align numbers on the decimal point while the symbol sits in the column header. Writing USD avoids ambiguity when several dollar currencies, such as Canadian or Australian dollars, appear in one document.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
1{,}000 \times (1.05)^{3} \approx \
\documentclass{article}
\begin{document}
Dollar sign: $\$$
\[ \$1{,}000 \times (1.05)^{3} \approx \$1{,}157.63 \]
\end{document}Related symbols
- Euro sign
\text{€} - Pound sterling sign
\text{£} - Yen sign
\text{¥} - Indian rupee sign
\text{₹} - Bitcoin sign
\text{₿} - Percent sign
\%
Frequently asked questions
- How do I write Dollar sign in LaTeX?
- Type \$ in math mode, for example $\$1{,}000 \times (1.05)^{3} \approx \$1{,}157.63$. It works in plain LaTeX without loading any package.
- Which package do I need for \$?
- None. \$ is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \$ in text mode, or only in math mode?
- Both. \$ compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAI로 LaTeX 작성
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기