0% found this document useful (0 votes)
82 views14 pages

Sapthesis

manuale tesi latex

Uploaded by

Iolanda Navone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views14 pages

Sapthesis

manuale tesi latex

Uploaded by

Iolanda Navone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Documentation of the LATEX class

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

3 Usage 3 C PhD thesis example 11


3.1 Class options 3
3.2 Commands for the D Laurea (Magistrale)
title page 4 thesis example 12
3.3 Other commands
and environments 6 E TFA thesis example 13

4 Recommendations 6 F Other useful commands 14

∗ 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.

2 Requirements and installation


The simplest way to install sapthesis is by the package manager of your TEX
distribution (TEX Live or MiKTEX). For manual installation see the README file.
The sapthesis package provides: the sapthesis.cls class file; the doc-
umentation sapthesis-doc.pdf (this file) and its source code; the logos of
Sapienza university; several usage examples; an English BibTEX style, called
sapthesis.bst, which can be used, obviously, only if you use the BibTEX way to
compose your bibliography and if your thesis is written in English (its usage is not
mandatory).
Sapthesis explicitely loads the packages xkeyval, etoolbox, geometry, ifxetex,
xltxtra, fontenc, textcomp, lmodern, caption, graphicx, color, booktabs, amsmath,
fancyhdr. Do not include these packages in the preamble of your document!

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}.

3.1 Class options


The following options can be passed to the \documentclass command.

PhD Option to typeset a Dottorato di Ricerca (PhD) thesis.

LaM Option to typeset a Laurea Magistrale (Master’s degree) thesis.

Lau Option to typeset a Laurea (Bachelor’s degree) thesis.

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.

Specialization Option to typeset a thesis for a Specializzazione.

draft The usual draft option of the LATEX Standard Classes.

oneside The usual oneside option of the LATEX Standard Classes.

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.

binding=length (zero default binding) The value of this option is an offset of


the text column. It is useful to take into account the margin for the binding
(ask to your bookbinder for information).

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.

nodefaultfont Avoid the loading of packages fontenc, textcomp and lmodern.

romandiff See App. F.

fem Use the feminine (only Italian): shows “candidata” instead of “candidato”.

3.2 Commands for the title page


As usual, the title page is generated by the \maketitle command. It needs some
information that you can supply by the following commands in the preamble.
\title{...} Mandatory. Title.

\subtitle{...} Optional. Subtitle (try to avoid a subtitle).

\author{...} Mandatory. Author (student’s name).

\IDnumber{...} Mandatory. ID number (matricola in Italian).

\course[...]{...} Mandatory. Use the official Italian name of the course. If


the optional argument override is specified, the mandatory argument is
used to specify the entire course line in the frontispiece. In this way it is
possible to override the behavior of the class (not recommended!).

4
\courseorganizer{...} Mandatory. Course organizer.

\submitdate{...} Mandatory. Use the form \submitdate{April 2009} for


PhD’s and the form \submitdate{2009/2010} for Laurea theses.

\AcademicYear{...} Alias for \submitdate. Academic Year.

\copyyear{...} Mandatory. Copyright year (usually the graduation year).

\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}

\coadvisor[...]{...} Optional. Co-advisors of the thesis. Same syntax of the


\advisor command. If the optional argument ext is specified, “External
advisor” will be printed instead of “Co-Advisor”.

\reviewer{...} Optional. Reviewers of the thesis. Same syntax of the \advisor


command. The list of the reviewer is preceded by the a text which can be
specified by the \reviewerlabel{...} command.

\authoremail{...} Mandatory. Email of the thesis author. It is automatically


hyper-linked if hyperref package is loaded.

\versiondate{...} Optional. Date version of the thesis.

\website{...} Optional. Thesis website. Automatically hyper-linked if hyperref


package is loaded.

\ISBN{...} Optional. ISBN

\copyrightstatement{...} Optional. Specify a copyright statement that will


be printed in place of the default one.

\examdate{...} Optional. Date of the final exam.


Example: \examdate{16 February 2010}.

\examiner[...]{...} Optional. Specifies the members of the board of examin-


ers of the final exam. Usage similar to \advisor command. The optional
argument can be used to specify the role of that examiner in the commission.

\cycle{...} Mandatory only for PhD’s. Use the form: \cycle{XXII}

5
\director{...} Only for Specialization. Mandatory.

\tutor{...} and \tutorcoord{...} Only for TFA. Mandatory.

\schoolname{...} Only for TFA. Mandatory. Name of the school.

\schooladdress{...} Only for TFA. Mandatory. School’s address.

