Search icon CANCEL
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Learning Hub
Free Learning
Arrow right icon
LaTeX Beginner's Guide
LaTeX Beginner's Guide

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.

€28.99 €19.99
Free Trial
Renews at €14.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

LaTeX Beginner's Guide

Chapter 1. Getting Started with LaTeX

Are you ready to leave those "what you see is what you get" word processors behind and to enter the world of real, reliable, and high-quality typesetting? Then let's go together!

It's great that you decided to learn LaTeX. This book will guide you along the way to help you get the most out of it. Let's speak briefly about LaTeX's benefits and the challenges, and then we shall prepare our tools.

In this chapter, we will:

  • Get to know LaTeX and talk about the pros and cons compared to word processors

  • Install a complete LaTeX software bundle, including an editor

  • Write our first LaTeX document

So, let's get started.

What is LaTeX?

LaTeX is a software for typesetting documents. In other words, it's a document preparation system. LaTeX is not a word processor, but is used as a document markup language.

LaTeX is a free, open source software. It was originally written by Leslie Lamport and is based on the TeX typesetting engine by Donald Knuth. People often refer to it as just TeX, meaning LaTeX. It has a long history; you can read about it at For now, let's continue by looking at how we can make the best use of it.

How we can benefit

LaTeX is especially well-suited for scientific and technical documents. Its superior typesetting of mathematical formulas is legendary. If you are a student or a scientist, then LaTeX is by far the best choice, and even if you don't need its scientific capabilities, there are other uses — it produces very high quality output, it is extremely stable, and handles complex documents easily no matter how large they are.

Further remarkable strengths of LaTeX are its cross-referencing capabilities, its automatic numbering and generation of lists of contents, figures and tables, indexes, glossaries, and bibliographies. It is multilingual with language-specific features, and it is able to use PostScript and PDF features.

Apart from being perfect for scientists, LaTeX is incredibly flexible—there are templates for letters, presentations, bills, philosophy books, law texts, music scores, and even for chess game notations. Hundreds of LaTeX users have written thousands of templates, styles, and tools useful for every possible purpose. It is collected and categorized online on archiving servers.

You could benefit from its impressive high quality by starting with its default styles relying on its intelligent formatting, but you are free to customize and to modify everything. People of the TeX community have already written a lot of extensions addressing nearly every formatting need.

The virtues of open source

The sources of LaTeX are completely free and readable for everyone. This enables you to study and to change everything, from the core of LaTeX to the latest extension packages. But what does this mean for you as a beginner? There's a huge LaTeX community with a lot of friendly, helpful people. Even if you cannot benefit from the open source code directly, they can read the sources and assist you. Just join a LaTeX web forum and ask your questions there. Helpers will, if necessary, dig into LaTeX sources and in all probability find a solution for you, sometimes by recommending a suitable package, often providing a redefinition of a default command.

Today, we're already profiting from about 30 years of development by the TeX community. The open source philosophy made it possible, as every user is invited to study and improve the software and develop it further. Chapter 13, Using Online Resources, will point the way to the community.

Separation of form and content

A basic principle of LaTeX is that the author should not be distracted too much by the formatting issues. Usually, the author focuses on the content and formats logically, for example, instead of writing a chapter title in big bold letters, you just tell LaTeX that it's a chapter heading—you could let LaTeX design the heading or you decide in the document's settings what the headings will look like—just once for the whole document.

LaTeX uses style files extensively called classes and packages , making it easy to design and to modify the appearance of the whole document and all of its details.


LaTeX is available for nearly every operating system, like Windows, Linux, Mac OS X, and many more. Its file format is plain text—readable and editable, on all operating systems. LaTeX will produce the same output on all systems. Though there are different LaTeX software packages, so called TeX distributions , we will focus on TeX Live , because this distribution is available for Windows, Linux, and Mac OS X.

LaTeX itself doesn't have a graphical user interface; that's one of the reasons why it's so portable. You can choose any text editor. There are many editors, even specialized in LaTeX, for every operating system. Some editors are available for several systems. For instance, TeXworks runs on Windows, Linux, and Mac OS X; that's one of the reasons why we will use it in our book. Another very important reason is that it's probably best-suited for beginners.

LaTeX generates PDF output—printable and readable, on most computers and looks identical regardless of the operating system. Besides PDF, it supports DVI, PostScript, and HTML output, preparing the ground for distribution both in print and online, on screen, electronic book readers, or smart phones.

To sum up, LaTeX is portable in three ways—source, its implementation, and output.

Protection for your work

LaTeX documents are stored in human readable text format, not in some obscure word processing format, that may be altered in a different version of the same software. Try to open a 20 year old document written with a commercial word processor. What might your modern software show? Even if you can read the file, its visual appearance would certainly be different than before. LaTeX promises that the document will always be readable and will result in the same output. Though it's being further developed, it will remain backwards compatible.

Word processor documents could be infected with viruses, malicious macros could destroy the data. Did you ever hear of a virus "hiding" in a text file? LaTeX is not threatened by viruses.

Comparing it to word processor software

