I'm a Canadian based in Berlin, Germany. My day job is a Technical Writer in the API space. I write about topics such as technology, usability, creative writing and Canadian history. All views mine. I tweet at @glennjlea. Read more about me here or at LinkedIn.
Site version: 3.0

Defining page size, margins and layout

You use packages and settings in the stylesheet to define the page size, margins and layout. This should be done before customizing headers and footers,

## Setting Page Size

Page size is defined in the root file. In this example, I defined the page size to be 210mm x 295mm which is the standard A4 page size. You can also use `letterpaper` for US letter size.

Using the `book` class, this command sets the page size (A4), base font size (11 pt) and pagination (double-sided).

## Page Size and Margins and Layout

For defining all text/page measurements. 210x295mm is the standard A4 page size. 160x185mm is simply a text body size that resulted in pleasing margins.

The dvips option will be superceded if pdflatex is used, but is necessary in order to generate a correct PostScript bounding box under standard LaTeX.

### geometry package

The `geometry` package has two arguments:

• `vcentering` sets auto-centering vertically.

• `dvips` writes the paper size in the dvi output.

The `dvips` option is superceded if `pdflatex` is used but is necessary to generate a correct PostScript bounding box under standard LaTeX.

The `\geometry` command sets the `papersize` precisely, where

• `papersize` determines the size of the paper, which in this case is 210mm by 295mm.

• `total` defines the bounding box for the content area of the document. It is 160mm x 185mm, which results in pleasing margins.

## Defining Offsets for Headers and Footers

The page layout package `geometry` is also used to define the offsets for headers and footers. `footskip` defines the distance between the footer and body text Take care when modifying these settings.

You need to allow space for the headers and footer on the page. You set the left, right, top margins and mirror the margins for double-sided pages.

The following commands are used for an A4 page size.

The height of the text flow on each page is defined using this command. The original setting for text height: 24.5. This changes it to: 23.5cm

The width of the text flow is defined using this command. The original setting for text height: 16cm. This changes it to 15cm.

The distance between the footer and body text is defined using this command. `footskip` defines the distance between the footer and body text.

The height of the header and the distance between the header and body text is set with this command.

## Paragraph settings

You can indent the first line of paragraphs using this command, if you need to do so for stylistic reasons. If you set the indentation to 0cm, paragraphs do not have an indentation.

You can set the spacing between paragraphs in points. Paragraph spacing is determined by the argument `\parskip`, which in this case is 3 pts.

Line spacing is determined by these commands. In the following example, line spacing is set to 1.5 using the `\setspace` package. Options are commented out.

Alternately, you can use the command `\baselinestretch` but you can adjust the command using `\renewcommand`.