Documentation/Common Errors/How to Escape Special Characters in LaTeX
Common Errors

How to Escape Special Characters in LaTeX

LaTeX reserves certain characters for special purposes. To print them literally, you must escape them with a backslash.

Reserved Characters

These characters must be escaped:

% Character | Type | Output
\%          % percent sign
\$          % dollar sign
\&          % ampersand
\_          % underscore
\#          % hash
\{          % left brace
\}          % right brace

Common Mistakes

Before and after fixing:

% WRONG:
The price is $50
Use 10% discount
AT&T company

% CORRECT:
The price is \$50
Use 10\% discount
AT\&T company

Additional Special Characters

Other special characters and how to type them:

\textbackslash  % backslash \
\textasciitilde % tilde ~
\textasciicircum % caret ^

% In URLs, use:
\url{https://example.com/path?query=1&page=2}

💡 Tips

  • •For URLs with special characters, use \url{} from hyperref package
  • •In tables, & separates columns - escape with \& for literal ampersand
  • •In BibTeX entries, use braces: title = {C++ Programming}

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Escape Special Characters in LaTeX | Bibby AI