We've already described some advantages of the typesetting system LaTeX compared to word processing software. While LaTeX encourages structured writing, other word processors may compel you to work inconsistently. They might hide the real formatting structure and encrypt your document in some proprietary file format. Compatibility is a big problem, even between versions of the same software.

There are some interesting articles available online comparing LaTeX to other software. Of course, they are expressions of opinion. Some are years old and therefore do not cover the most recent software, but they discuss important points that are still valid today. You will find them listed in Chapter 13, Using Online Resources.

What are the challenges?

The learning curve could be steep, but this book will to help you master it.

Though writing LaTeX looks like programming, don't be afraid. Soon you will know the frequently used commands. Text editors with auto completion and keyword highlighting will support you. They might even provide menus and dialogs with commands for you.

Do you now think it will take a long time until you would learn to achieve creditable results? Don't worry; this book will give you a quick start. You will learn by practicing with a lot of examples. Many more examples can be read and downloaded from the Internet. In Chapter 13, we will explore the Internet resources.

We shall continue with the setup of LaTeX on our computer.

Installing LaTeX

Let's start off with the installation of the LaTeX distribution–TeX Live. This distribution is available for Windows, Linux, Mac OS X, and other Unix-like operating systems. TeX Live is well maintained and it is being actively developed.


Another very good and user-friendly LaTeX distribution for Windows is MiKTeX. It's easy to install like any other Windows application, but it's not available for other systems like Linux or Mac OS X. You can download it from

At first, we will visit the TeX Live homepage and take a survey of the installation possibilities. Feel free to explore the homepage in depth to study the information offered there.

Open the TeX Live homepage at

We will cover two ways of installation. The first will be online and requires an Internet connection. The other method starts with a huge download, but may be finished offline.

Let's check out the two installation methods.

Time for action – installing TeX Live using the net installer wizard

We will download the TeX Live net installer and install the complete TeX Live distribution on our computer.

  1. Click on downloading over the net or navigate to

  2. Download the net installer for Windows by clicking on

  3. Extract the file using your favorite archiving program. For example, WinZip, WinRar, or 7-Zip can do it for you.

  4. Open the folder install-tl-* and double-click the Windows batch file install-tl:

  5. The net installer will automatically detect your language. If it's showing the wrong language, you can force the choice of the language using the lang option at the command prompt such as install-tl –lang=en:

  6. The installation wizard will pop up, as shown in the following screenshot:

  7. Click on the Next button, now it offers to change the installation folder, but it's fine to retain it. In our book, we will refer to this default location:

  8. Click on the Next button. As shown in the following screenshot, choose one of the options, for example, for the creation of shortcuts:

  9. Click on the Next button. You can then confirm the settings and actually start the installation by clicking on the Install button:

  10. The next screenshot shows how you can monitor the installation progress:

  11. Finally, click on the Finish button and you're done.

What just happened?

You have completed the installation of TeX Live 2010. Now your Start menu contains a folder called TeX Live 2010 containing six programs:

  • DVIOUT DVI viewera viewer program for the classic LaTeX output format DVI. Today, most people choose PDF output, so you probably won't need it.

  • PS_VIEWa viewer program for the PostScript format; again you probably won't need it, except if you would like to use the PostScript language or read such documents.

  • TeX Live documentationwell, that's useful regarding setup and use of your software!

  • TeX Live Managerthat's your tool for package management, for example, installation and update of LaTeX packages.

  • TeXdoc GUIit's a graphical user interface offering access to a huge amount of LaTeX-related information. There's a lot of it stored in your computer by now. Use it to gather information whenever needed; it could be quicker than searching online.

  • TeXworks editorthis is an editor developed to create LaTeX documents comfortably. We will make extensive use of it.


TeXworks is also shipped with MiKTeX 2.8 and higher.

If you would like to stay in control over what should be installed on your computer, start the install-tl-advanced batch file instead of install-tl:

The TeX documentation available online contains more information for advanced users.

Now, we will go through the offline installation of TeX Live 2010.

Time for action – installing TeX Live offline

We will download a compressed ISO image of TeX Live 2010 with a size of about 1.2 gigabytes. After extraction, we can choose to burn it on DVD or to extract it to our hard disk drive and run the installation from there:

  1. Visit the download area at

  2. Download texlive2010.xz. If possible, use a download manager, especially if your Internet connection is not stable.

  3. Extract texlive2010.xz and you will get the file texlive2010.iso. If your archiving program doesn't support the .xz file format, obtain, for instance, the program 7-Zip version 9 or later from and use it for extraction.

  4. Either burn the ISO file on a DVD using a burning software supporting the ISO format or extract it to your hard disk drive. 7-Zip is also capable of doing that for you.

  5. Among the extracted files or on your DVD, you will find the installer batch files install-tl and install-tl-advanced that we've already seen. Choose one, start it, and go through the installation like in the previous installation.

What just happened?

It was similar to the first installation, but this time you've got all the data and you won't need an Internet connection. This complete download is especially recommended if it's foreseeable that you will do another installation of TeX Live later or if you would like to give it to friends or colleagues.


After an offline installation, it's recommended to run an update of TeX Live soon, because packages on a DVD or within an image could already be outdated. Use the TeX Live Manager to keep your system up-to-date if you are connected to the Internet.

