Special LaTeX characters
Besides the common upper- and lowercase letters, digits and punctuation characters, that can simply by typed with the editor, some characters are reserved for LaTeX commands. They cannot be used directly in the source. Usually they can be printed if preceded by a backslash:
\documentclass{article} \usepackage{array} \usepackage{booktabs} \begin{document} \begin{tabular}{ll} \toprule \multicolumn{2}{c}{\textbf{Special \LaTeX\ characters}}\\ \midrule Number sign: & \# \\ Dollar sign: & \$ \\ Percent sign: & \% \\ Underscore: & \_ \\ Ampersand: & \& \\ Braces: & \{ \} \\ Circumflex: & \^{} \\ \bottomrule \end{tabular} \end{document} |
Output:
Some characters might not appear as expected. Try:
\documentclass{article} \begin{document} Pipe sign: | Less than: < Greater than: > \end{document} |
Output:
Just adding one line to the preamble specifying T1 fontencoding helps:
\documentclass{article} \usepackage[T1]{fontenc} \begin{document} Pipe sign: | Less than: < Greater than: > \end{document} |
Output:
Comments (8)