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 – including a picture


We shall create a short document. Between two paragraphs, we would like to insert a picture. If there's no picture file available, we will use the demo mode of graphicx:

  1. Begin a new document and load babel and blindtext to print some filler text:

    \documentclass[a5paper]{article}
    \usepackage[english]{babel}
    \usepackage{blindtext}
    \usepackage[demo]{graphicx}
    \pagestyle{empty}
    \begin{document}
    \section{Including a picture}
    \blindtext
  2. Open a figure environment and declare centering:

    \begin{figure}
    \centering
  3. Use the command \includegraphics with the filename as the argument:

    \includegraphics{test}
    
  4. Declare a caption, close the figure environment, and end the document with filler text:

    \caption{Test figure}
    \end{figure}
    \blindtext
    \end{document}
  5. Typeset and have a look at the output:

What just happened?

The most important command is \includegraphics. We specified a filename. This file would be loaded if it exists. Otherwise an error would occur. LaTeX supports the...

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 $19.99/month. Cancel anytime