Installation on other operating systems

If you work on Mac OS X, you may download a customized version of TeX Live at Download the huge .zip file and double-click on it to install.

On most Linux systems, installation is easy. Use your system's package manager. With Ubuntu, you may use Synaptic, on SUSE systems use YaST, with Red Hat a RPM frontend, and on Debian systems use Aptitude. In the respective package manager, look out for texlive.

If you want to stay on the edge, you could download and install the most current version of TeX Live from its homepage, instead of the version from the operating system's repositories. But be aware that installing third party sources may harm the integrity of your system.

Now that we've prepared the ground, let's start to write LaTeX!

Creating our first document

We have installed TeX and launched the editor; now let's jump in at the deep end by writing our first LaTeX document.

Time for action – writing our first document with TeXworks

Our first goal is to create a document that's printing out just one sentence. We want to use it to understand the basic structure of a LaTeX document.

  1. Launch the TeXworks editor by clicking on the desktop icon or open it in the Start menu.

  2. Click on the New button.

  3. Enter the following lines:

    This is our first document.
  4. Click on the Save button and save the document. Choose a location where you want to store your LaTeX documents, ideally in its own folder.

  5. In the drop-down field in the TeXworks toolbar, choose pdfLaTeX:

  6. Click the Typeset button .
  7. The output window will automatically open. Have a look at it:

What just happened?

You have just seen the first few minutes of the life of a LaTeX document. Its following hours and days will be determined by editing, typesetting, and so on. Don't forget to save your document frequently.

As announced in contrary to the classic word processor software, you cannot see the effect of changes immediately—but the result is just one click away.

Have a go hero – checking out advanced LaTeX editors

Do you have experience in working with complex programs? Do you like using a feature-rich and powerful editor? Then have a look at these LaTeX editors. Visit their websites to find screenshots and to read about their features:

The mentioned editors are free open source software.


We learned in this chapter about the benefits of LaTeX. It will be our turn to use the virtues of LaTeX to achieve the best possible results.

Furthermore, we covered:

  • Installation of TeX Live

  • Using the editor TeXworks

  • Creation of a LaTeX document and generation of output

Now that we've got a functional and tested LaTeX system, we're ready to write our own LaTeX documents. In the next chapter, we will work out the formatting of text in detail.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Use LaTeX's powerful features to produce professionally designed texts
  • Install LaTeX; download, set up, and use additional styles, templates, and tools
  • Typeset math formulas and scientific expressions to the highest standards
  • Include graphics and work with figures and tables
  • Benefit from professional fonts and modern PDF features


LaTeX is high-quality Open Source typesetting software that produces professional prints and PDF files. However, as LaTeX is a powerful and complex tool, getting started can be intimidating. There is no official support and certain aspects such as layout modifications can seem rather complicated. It may seem more straightforward to use Word or other WYSIWG programs, but once you've become acquainted, LaTeX's capabilities far outweigh any initial difficulties. This book guides you through these challenges and makes beginning with LaTeX easy. If you are writing Mathematical, Scientific, or Business papers, or have a thesis to write, then this is the perfect book for you. LaTeX Beginner's Guide offers you a practical introduction to LaTeX with plenty of step-by-step examples. Beginning with the installation and basic usage, you will learn to typeset documents containing tables, figures, formulas, and common book elements like bibliographies, glossaries, and indexes and go on to managing complex documents and using modern PDF features. It's easy to use LaTeX, when you have LaTeX Beginner's Guide to hand. This practical book will guide you through the essential steps of LaTeX, from installing LaTeX, formatting, and justification to page design. Right from the beginning, you will learn to use macros and styles to maintain a consistent document structure while saving typing work. You will learn to fine-tune text and page layout, create professional looking tables as well as include figures and write complex mathematical formulas. You will see how to generate bibliographies and indexes with ease. Finally you will learn how to manage complex documents and how to benefit from modern PDF features. Detailed information about online resources like software archives, web forums, and online compilers completes this introductory guide. It's easy to use LaTeX, when you have LaTeX Beginner's Guide to hand.

What you will learn

Install LaTeX and use the TeXworks editor to compile documents Design the page layout; create dynamic headers and footers Fine-tune appearances and the space of words, symbols, and lines Apply intelligent justification and customized hyphenation to achieve fine text design Typeset professional-looking tables and create bulleted and enumerated lists Write sophisticated math formulas, from in-text expressions to complex multi-line equations with various alignments Cross-reference objects such as figures, tables, and equations Load fonts and vary their shape and style; choose between thousands of LaTeX symbols from specialized fonts Use macros to save time and effort; load packages to extend LaTeX s capabilities Generate an index, cite books, and create bibliographies Use external pictures, color, PDF bookmarks, and hyperlinks Structure and manage large documents by splitting the input Manage large documents containing lists, index, and bibliography

Product Details

Country selected

Publication date : Mar 21, 2011
Length 336 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781847199867
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Mar 21, 2011
Length 336 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781847199867
Category :

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial


How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to
  • To contact us directly if a problem is not resolved, use
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.