# Using LaTeX to typeset your thesis

### A short guide byDag Langmyhr, Department of Informatics, University of Oslo

LaTeX is a well-known program for quality typesetting and is very well suited for writing an academic thesis. But when the thesis is to be printed by a professional publisher, there are special requirements you normally would not consider. The three main problems are:

• font embedding
• colour specification
• page size, font size, margin size etc

This short document tells you how to avoid these problems.

#### Which LaTeX?

There exist two versions of the LaTeX program: latex and pdflatex. I strongly recommend you use pdflatex as some of the features mentioned below are only available in this version.

## The document text

Generally, you can use LaTeX as you normally would.

### Basic document style

The publishing company Akademika specifies certain typographical guidelines with which PhD theses at the University of Oslo must comply. (This text is only available in Norwegian.)

If you use the LaTeX document class uiophd, all these requirements are implemented. The class is a variant of the standard report class and is used like this:

\documentclass[]{uiophd}
\usepackage[utf8]{inputenc}         % or whatever you use

\title{My title}
\author{My name}

\begin{document}
\frontmatter
\maketitle
\tableofcontents

\mainmatter
\chapter{...}
:
\end{document}


(If you think the font in this document class is too large, bear in mind that the pages will be reduced by 19% when printed.)

The document class assumes that the thesis is written in American English. If you prefer British English, you should specify this:

\documentclass[UKenglish]{uiophd}


### Paper size

Your final PDF document should have A4 paper size. If you use the procedure specified above, this should be taken care of automatically. If not, you must manage this yourself, particularly as most programs use the American letter format as default.

#### Font embedding

It is important that all fonts are embedded. If you use the Linux computers at Ifi/UiO, all text fonts used are automatically embedded.

#### Inserting pages

Quite often a thesis will include copies of articles previously published. Use the command \includearticle to insert these. You can use the option numbers to specify how the page numbers are to be printed:

• numbers=default  The page numbers in included articles are printed as the page numbers.
• numbers=low The page numbers are lowered 1.5 cm so they will not obscure the article pages.
• numbers=none Omit the page numbers altogether.

Here is an example:

\includearticle[numbers=low]{xxx.pdf}


## Illustrations

Illustrations can be very problematic unless you consider the two following issues.

### Colour model

Colour is normally specified using either CMYK or RGB. The really important rule regarding colour is

Never mix CMYK and RGB in the same document!

Since two of the possible illustration formats only support RGB (see below), my recommendation is to always use RGB.

#### Hint

If you really need accurate colours, you should only use PDF illustrations. But make sure they all use CMYK colours.

### Font embedding

If you have images in PDF format, make sure that all fonts are embedded.

### Image formats

When using pdflatex, the illustrations must be in either of these three formats:

JPEG
is best for photographs. It is a raster image format so font embedding is never a problem. Only the RGB colour model is supported. Just make sure the image has sufficient resolution (at least 300 dpi ("dots per inch")).
PNG
is another raster image format; it is a poor format for photographs but it is excellent for all other kinds of raster images. It supports only RGB colour. Since it is a raster image format, font embedding is never a problem, but you should ensure that the resolution is good enough (at least 300 dpi).
PDF
is a general format and can contain anything. If it contains text, you must ensure that all fonts are available.

## Other issues

### Covers

The official cover for PhD theses is created by the publisher.

## If you need help

The web page http://www.mn.uio.no/ifi/tjenester/it/hjelp/latex/ contains various links to all kinds of information on LaTeX, in particular how it is used at Ifi/UiO. The text is in Norwegian, but most of it should be understandable for others.

If you need more assistance, you may send an e-mail to ifidrift@ifi.uio.no.