Document Setup

Page geometry, fonts, line spacing and paragraph layout.

Everything here goes in the preamble.

Page geometry

The geometry package sets margins and paper size.

\usepackage[
  a4paper,
  left=2cm,
  right=2cm,
  top=3cm,
  bottom=3cm
]{geometry}

Fonts

\usepackage[T1]{fontenc}                   % Better font encoding
\usepackage{courier}                       % Monospaced font
\usepackage{helvet}                        % Sans-serif font
\renewcommand{\familydefault}{\sfdefault}  % Sans-serif for the whole document

Line spacing

\usepackage{setspace}
\onehalfspacing

Paragraphs

LaTeX indents paragraphs by default. To separate them with a gap instead:

\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}

Document class

The class sets the base font size and which sectioning commands exist. article suits papers. Use report or book if you need \chapter, for example for a thesis.

\documentclass[a4paper,11pt]{article}