Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

Chapter 1: Writing documents

Section 1.3: Quick start for the impatient

If you already know all about editors and plaintext files and markup and how to run programs, and you know that LATEX is already fully installed (including an editor that you know how to use), you’d probably like to type something in and see LATEX do its job.

If you don’t know this stuff yet, then by all means do this section now, but treat it as part of the learning experience. Otherwise you might want to skip forward to § 1.4 and read more about how LATEX works, and come back to this section later.

Figure 1.2: Quick-start example document text


\section{My first document}

This is a short example of a \LaTeX\ document I wrote on \today. It
shows a few simple features of automated typesetting, including:

  \item setting the default font size to 12pt and specifying `article'
    type for formatting;
  \item using the Palatino typeface and some special formatting for
    URIs (web addresses);
  \item preventing sections being numbered;
  \item turning off justification for an informal document;
  \item formatting a section heading;
  \item using the \LaTeX\ logo;
  \item generating today's date;
  \item formatting this list of items;
  \item formatting a subsection heading;
  \item using opening and closing quotes;
  \item formatting a URI;
  \item arbitrary formatting: centering and italicisation;
  \item autonumbering the pages.

\subsection{More information}

This example was taken from the book `Formatting Information',
which you can read online or in PDF format at
\url{} and use as a
teach-yourself guide.

  \fbox{\textit{Have a nice day!}}

  1. Install LATEX on your computer

    See the appendix ‘Installation’. You can check to see if it’s already installed by opening a command window and typing latex and pressing the Enter or Return key; or by looking for a LATEX editor in your Programs or Applications, or in your dock or panel.

  2. Create a new, empty document

    Start up your LATEX editor and open a new document:

    Click on FileNew and if it offers you a choice of document types, pick ‘Empty File’.

    Delete any template material it inserts, so that your new document is completely empty.

  3. Copy the example

    Copy and paste the text from Figure 1.2. Make sure you get all of it (apart from the caption), and don’t change anything yet.

    If you are using the PDF or print edition of this book, copy the text from the web site.

  4. Save the document

    Save the document as quickstart.tex in your Documents folder (or wherever you normally keep your documents)

  5. Typeset the document

    Click on the Run, Build, Typeset, PDFLATEX or TEXFile menu or toolbar icon for your editor, as indicated by the black arrow in the illustrations in Figure 1.3.

  6. Preview the typesetting

    Some editors open the preview automatically when a new document is typeset. If this does not open automatically for you, click on the View or Preview toolbar item (usually next to the Typeset icon).

  7. Print it

    If you have a printer installed, you can click on the Print toolbar icon in your viewer.

If you encounter any errors, it means you do need to read the rest of this chapter after all! There is a list of common error messages in § C.3.1. You need to fix the errors in your document and click on the Typeset button again (or whatever your editor uses).

Figure 1.3: What to click on to typeset a document


If you are using another editor, look for a menu or toolbar button marked Typeset or XƎLATEX or PDFLATEX or Build or Compile.