Zum Inhalt springen

Introduction

LaTeX is shipped with a number of “standard” classes which can be used for creating different types of document, including: article, book, report, letter, slides and proc (for conference proceedings). LaTeX also provides the minimal class for debugging purposes or as a basis for writing your own class file. Many additional document classes are published in the Overleaf template Gallery, or can be downloaded from CTAN.

Creating two-sided documents

To create a two-sided document pass the twoside option to the \documentclass declaration; for example:

\documentclass[twoside]{article}

Note:

  • The book class is two-sided by default so you do not need to add the twoside option.
  • The slides class does not support the twoside option—perhaps because it would not make sense for presentation slides to do that.

Overleaf example to explore document layout

The following example provides a small Overleaf project which uses the layout package to create graphics that show the initial (default) document layout for your preferred document class. Those default values can be changed by loading packages, such as geometry, which change the default values of LaTeX's page-layout parameters. See the articles Page size and margins and A visual guide to LaTeX’s page layout parameters for further information.

For two-sided documents, the book class, and others using the use the twoside option, the example will create separate graphics for the left-hand and right-hand pages. On opening the project you’ll see the left- and right-hand pages for \documentclass[twoside]{article}.

% Choose the document class whose layout you want to visualize: uncomment
% the one you want, comment out the others.
% \documentclass[a4paper]{article} %Produces one page (based on A4 paper size)
% \documentclass[a4paper]{report} %Produces one page (based on A4 paper size)
% \documentclass[twoside,a4paper]{report} %Produces two pages (based on A4 paper size)
% \documentclass[a4paper]{book} %Produces two pages (based on A4 paper size)
% \documentclass[a4paper]{letter} %Produces one page (based on A4 paper size)
% \documentclass[twoside, a4paper]{letter} %Produces two pages (based on A4 paper size)
\documentclass[twoside,a4paper]{article} %Produces two pages (based on A4 paper size)
\usepackage{layout}
\begin{document}
\layout
\end{document}

 Open this project to explore the layout of standard LaTeX document classes.

This example produces graphics such as those shown in the following image. Note that the image below has been cropped/edited for clarity of presentation in this article.

Image showing latex document layout

Further reading

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX