Sapthesis
Sapthesis
sapthesis.cls
Version 4.1, 2018-08-07
Francesco Biccari∗
Abstract
This document describes how to use sapthesis.cls, a LATEX document
class for the typesetting of the theses of the “Sapienza – University of Rome”.
The official web page of sapthesis is
http://biccari.altervista.org/c/informatica/latex/sapthesis.php.
Contents
1 Introduction 2 A A very brief introduction to
the TEX world 8
2 Requirements
and installation 2 B Using LyX 9
∗ biccari@gmail.com
1
1 Introduction
After several years in my faculty I noticed that usually students spend a lot of time
to refine the aesthetic aspect of their LATEX documents instead of focusing on the
content. This is against the philosophy of LATEX, which was created to relieve
the writer from the typesetter’s work. Apart from the time spent, the resulting
documents are obviously all different from each other and good aesthetic results are
not always achieved. This has a negative impact both on the student’s work and on
the university. Moreover in 2007 the Sapienza university changed completely its
logo and a lot of strict graphic rules for official documents were introduced.1
For these reasons I thought that a LATEX class for the theses of my university
would have been a good idea. Sapthesis is the result of my work. To give a look to
a document composed by sapthesis class, compile one of the several examples in
the examples directory. In those files the page layout and the layout choices are
explained. Sapthesis is released under the terms of the latest version of the LATEX
Project Public License.
I would like to thank the Italian TEX user group (GuIT) for the help provided, in
particular Enrico Gregorio and Claudio Beccari. I would also thank all the users
who reported bugs and suggestions.
1A thesis is not an official document and therefore these guidelines can not be applied (private
communication with Laura Gobbo, Ufficio Stampa e Comunicazione Sapienza – Università di Roma).
However some Microsoft Word templates, with a completely different style, are provided. To give a
look to the new Sapienza style see Marchio, identità visiva e sistema grafico and Template tesi.
2
3 Usage
A LATEX document based on sapthesis can be compiled only by the commands
pdflatex and xelatex. In this manual only pdflatex will be considered.
As usual, in order to use this class, you need to call it by
\documentclass[options]{sapthesis}
You have to specify the class options for your case (see Sec. 3.1). Then you have to
provide some fundamental information (title, author, etc. . . ) by specific commands
in the preamble (see Sec. 3.2). Finally, remember to follow a source code structure
similar to those of the examples given in App. C and D. Especially the usage of
the commands \frontmatter, \mainmatter and \backmatter is mandatory,
otherwise the page style of the document will be wrong!
This class supports, at the moment, two languages: Italian and English. English
is the default. If your thesis contains only English or very few paragraphs in
another language, do not use the babel package because completely useless.
Instead, if you write in italian, load the babel package with the italian option:
\usepackage[italian]{babel}.
MasterP Option to typeset a thesis for a Master di primo livello (First level master).
MasterS Option to typeset a thesis for a Master di secondo livello (Second level
master).
TFA Option to typeset the final report for a Tirocinio Formativo Attivo.
3
twoside (default) The usual twoside option of the LATEX Standard Classes.
bn This option typesets the title page in black and white (using the b/w logo,
sapienza-MLblack-pos.pdf, instead of the colored one) and passes the
monochrome option to color and xcolor packages.
noexaminfo Suppress all the final exam informations. Indeed, by default, sapthesis
shows some information about the final thesis discussion on the back of
the title page. By default it shows the phrase “Thesis not yet defended”.
Otherwise, as explained later, giving the commands \examdate{...} and
\examiner{...} the date and the examiners list are shown.
italian or english Explicitly declare the language of the title page. Useful
when you want to write the title page in a language and the thesis in a different
language.
fem Use the feminine (only Italian): shows “candidata” instead of “candidato”.
4
\courseorganizer{...} Mandatory. Course organizer.
\advisor{...} You must specify at least one advisor. If you have more than one
advisor, put several advisor commands in the correct order:
\advisor{Prof. Pippo} \advisor{Dr. Pluto}
5
\director{...} Only for Specialization. Mandatory.
The sapthesis class defines also the color sapred which is the Sapienza red:
RGB(130,36,51). This color is switched to black if the bn option is in use. Example
of usage: ...\textcolor{sapred}{blah blah blah}...
4 Recommendations
• Do not change the default layout. If you want to change the interline spacing,
do not use the \linespread command. Load instead the setspace package
and use, for example, the \onehalfspacing command.
• Do not load the packages already loaded by sapthesis (see Sec. 2).
6
• As you already should know, LATEX can process only documents in pure ASCII.
If you want to insert directly other characters, not included in the 128 ASCII
characters (for example accented letters), you have to use a particular text
encoding for your source file. Then you have to “tell” to LATEX which encoding
you have chosen by the packages inputenc. It is always recommended to
use UTF-8 character encoding and specify this choice also by the magic lines
at the beginning of the source code (see the examples in App. C and D).
• Do not put any preface in your thesis. The preface should be written only by
an eminent expert in the field to comment exceptionally important results of
the student.
• Usually tables and figures are centered. Remember that, according to the
typographic rules, the table captions should be placed above the table, whereas
the figure caption should be placed below the figure.
• If the figure has a small width, it is possible to put the figure caption aside
the figure using the sidecap package (not preloaded by sapthesis).
• Avoid the use of colors unless really necessary. Remember that the figures
should be readable even if they are printed in gray scale!
7
• The name of operators should be typed in roman. Example: use sin ($\sin$)
instead of sin ($sin$).
• The margin notes are rarely used in scientific documents and should not be
used in a scientific thesis.
• Do not divide the bibliography per chapter unless it is really necessary. This
will save you from wasting a lot of time to prepare your LATEX source code.
Order your bibliography alphabetically according to the first author surname:
this order is very useful, contrary to the other typical order, the citation order.
In order to use LATEX, you have to install a TEX distribution. It contains the
compilers, several fonts and other files needed by the compilers and also many
packages, which can be thought as libraries or extensions of LATEX. The most
famous distributions are MiKTeX (available only for Windows), TeX Live (available
both for Windows and Linux) and MacTeX (available only for Mac OS).
Finally we discuss the editor, that is the program used to write your source file.
Since a source file written in LATEX, like in any other programming language, is a
simple text file, you can write your code with any text editor you want (for example
Notepad in Windows). However the suggested editors are:
8
• TeXworks. Already installed with any TEX distribution. Very simple and
powerful. Use TeXworks if you are not an expert. Enrico Gregorio has
written a very good and brief TeXworks manual in Italian, which can be
found at: http://profs.sci.univr.it/~gregorio/introtexworks.pdf.
• Avoid other editors unless you know what you are doing!
B Using LyX
LyX is an advanced LATEX editor which does not simply show the source code like
any text editor, but instead it renders maths, images, tables and some text formatting
commands. However this “layer” between the writer and the real source code is
sometimes frustrating and many authors discourage the usage of LyX.
Using sapthesis with LyX is quite straightforward.
• In LyX, first of all, go in Tools > Preferences > Language Settings > Language
and choose “none” in Language package. This step is necessary because LyX
not only loads babel with the desired language, but it passes the language
also as an option for the class! This triggers an error in many classes.
9
• Create a new document and go in Document > Settings > Document Class.
Here you can choose sapthesis as the class for the document and write the
class options.
• Create the titlepage inserting the title by the Title item in the LyX left menu.
It is recommended to activate View > Source Pane. This step is not necessary
but it is very useful to observe the LATEX code produced by LyX (on the right choose
“Complete source” or “Preamble”).
10
C PhD thesis example
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !TeX spellcheck = en_US
\documentclass[binding=0.6cm,PhD]{sapthesis}
\usepackage{microtype}
\usepackage{hyperref}
\hypersetup{pdftitle={My thesis},pdfauthor={Francesco Biccari}}
\title{My thesis}
\author{Francesco Biccari}
\IDnumber{123456}
\course[Philology]{Filologia}
\courseorganizer{Scuola di Dottorato in Scienze Filologiche}
\cycle{XXII}
\submitdate{October 2009}
\copyyear{2009}
\advisor{Prof. Caio}
\advisor{Dr. Sempronio}
\authoremail{pippo@pippo.com}
\begin{document}
\frontmatter
\maketitle
\dedication{Dedicated to\\ Donald Knuth}
\begin{abstract}
This thesis deals with myself.
\end{abstract}
\tableofcontents
\mainmatter
\chapter{Introduction}
...
\backmatter
\cleardoublepage
\phantomsection % Give this command only if hyperref is loaded
\addcontentsline{toc}{chapter}{\bibname}
% Here put the code for the bibliography. You can use BibTeX or
% the BibLaTeX package or the simple environment thebibliography.
\end{document}
11
D Laurea (Magistrale) thesis example
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !TeX spellcheck = it_IT
\usepackage{microtype}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{pdftitle={La mia tesi},pdfauthor={Francesco Biccari}}
\begin{document}
\frontmatter
\maketitle
\dedication{Dedicato a\\ Donald Knuth}
\begin{abstract}
Questa tesi parla di me.
\end{abstract}
\tableofcontents
\mainmatter
\chapter{Introduzione}
...
\backmatter
\cleardoublepage
\phantomsection % Give this command only if hyperref is loaded
\addcontentsline{toc}{chapter}{\bibname}
% Here put the code for the bibliography. You can use BibTeX or
% the BibLaTeX package or the simple environment thebibliography.
\end{document}
12
E TFA thesis example
% !TeX encoding = UTF-8
% !TeX program = pdflatex
% !TeX spellcheck = it_IT
\documentclass[binding=0.6cm,TFA]{sapthesis}
\usepackage{microtype}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{pdftitle={La mia tesi},pdfauthor={Francesco Biccari}}
\begin{document}
\frontmatter
\maketitle
\dedication{Dedicato a\\ Donald Knuth}
\tableofcontents
\mainmatter
\chapter{Introduzione}
...
\backmatter
\cleardoublepage
\phantomsection % Give this command only if hyperref is loaded
\addcontentsline{toc}{chapter}{\bibname}
% Here put the code for the bibliography. You can use BibTeX or
% the BibLaTeX package or the simple environment thebibliography.
\end{document}
13
F Other useful commands
\eu Napier’s number, e, in roman.
\iu Imaginary unit, i, in roman.
\der{...}{...} Derivative. The first argument represents the function to derive
while the second the variables separated by commas. The differential
symbol is automatically inserted. Examples: \der{f}{x}, \der{f}{x,y},
\der{f}{*{3}{x}}, \der{f}{*{2}{x},*{2}{y},z}.
\pder{...}{...} Partial derivative. Same syntax of the \der command.
\rb{...} Roman suBscript
\rp{...} Roman suPerscript
\tb{...} Text suBscript
\tp{...} Text suPerscript
\un{...} Useful command to typeset measurement units in the correct way, e.g.
25\un{m/s}, 13\un{kg\,cmˆ{-3}}. It can be used both inside or outside
the math environment. For heavy usage of measurement units and to insert
numbers in the form 1.4e-5, the package siunitx is recommended.
\mnote{...} Fancy margin notes
\g Shortcut for the \degree command. Example: 45\g produces 45°.
\C Shortcut for the \celsius command. Example: 37\,\C produces 37 °C. (Not
available in math mode compiling with xelatex).
\A Angstrom. Example: 10\,\A produces 10 Å.
\micro Micro prefix. Example: 7\,\micro m produces 7 µm.
\ohm Ohm. Example: 100\,\ohm produces 100 W.
\di Differential symbol with automatic spacing.
∫
Example: $\int x \di x$ produces x dx. If you prefer the differential
symbol in roman (d) you can give the option romandiff in the document
class options.
\x Shortcut for the \times command. E.g.: $7 \x 10ˆ5$ produces 7 × 105 .
14