Skip to content
All LaTeX symbols

Special characters ($, %, #, &, _, §)

Miscellaneous

§

LaTeX command

\$

dollar sign; a bare $ starts or ends math

Each escape works in text and in math mode, with no package. In KaTeX-based tools write them inside \text{...} when they sit in a sentence.

Ten characters have a job in LaTeX: $ % # & _ { } ~ ^ and \. Typing one of them on its own runs that job, so to print the character you escape it with a backslash or use a named command. The same escapes work in KaTeX, MathJax and Confluence math macros.

All ways to write it

  • \$dollar sign; a bare $ starts or ends mathNo package needed
  • \%percent sign; a bare % starts a commentNo package needed
  • \#hash; a bare # is for macro parametersNo package needed
  • \&ampersand; a bare & separates table and align columnsNo package needed
  • \_underscore; a bare _ is a subscriptNo package needed
  • \{ \}curly braces; bare braces only groupNo package needed
  • \Ssection sign §No package needed
  • \Ppilcrow ¶No package needed
  • \backslashbackslash in math; \textbackslash in textNo package needed
  • \sima tilde-like sign in math; a bare ~ is a non-breaking spaceNo package needed

Example

\text{Price: } \$19.99 \text{ (save 15\%)}

Escaped dollar and percent signs, so neither starts math nor a comment.

Questions

How do I write a dollar sign in LaTeX?

Write \$. A bare $ opens or closes inline math, so the rest of the line turns into math or LaTeX reports an error. In text mode \textdollar also works.

How do I write the section symbol?

Write \S for § and \P for the pilcrow ¶. Both work in text and in math, with no package.

How do I print a backslash?

\\ is a line break, not a backslash. Use \textbackslash in text and \backslash in math.

How do I write a tilde or a caret?

In text use \textasciitilde and \textasciicircum. In math, \sim gives the tilde-like relation, \tilde{x} puts a tilde over x and \hat{x} a caret.

Using special characters in Confluence

Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \$ and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.

Related symbols

Also in Miscellaneous

See all LaTeX symbols