The characters listed below have specific functions in LaTeX and are referred to as "special printing characters" or simply "special characters":
When these special characters are used in your document, they perform specific tasks!
# (Hash): Used in commands like \#
to indicate a number (e.g., item numbers in lists) or for special formatting purposes.
$ (Dollar): Begins and ends math mode. To print a dollar sign itself, use \textdollar
.
% (Percent): Starts a comment. Everything on the line after %
is ignored by LaTeX.
& (Ampersand): Used to separate columns in tables, aligning content at the &
.
~ (Tilde): Produces a non-breaking space. It prevents LaTeX from breaking the line at that space.
_ (Underscore): Often used in math mode for subscripts (e.g., $x_1$
).
^ (Caret): Used in math mode for superscripts (e.g., $x^2$
).
\ (Backslash): The escape character in LaTeX. Used to begin commands (\section
) and to print special characters (e.g., \%
to print %
).
{ } (Curly Braces): Used for grouping in commands and environments. Also used to specify arguments (e.g., \textbf{bold}
).
We use backslash \
when we want to write a code (like creating a figure, making text bold, etc.). If you wish to print any of these characters as they appear (like regular letters), you must precede them with a backslash \
. For example, \#
will produce #
in your output.