\schoolwebsite{...} Only for TFA. Optional. School’s website.

\schoolprincipal{...} Only for TFA. Mandatory. School’s principal.

3.3 Other commands and environments


\dedication{...} A command to compose the dedication.

abstract An environment to compose the abstract of your document. This


environment has an optional parameter to choose the title of the abstract
section. If you use a language for the abstract different from that of the thesis,
consider the \selectlanguage{...} command provided by the babel
package.

acknowledgments An environment to compose the acknowledgments of your


document. This environment has an optional parameter to choose the title of
the acknowledgments section. If you use a language for the acknowledgments
different from that of the thesis, consider the \selectlanguage{...}
command provided by the babel package.

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).

• Respect the following thesis structure:

– Title page (\maketitle command)


– Dedication (\dedication command)
– Abstract (abstract environment)
– Acknowledgements (acknowledgments environment)
– Table of contents (\tableofcontens command)
– Chapters
– Appendices
– Bibliography

• It is recommended to avoid or limit the acknowledgments in a thesis, it is not


very professional. The dedication should be enough.

• 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!

• Subscripts and superscripts should be in italic if they represent variable


quantities, whereas should be in roman if they are simply labels.

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.

A A very brief introduction to the TEX world


Many people want to (or are compelled to) write in LATEX without studying a basic
manual. Here follows a very brief introduction to the TEX world.
TEX, the document preparation system designed by Donald Knuth in 1978, is a
program to typeset documents. It is a mark-up language: you write a simple text
decorated with TEX commands (source code) which is then compiled to obtain the
final product, a document in pdf format. LATEX is just a set of macros, written in
TEX, to simplify the writing of the source code: it can be thought as a simpler
programming language with respect to TEX. A source code written in LATEX can be
compiled by several “compilers”: pdflatex (the most common), or xelatex, or
others.
The following list of LATEX manuals, may be especially useful for Italian authors.

• L. Pantieri & T. Gordini, L’arte di scrivere con LATEX, (2017)


• S. Pakin, The comprehensive LATEX symbol list, (2017)
• E. Gregorio, LATEX: breve guida ai pacchetti di uso più comune, (2010)

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.

• TeXstudio (cross-platform), TeXmaker (cross-platform), TeXshop (only for


Mac), Kile (only for Linux). Powerful editors.

• Avoid other editors unless you know what you are doing!

Finally we explain how to compile the example documents provided in the


sapthesis package. Double click on one of the .tex file in the examples folder.
TeXworks should start showing the content of that file. The pdflatex compiler
should be automatically selected thanks to the magic lines placed at the beginning
of the file. Now, in order to compile, press the green button. At the end of the
compilation the resulting pdf appears in a separate window. Remember to compile at
least three times, because LATEX needs more than one compilation to correctly resolve
the internal cross references (for example for the table of contents composition, or
when you refer to a figure by the \label – \ref / \pageref mechanism).

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.

• Install sapthesis by the package manager of your TEX distribution or manually.

• Copy the file sapthesis.layout in the directory


C:\Program Files\Lyx20\Resources\layouts\
and then, in LyX, click on Tools > Reconfigure. This will add the sapthesis
class in the list of LyX available classes.

• 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.

• Write the preamble in Document > Settings > LaTeX Preamble.

• 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

\documentclass[binding=0.6cm,Lau]{sapthesis} % LaM for a Laurea Magistrale

\usepackage{microtype}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{pdftitle={La mia tesi},pdfauthor={Francesco Biccari}}

\title{La mia tesi}


\author{Francesco Biccari}
\IDnumber{123456}
\course{Fisica}
\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
\AcademicYear{2011/2012}
\copyyear{2012}
\advisor{Prof. Caio}
\advisor{Dr. Sempronio}
\authoremail{pippo@pippo.com}

\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}}

\title{La mia tesi}


\author{Francesco Biccari}
\IDnumber{123456}
\course{A049 Matematica e Fisica}
\courseorganizer{Facoltà di Scienze Matematiche, Fisiche e Naturali}
\AcademicYear{2012/2013}
\copyyear{2013}
\advisor{Prof. Caio}
\tutor{Dr. Sempronio}
\tutorcoord{Dr. Sempronio}
\authoremail{pippo@pippo.com}

\schoolname{Liceo Scientifico Louis Pasteur}


\schooladdress{Via G. Barellai 130, 00135 Roma}
\schoolwebsite{http://www.liceopasteur.it/}
\schoolprincipal{Prof. Diego Armando Maradona}

\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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy