Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
LaTeX Beginner's Guide

You're reading from   LaTeX Beginner's Guide When there‚Äôs a scientific or technical paper to write, the versatility of LaTeX is very attractive. But where can you learn about the software? The answer is this superb beginner‚Äôs guide, packed with examples and explanations.

Arrow left icon
Product type Paperback
Published in Mar 2011
Publisher Packt
ISBN-13 9781847199867
Length 336 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (21) Chapters Close

LaTeX
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with LaTeX FREE CHAPTER 2. Formatting Words, Lines, and Paragraphs 3. Designing Pages 4. Creating Lists 5. Creating Tables and Inserting Pictures 6. Cross-Referencing 7. Listing Content and References 8. Typing Math Formulas 9. Using Fonts 10. Developing Large Documents 11. Enhancing Your Documents Further 12. Troubleshooting 13. Using Online Resources Pop Quiz Answers Index

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 commands are case-sensitive. Because we did not respect that, LaTeX had to deal with a macro called \Latex, which is just unknown. As a command is also called a control sequence , we got the error Undefined control sequence.

If TeX encounters an error...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime