Time for action – writing special characters in our text
We will write a very short example printing out an amount of dollars and a percent number, then we shall try more symbols:
- Create a new document and enter the following lines:
\documentclass{article} \begin{document} Statement \#1: 50\% of \$100 makes \$50. More special symbols are \&, \_, \{ and \}. \end{document}
- Typeset and view the output:
What just happened?
By putting a backslash before such a special symbol, we turned it into a LaTeX command. This command has the only purpose of printing out that symbol.
Note
The command for printing a backslash is \textbackslash
. If you would like to know ...
Get LaTeX Beginners Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.