About
Shop
LaTeX
Free Software
Books
News
Contact
Blog
Book giveaway: enter for a chance to win one of five signed copies of "Quack, Quack, Quack. Give My Hat Back!" Closing date: 12th July 2016.


1.1 Building Your Document

To “typeset”, “build”, “compile” or “LaTeX” your document means to run the pdflatex (or latex) executable on your document source code. If you are using a front-end, such as TeXworks, WinEdt, TeXstudio, or TeXnicCenter, this usually just means clicking on the appropriate button or selecting the appropriate menu item. (See Volume 1 for further details.)

It's important to remember that a front-end is an interface. It's not, for example, TeXworks that is creating your PDF. When you click on the “typeset” button, TeXworks tells the operating system to run the required executable. This is usually pdflatex, but there are other executables that may need to be used to help create your document, such as bibtex or biber (discussed in §5. Generating a Bibliography) and makeindex or xindy (discussed in §6. Generating Indexes and Glossaries).

For example, if your document has a bibliography and you are using TeXworks, you first need to make sure the drop-down menu is set to “pdfLaTeX” (see Figure 1.1) and click on the green “Typeset” button. Then you need to select “BibTeX” from the drop-down menu (see Figure 1.2) and click on the green “Typeset” button. Then again select “pdfLaTeX” (Figure 1.1) and click the “Typeset” button. Finally, to ensure your cross-references are all up-to-date, you need to click on the “Typeset” button again. If you are using biber instead of bibtex (see §5.3. Biblatex), then you have to replace the above “BibTeX” step with “Biber” instead.

Figure 1.1: Selecting pdfLaTeX from the Drop-Down Menu
 

Figure 1.2: Selecting BibTeX from the Drop-Down Menu
 

If the tool you require isn't listed in the drop-down box, you will have to add it. For example, to add makeglossaries to the list of available tools in TeXworks, you need to select EditPreferences, which will open the “TeXworks Preferences” dialog. Make sure the “Typesetting” tab is selected and click on the lower + button next to the “Processing tools” list. This will open the “Tool Configuration” dialog. Set the “Name” field to the name of the application, as you want it to appear in the tool list (for example “MakeGlossaries”). Then click on the “Browse” button to find the application on your computer. Next you need to click on the + button next to the “Arguments” list. Set the argument to $basename. Since makeglossaries doesn't modify the PDF, uncheck the “View PDF after running” box (see Figure 1.3).

Figure 1.3: Adding Makeglossaries to the list of tools in TeXworks
 

This is a bit of a hassle (if not downright confusing for a beginner) and even more so when you have glossaries and an index in your document as well as a bibliography. Fortunately there are ways of automating this process so that you only need one button press to perform all those different steps. There are several applications available to do this for you, and I strongly recommend you try one of them, if possible, to reduce the complexity involved in building a document.

Volume 1 mentioned latexmk, which is available on CTAN. This is a Perl script, so it will run on any operating system that has Perl installed (see Volume 1). Since Volume 1 was published, a Java alternative called arara has arrived on CTAN. Java applications will run on any operating system that has the Java Runtime Environment installed, so both latexmk and arara are multi-platform solutions to automated document compilation. §1.1.1. LaTeXmk gives a brief introduction to latexmk, and §1.1.2. Arara gives a brief introduction to arara.


This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-02-9).

Last modified: 2015-06-27.

The free resources on this site are funded by book sales, not by adverts. If you would like to help keep this site free of annoying third-party ads, please consider buying a book.

© 2013 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Site Map FAQs Guestbook