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

The Quick Start exercise in § 1.4 above was enough to show how a LATEX document works. Now we’re going to start looking at how a larger document is put together. If you skipped the whole of Chapter 1 ‘Writing documents’ above, 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 based on 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, headings, titles, subtitles, paragraphs, lists, tables, figures, sidebars, panels, exercises, 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 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. Other common US office sizes are ‘Legal’, which is 8½″×14″, a ‘bastard’ (variant) cutting close to the old Foolscap (8¼″×13¼″); Ledger or Tabloid (11″×17″, which is exactly twice ‘Letter’, in the same way that A3 is twice A4); and ‘Executive’ (7″×10″). International Organization for Standardization (ISO) standard ‘A’, ‘B’, and ‘C’ paper sizes, used everywhere else, are still largely unknown in many 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 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. A few publishers’ journal style packages ask for the Abstract to be typed before the \maketitle because they do special formatting with it along with the title block. 

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

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