Time for action – interpreting and fixing an error
Let's create a tiny test document. For sure you know those "Hello world!" printing programs—we shall write one in LaTeX. Though we are used to the uncommon capitalization used in the words TeX and LaTeX, we will now try if \Latex
works as well.
- Create a new document containing these lines:
\documentclass{article} \begin{document} \Latex\ says: Hello world! \end{document}
- Typeset. LaTeX will stop and print out the following message:
! Undefined control sequence.
l.3 \Latex
\ says: Hello world!
- Click on the cancel icon in the upper-left corner of TeXworks to stop typesetting. Go to line 3, correct
\Latex
into\LaTeX
and Typeset again. Now LaTeX produces output without an error:
What just happened?
LaTeX ...
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.