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 2: Basic structures

In this chapter…

  1. The Document Class Declaration
  2. The document environment
  3. Titling
  4. Abstracts and summaries
  5. A little think about structure
  6. Sections
  7. Ordinary paragraphs
  8. Table of contents

If the quick-start exercise in § 1.3 was enough to show you how a LATEX document works, then this is where you get the rest of the basic information. If you skipped Chapter 1 ‘Writing documents’ then be prepared to go back to some of the sections in it, because I’ll be referring to things you might not have come across yet.

LATEX’s approach to formatting is to aim for consistency. This means that as long as you identify each component element of your document correctly, it will be typeset in the same way as all the other elements like it, so that you achieve a consistent finish with minimum effort.

Consistency helps make documents easier to read and understand, as well as making them more visually attractive. Consistency is also what editors, reviewers, and publishers look for. Publishers have a house style, and often a reputation to keep, so they rightly insist that if you do something a certain way once, you should do it the same way each time.

‘Elements’ are the component parts of a document: all the pieces which make up the whole. Almost everyone who reads books, newspapers, magazines, reports, articles, and other classes of documents will be familiar with the common elements: parts, chapters, sections, subsections, subsubsections, headings, titles, subtitles, paragraphs, lists, tables, figures, and so on, even if they don’t consciously think about them.

  1. Readers familiar with SGML, HTML, and XML will recognise the concept as similar to the Document Type Declaration (it’s still called a ‘type’ there, not a ‘class’). 

  2. Theses and dissertations may require an Abstract, which is provided in the report class but not in the book class. Many universities provide a special thesis class of their own. 

  3. The built-in letter class is rather idiosyncratic: there are much better ones you can use which you will find in the memoir package and the komascript bundle. 

  4. Letter size is 8½″×11″, which is the trimmed size of the long-obsolete Demy Quarto, still in use in North America. The other common US office size is ‘Legal’, which is 8½″×14″, a variant cutting close to the old Foolscap (8¼″×13¼″). ISO standard ‘A’, ‘B’, and ‘C’ paper sizes, used everywhere else, are still virtually unknown in most parts of North America. 

  5. Note that the standard built-in document classes (book, article, report, or letter) only use the paper size to adjust the margins: they do not embed the paper size name in the PostScript or PDF output. For this you need the geometry package. If you are using PDFLATEX, or you intend creating PostScript output, and you want to change the default paper size, you must specify it both in the Document Class option and as an option to the geometry package (see the example ‘Read all about it’), in order to ensure that the paper size name gets embedded correctly in the output, otherwise printers may select the wrong paper tray, or reject the job. 

  6. It is arguable that chapters also have no place in reports, either, as these are conventionally divided into sections as the top-level division. LATEX, however, assumes your reports have chapters, but this is only the default, and can be changed very simply (see § 7.6). 

  7. Paragraph spacing and indentation are cultural settings. If you are typesetting in a language other than English, you should use the babel package, which alters many things, including the spacing and the naming of sections, to conform with the standards of different countries and languages.