O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

  1. Create a new document containing these lines:
    \documentclass{article}
    \begin{document}
    \Latex\ says: Hello world!
    \end{document}
  2. Typeset. LaTeX will stop and print out the following message:

    ! Undefined control sequence.

    l.3 \Latex

    \ says: Hello world!

  3. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required