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. Make sure your editor is set up to use XƎLATEX

    In this document we use XƎLATEX not pdflatex or the original LATEX. You will usually find this setting:

    • either in the configuration; for example in TEXStudio it’s under OptionsConfigure TEXStudioBuildDefault Compiler;

    • or in the menus; for example in TEXShop it’s in the LaTeX menu (second from left)

    See Figure 1.3 for examples. Check in yor editor’s documentation for where the setting is in your system.

  3. 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.

  4. 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.

  5. Save the document

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

  6. Typeset the document

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

  7. 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).

  8. 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: Setting XƎLATEX as the default LATEX processor in TEXStudio and TEXShop


Figure 1.4: 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.