Debian Codegraph @

texmf-dist/doc/latex/unifith/unifith-doc.tex

raw
1 % !TeX encoding = UTF-8
2 % !TeX program = pdflatex
3 % !TeX spellcheck = en_US
4
5
6 \documentclass[a5paper,11pt]{article}
7
8 \usepackage[scale=0.85, footskip=0.8cm,heightrounded]{geometry}
9 \usepackage[T1]{fontenc}
10 \usepackage[helvratio=0.88]{newtxtext}
11 \usepackage{textcomp}
12 \usepackage{amsmath}
13 \usepackage[varg,cmintegrals,cmbraces]{newtxmath}
14 \usepackage{microtype}
15 \usepackage{graphicx}
16 \usepackage{curve2e}
17 \usepackage{color}
18 \definecolor{gray}{gray}{0.4}
19 \definecolor{sfondoblu}{rgb}{0.94,0.97,1}
20 \usepackage{listings}
21 \lstset{language=[LaTeX]TeX,
22 basicstyle=\scriptsize\ttfamily,
23 keywordstyle=\color{blue}\bfseries,
24 commentstyle=\color{gray},
25 backgroundcolor=\color{sfondoblu},
26 frameround=tttt,
27 frame=tlrb,
28 escapechar=|,
29 morekeywords={submitdate, cycle, courseorganizer, AcademicYear, copyyear, Faculty, course, PhDorganizer, IDnumber, advisor, examdate, examiner, authoremail, frontmatter, mainmatter, maketitle, tableofcontents, chapter, appendix, backmatter, dedication, selectlanguage,alttitle,thesistype,phantomsection},
30 columns=flexible
31 }
32
33 \usepackage{multicol}
34
35 % eliminate dots in the table of contents
36 \makeatletter
37 \renewcommand{\@dotsep}{10000}
38 \makeatother
39
40 \usepackage[bookmarks=false,hyperfootnotes=false]{hyperref}
41 \hypersetup{
42 colorlinks=true,
43 linkcolor=blue,
44 anchorcolor=blue,
45 citecolor=blue,
46 urlcolor=blue,
47 pdftitle={unifith.cls documentation},
48 pdfauthor={Francesco Biccari}
49 }
50
51 \newcommand{\bs}{\textbackslash}
52 \newcommand{\sq}{\textquotesingle}
53
54 \author{\small Francesco Biccari\\\small(\href{mailto:[email protected]}{[email protected]})}
55 \title{\small Documentation of the \LaTeX\ class\\
56 \Large \textbf{\texttt{unifith.cls}}\\
57 \small \vspace{0.2cm} Version 1.6, 2021-10-01
58 }
59 \date{}
60
61 % degree
62 \providecommand{\degree}{\mbox{\textdegree}}
63 \providecommand{\g}{\degree}
64
65 % gradi Celsius
66 \providecommand{\celsius}{\ensuremath{\textrm{\upshape\textdegree}\kern-\scriptspace\mathrm{C}}}
67 \providecommand{\C}{\celsius}
68
69 % Angstrom
70 \providecommand{\angstrom}{\mbox{\AA}}
71 \providecommand{\A}{\angstrom}
72
73 % micro
74 \providecommand{\micro}{\mbox{\textmu}}
75
76 % Ohm
77 \providecommand{\ohm}{\ensuremath{\mbox{\textohm}}}
78
79 % Napier's number
80 \providecommand{\eu}{\ensuremath{\mathrm{e}}}
81
82 % imaginary unit
83 \providecommand{\iu}{\ensuremath{\mathrm{i}}}
84
85 % roman subscript
86 \providecommand*{\rb}[1]{\ensuremath{_\mathrm{#1}}}
87
88 % roman superscript
89 \providecommand*{\rp}[1]{\ensuremath{^\mathrm{#1}}}
90
91 % differential (only math)
92 \providecommand{\di}{\mathop{}\!d}
93
94 % derivative and partial derivative (only math)
95 \providecommand*{\der}[3][]{\frac{d^{#1}#2}{d #3^{#1}}}
96 \providecommand*{\pder}[3][]{%
97 \frac{\partial^{#1}#2}{\partial #3^{#1}}%
98 }
99
100 % measurement unit
101 \providecommand*{\un}[1]{\ensuremath{\mathrm{\,#1}}}
102
103
104 \newcommand{\unifith}{\textsf{UniFiTh}}
105
106 \begin{document}
107 \maketitle
108
109 \begin{abstract}\noindent
110 This document describes how to use \texttt{unifith.cls}, a \LaTeX\ document class for the typesetting of the theses of the ``University of Florence''. The official web page of \textsf{UniFiTh} is {\footnotesize\url{http://biccari.altervista.org/c/informatica/latex/unifith.php}}.
111 \end{abstract}
112
113 \setcounter{tocdepth}{2}
114 \renewcommand{\columnseprule}{0.4pt}
115 \setlength{\columnsep}{1.5cm}
116
117 \addtocontents{toc}{\protect\begin{multicols}{2}}
118 {\small
119 \tableofcontents}
120
121 \clearpage
122
123 \section{Introduction}
124
125 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.
126 This is against the philosophy of \LaTeX, which was created to relieve the writer from the typesetter's work.
127 Apart from the time spent, the resulting documents are obviously all different from each other and good aesthetic results are not always achieved.
128 This has a negative impact both on the student's work and on the university.
129 For these reasons I thought that a \LaTeX\ class for the theses of my
130 university would have been a good idea.
131 \textsf{UniFiTh} is the result of my work.
132 It has been developed starting from \textsf{Sapthesis} class of the same author. \textsf{UniFiTh} follows the rules of the Communication Plan of the University of Florence: {\footnotesize\url{https://www.unifi.it/ls-36-unifi-comunica.html}}. At that link you can find the guidelines for the preparation of the documents, the files of the logo and some examples.
133
134 To give a look to a document composed by \textsf{UniFiTh} class, compile one of the several examples in the \texttt{examples} directory.
135 In those files the page layout and the layout choices are explained.
136 \textsf{UniFiTh} is released under the terms of the latest version (1.3c) of the
137 \href{http://www.latex-project.org/lppl/}{\LaTeX\ Project Public License}.
138
139 I would like to thank the Italian \TeX\ user group (\href{http://www.guitex.org/}{GuIT}) for the help provided. I would like to thank also Giacomo Mazzamuto and Lorenzo Pattelli and all the users who reported bugs and suggestions.
140
141 \section[Requirements\\ and installation]{Requirements and installation}
142 \label{requirements_installation}
143
144 The simplest way to install \textsf{UniFiTh} is by the package manager of
145 your \TeX\ distribution (\TeX\ Live or MiK\TeX). For manual installation see
146 the \texttt{README} file.
147
148 The \textsf{UniFiTh} package provides: the
149 \texttt{unifith.cls} class file; the documentation
150 \texttt{unifith-doc.pdf} (this file) and its source code; the logo of the
151 University of Florence (see next section); several usage examples.
152
153
154 \textsf{UniFiTh} explicitely loads the packages \textsf{xkeyval}, \textsf{etoolbox}, \textsf{geometry}, \textsf{ifxetex}, \textsf{fontspec}, \textsf{fontenc}, \textsf{textcomp}, \textsf{lmodern}, \textsf{caption}, \textsf{graphicx}, \textsf{color}, \textsf{booktabs}, \textsf{amsmath}, \textsf{fancyhdr}.
155 Do \textbf{not} include these packages in the preamble of your document!
156
157
158 \subsection[The problem of the logo]{The problem of the logo}
159 \label{logo_problem}
160
161 I cannot upload the logo of the University of Florence on the TeX Live and MiKTeX repositories because they accept only \href{https://en.wikipedia.org/wiki/Free_software}{\emph{free softwares}}. Therefore, if you have installed \textsf{UniFiTh} by the package manager of your \TeX\ distribution or from CTAN, after the compilation of your thesis file, you will obtain a frontispiece with a white rectangle instead of the University of Florence logo. In the white rectangle you will find the web address to download the logo in pdf format\footnote{The link to download the logo is \url{http://biccari.altervista.org/c/informatica/latex/unifilogo.pdf}}. Save the logo (keeping the name \texttt{unifilogo.pdf}) in the same folder of your main \texttt{.tex} thesis file. Then compile again and everything should be fine.
162
163 Instead, if you have manually downloaded the package from the official web page of \textsf{UniFiTh}, you do not have to do anything.
164
165 \section{Usage}
166
167 A \LaTeX\ document based on \textsf{UniFiTh} can be compiled only by the commands
168 \texttt{pdflatex} and \texttt{xelatex}. In this manual only \texttt{pdflatex} will be considered.
169
170
171 As usual, in order to use this class, you need to call it by
172 \begin{lstlisting}
173 \documentclass[|\textit{\texttt{options}}|]{unifith}
174 \end{lstlisting}
175 You have to specify the class options for your case (see Sec.~\ref{class_options}). Then you have to provide some fundamental information (title, author, etc\ldots) by specific commands in the preamble (see Sec.~\ref{commands_titlepage}). Finally, remember to follow a source code structure similar to those of the examples given in App.~\ref{sec:PhDexample} and~\ref{sec:LaMexample}.
176 Especially the usage of the commands \texttt{\bs frontmatter}, \texttt{\bs mainmatter} and \texttt{\bs backmatter} is mandatory, otherwise the page style of the document will be wrong!
177
178 This class supports, at the moment, two languages: Italian and English. English is the default.
179 If your thesis contains only English or very few paragraphs in another language, do not use the \texttt{babel} package because completely useless. Instead, if you write in Italian, load the \texttt{babel} package with the
180 \texttt{italian} option: \texttt{\bs usepackage[italian]\{babel\}}.
181
182 \subsection{Class options}
183 \label{class_options}
184 The following options can be passed to the \texttt{\bs documentclass} command.
185
186 \begin{description}
187
188 \item[\texttt{a4paper/a5paper/b5paper}] Choose one of these three options to set the paper format. The default value is \texttt{a4paper}.
189 \item[\texttt{layout=\textsl{a5paper/b5paper}}] If, for some reason, it is impossible to print on A5 or B5 directly (printer not supporting those formats, paper not available, ...), it is possible to specify the A5 or B5 layout, maintaining the A4 paper format. In this case some cropmarks will be printed to show where the page should be cut.
190 \item[\texttt{draft}] The usual \texttt{draft} option of the \LaTeX\ Standard Classes.
191 \item[\texttt{oneside}] The usual \texttt{oneside} option of the \LaTeX\ Standard Classes.
192 \item[\texttt{twoside}] (default) The usual \texttt{twoside} option of the \LaTeX\ Standard Classes.
193
194 \item[\texttt{binding=\textsl{length}}] (zero default binding)
195 The value of this option is an offset of the text column.
196 It is useful to take into account the margin for the binding (ask to your bookbinder for information).
197 \item[\texttt{noexaminfo}] Suppress all the final exam informations. Indeed, by default, \textsf{UniFiTh} 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
198 \texttt{\bs examdate\{\dots\}} and \texttt{\bs examiner\{\dots\}} the date and
199 the examiners list are shown.
200 \item[\texttt{nodefaultfont}] Avoid the loading of packages \textsf{fontenc}, \textsf{textcomp} and \textsf{lmodern}.
201 \item[\texttt{romandiff}] See App.~\ref{sec:usefulcommands}.
202 \item[\texttt{fem}] Use the feminine (only Italian): shows ``candidata'' instead of ``candidato''.
203 \end{description}
204
205 \subsection[Commands for the\\ title page]{Commands for the title page}
206 \label{commands_titlepage}
207
208 As usual, the title page is generated by the \texttt{\bs maketitle} command.
209 It needs some information that you can supply by the following commands
210 in the preamble.
211 \begin{description}
212 \item[\texttt{\bs title\{\dots\}}] Mandatory. Title.
213
214 \item[\texttt{\bs subtitle\{\dots\}}] Optional. Subtitle (try to avoid a subtitle). An alias of this coomand is \texttt{\bs alttitle\{\dots\}} (alternative title).
215
216 \item[\texttt{\bs author\{\dots\}}] Mandatory. Author (student's name). See the \texttt{fem} class option described in the previous section.
217
218 \item[\texttt{\bs IDnumber\{\dots\}}] Mandatory. ID number (\textit{matricola} in Italian).
219
220 \item[\texttt{\bs course\{\dots\}}] Mandatory. Use the official Italian name of the course.
221
222 \item[\texttt{\bs cycle\{\dots\}}] Mandatory only for PhD's. Use the form: \texttt{\bs cycle\{XXII\}}
223
224 \item[\texttt{\bs courseorganizer\{\dots\}}] Mandatory. Course organizer (for example Scuola di Scienze Matematiche Fisiche e Naturali). The usual \bs\bs can be use to break the lines.
225
226 \item[\texttt{\bs AcademicYear\{\dots\}}] Academic Year.
227
228 \item[\texttt{\bs advisor\{\dots\}}] You must specify at least one advisor.
229 If you have more than one advisor, put several advisor commands in the correct order:\\
230 \texttt{\bs advisor\{Prof.~Pippo\}} \texttt{\bs advisor\{Dr.~Pluto\}}
231
232 \item[\texttt{\bs coadvisor\{\dots\}}] Optional. Co-advisors of the thesis.
233 Same syntax of the \texttt{\bs advisor} command.
234
235 \item[\texttt{\bs customcoadvisorlabel\{\dots\}}] Optional. Specify the label for co-advisors. It can be used to print ``external advisor'' or similar labels.
236
237 \item[\texttt{\bs director\{\dots\}}] Optional. Director of the PhD program. Head of the Specialization degree. Same syntax of the \texttt{\bs advisor} command.
238
239 \item[\texttt{\bs customdirectorlabel\{\dots\}}] Optional. Specify the label for director.
240
241 \end{description}
242
243 Together with the title page, \unifith\ will also compose an information page just after the title page. See also the \texttt{\bs noexaminfo} class option described in a previous section. Here follow the necessary commands to compose this page.
244 \begin{description}
245 \item[\texttt{\bs examdate\{\dots\}}] Optional. Date of the final exam.\\
246 Example: \texttt{\bs examdate\{16 February 2010\}}.
247
248 \item[\texttt{\bs examiner[\dots]\{\dots\}}] Optional. Specifies the members of the
249 board of examiners of the final exam. Usage similar to \texttt{\bs advisor} command. The optional argument can be used to specify the role of that examiner in the commission.
250
251 \item[\texttt{\bs thesistype\{\dots\}}] Optional. Type of thesis (usually PhD thesis, Master thesis, and so on).
252
253 \item[\texttt{\bs ISBN\{\dots\}}] Optional. ISBN
254
255 \item[\texttt{\bs copyyear\{\dots\}}] Mandatory. Copyright year (usually the
256 graduation year).
257
258 \item[\texttt{\bs copyrightstatement\{\dots\}}] Optional. Specify a copyright statement that will be printed in place of the default one.
259
260 \item[\texttt{\bs versiondate\{\dots\}}] Optional. Date version of the thesis.
261
262 \item[\texttt{\bs website\{\dots\}}] Optional. Thesis website. Automatically
263 hyper-linked if \textsf{hyperref} package is loaded.
264
265 \item[\texttt{\bs authoremail\{\dots\}}] Mandatory. Email of the thesis author.
266 It is automatically hyper-linked if \textsf{hyperref} package is loaded.
267
268 \item[\texttt{\bs reviewer\{\dots\}}] Optional. Reviewers of the thesis (typically this applies to PhD theses only). Same syntax of the \texttt{\bs advisor} command. The list of the reviewer is preceded by the a text which can be specified by the \texttt{\bs reviewerlabel\{\dots\}} command.
269
270
271 \end{description}
272
273
274
275 \subsection[Other commands\\ and environments]{Other commands and environments}
276
277 \begin{description}
278
279 \item[\texttt{\bs dedication\{\dots\}}] A command to compose the dedication.
280
281 \item[\texttt{abstract}] An environment to compose the abstract of your document. This environment has an optional parameter to choose the title of the abstract section.
282 If you use a language for the abstract different from that of the thesis, consider the \texttt{\bs selectlanguage\{\dots\}} command provided by the \texttt{babel} package.
283
284 \item[\texttt{acknowledgments}] An environment to compose the acknowledgments of your document. This environment has an optional parameter to choose the title of the acknowledgments section.
285 If you use a language for the acknowledgments different from that of the thesis, consider the \texttt{\bs selectlanguage\{\dots\}} command provided by the \texttt{babel} package.
286
287
288 \end{description}
289
290 The \textsf{UniFiTh} class defines also the color \texttt{unifiblue} which is the \emph{UniFi blue}: RGB(0,82,147).
291 Example of usage: \texttt{\bs textcolor\{unifiblue\}\{blah blah\}}
292
293
294 \section{Recommendations}
295
296 \begin{itemize}
297
298 \item Do \textbf{not} change the default layout.
299
300 \item Do \textbf{not} load the packages already loaded by \textsf{UniFiTh} (see Sec.~\ref{requirements_installation}).
301
302 \item As you already should know, \LaTeX\ can process only documents
303 in pure ASCII. If you want to insert \emph{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 \texttt{inputenc}. It is always recommended to use UTF-8 character encoding and specify this choice also by the \emph{magic lines} at the beginning of the source code (see the examples in App.~\ref{sec:PhDexample} and~\ref{sec:LaMexample}).
304
305 \item Respect the following thesis structure:
306
307 \begin{itemize}
308 \item Title page (\texttt{\bs maketitle} command)
309 \item Dedication (\texttt{\bs dedication} command)
310 \item Abstract (\texttt{abstract} environment)
311 \item Acknowledgements (\texttt{acknowledgments} environment)
312 \item Table of contents (\texttt{\bs tableofcontens} command)
313 \item Chapters
314 \item Appendices
315 \item Bibliography
316 \end{itemize}
317
318 \item It is recommended to avoid or limit the acknowledgments in a thesis, it
319 is not very professional. The dedication should be enough.
320
321 \item 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.
322
323 \item Usually tables and figures are centered. Remember that, according to the typographic rules, the table captions should be placed \textbf{above} the table, whereas the figure caption should be placed \textbf{below} the figure.
324
325 \item If the figure has a small width, it is possible to put the figure caption
326 aside the figure using the \texttt{sidecap} package (not preloaded by \textsf{UniFiTh}).
327
328 \item Avoid the use of colors unless really necessary. Remember that the figures should be readable even if they are printed in gray scale!
329
330 \item Subscripts and superscripts should be in italic if they represent variable quantities, whereas should be in roman if they are simply labels.
331
332 \item The name of operators should be typed in roman. Example: use $\sin$ (\texttt{\$\bs sin\$}) instead of $sin$ (\texttt{\$sin\$}).
333
334 \item The margin notes are rarely used in scientific documents and should \textbf{not} be used in a scientific thesis.
335
336 \item Do not divide the bibliography per chapter unless it is \textbf{really} necessary.
337 This will save you from wasting a lot of time to prepare your \LaTeX\ source code.
338 Order your bibliography alphabetically according to the
339 first author surname: this order is very useful, contrary to the other typical order, the citation order.
340
341 \end{itemize}
342
343 \clearpage
344 \appendix
345
346 \section{A very brief introduction to the \TeX\ world}
347
348 Many people want to (or are compelled to) write in \LaTeX\ without studying
349 a basic manual. Here follows a very brief introduction to the \TeX\ world.
350
351 \TeX, the document preparation system designed by Donald Knuth in 1978, is a program to typeset documents.
352 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.
353 \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'': \texttt{pdflatex} (the most common), or \texttt{xelatex}, or others.
354
355 The following list of \LaTeX\ manuals, may be especially useful for Italian authors.
356
357 \begin{itemize}
358 \item \href{http://www.lorenzopantieri.net/LaTeX_files/ArteLaTeX.pdf}{\textsc{L.
359 Pantieri \& T. Gordini}, \textit{L'arte di scrivere con} \LaTeX, (2017)}
360
361 \item \href{http://mirror.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}{\textsc{S. Pakin}, \textit{The comprehensive} \LaTeX\ \textit{symbol list}, (2021)}
362
363 \item \href{http://profs.sci.univr.it/~gregorio/breveguida.pdf}{\textsc{E. Gregorio}, \LaTeX\textit{: breve guida ai pacchetti di uso pi\`u comune}, (2010)}
364 \end{itemize}
365
366 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 \emph{packages}, which can be thought as libraries or extensions of \LaTeX. The most famous distributions are \href{http://miktex.org/}{MiKTeX} (available only for Windows), \href{http://www.tug.org/texlive/}{TeX Live} (available both for Windows and Linux) and \href{http://www.tug.org/mactex/2011/}{MacTeX} (available only for Mac OS).
367
368 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:
369 \begin{itemize}
370 \item \href{http://tug.org/texworks/}{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: {\small \url{http://profs.sci.univr.it/~gregorio/introtexworks.pdf}}.
371
372 \item \href{http://texstudio.sourceforge.net/}{TeXstudio} (cross-platform), \href{http://www.xm1math.net/texmaker/}{TeXmaker} (cross-platform), \href{http://pages.uoregon.edu/koch/texshop/}{TeXshop} (only for Mac), \href{http://kile.sourceforge.net/}{Kile} (only for Linux). Powerful editors.
373
374 \item \textbf{Avoid} other editors unless you know what you are doing!
375
376 \end{itemize}
377
378 Finally we explain how to compile the example documents provided in the \textsf{UniFiTh} package. Double click on one of the \texttt{.tex} file in the \texttt{examples} folder.
379 TeXworks should start showing the content of that file.
380 The \texttt{pdflatex} compiler should be automatically selected thanks to the \emph{magic lines} placed at the beginning of the file.
381 Now, in order to compile, press the green button.
382 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 \texttt{\bs label}\,--\,\texttt{\bs ref}\,/\,\texttt{\bs pageref} mechanism).
383
384
385 \clearpage
386 \section{PhD thesis example}
387 \label{sec:PhDexample}
388
389 \begin{lstlisting}
390 % !TeX encoding = UTF-8
391 % !TeX program = pdflatex
392 % !TeX spellcheck = en_US
393
394 \documentclass[binding=0.6cm]{unifith}
395
396 \usepackage{microtype}
397 \usepackage[english]{babel}
398 \usepackage[utf8]{inputenc}
399 \usepackage{hyperref}
400 \hypersetup{pdftitle={My thesis},pdfauthor={Francesco Biccari}}
401
402 \title{My thesis}
403 \alttitle{Optional anternative title (for example different language)}
404 \author{Francesco Biccari}
405 \IDnumber{166350}
406 \course{Corso di Dottorato in Fisica e Astronomia}
407 \courseorganizer{Dipartimento di Fisica e Astronomia}
408 \cycle{Ciclo XXXII}
409 \advisor{Prof. Caio}
410 \advisor{Dr. Sempronio}
411 \AcademicYear{2018/2019}
412
413 \thesistype{PhD thesis}
414 \copyyear{2020}
415 \authoremail{[email protected]}
416
417 \begin{document}
418
419 \frontmatter
420 \maketitle
421 \dedication{Dedicated to\\ Donald Knuth}
422
423 \begin{abstract}
424 This thesis deals with myself.
425 \end{abstract}
426
427 \tableofcontents
428
429 \mainmatter
430 \chapter{Introduction}
431 ...
432
433 \backmatter
434 \cleardoublepage
435 \phantomsection % Give this command only if hyperref is loaded
436 \addcontentsline{toc}{chapter}{\bibname}
437 % Here put the code for the bibliography. You can use BibTeX or
438 % the BibLaTeX package or the simple environment thebibliography.
439 \end{document}
440 \end{lstlisting}
441
442
443 \clearpage
444 \section[Laurea (Magistrale)\\ thesis example]{Laurea (Magistrale) thesis example}
445 \label{sec:LaMexample}
446
447 \begin{lstlisting}
448 % !TeX encoding = UTF-8
449 % !TeX program = pdflatex
450 % !TeX spellcheck = it_IT
451
452 \documentclass[binding=0.6cm]{unifith}
453
454 \usepackage{microtype}
455 \usepackage[italian]{babel}
456 \usepackage[utf8]{inputenc}
457 \usepackage{hyperref}
458 \hypersetup{pdftitle={La mia tesi},pdfauthor={Francesco Biccari}}
459
460 \title{La mia tesi}
461 \alttitle{Titolo alternativo opzionale (tipicamente in inglese)}
462 \author{Francesco Biccari}
463 \IDnumber{166350}
464 \course{Corso di Laurea Magistrale in Fisica e Astronomia}
465 \courseorganizer{Scuola di Scienze Matematiche, Fisiche e Naturali}
466 \advisor{Prof. Caio}
467 \advisor{Dr. Sempronio}
468 \AcademicYear{2018/2019}
469
470 \thesistype{Master thesis}
471 \copyyear{2020}
472 \authoremail{[email protected]}
473
474 \begin{document}
475
476 \frontmatter
477 \maketitle
478 \dedication{Dedicato a\\ Donald Knuth}
479
480 \begin{abstract}
481 Questa tesi parla di me.
482 \end{abstract}
483
484 \tableofcontents
485
486 \mainmatter
487 \chapter{Introduzione}
488 ...
489
490 \backmatter
491 \cleardoublepage
492 \phantomsection % Give this command only if hyperref is loaded
493 \addcontentsline{toc}{chapter}{\bibname}
494 % Here put the code for the bibliography. You can use BibTeX or
495 % the BibLaTeX package or the simple environment thebibliography.
496 \end{document}
497 \end{lstlisting}
498
499
500
501 \clearpage
502 \section{Other useful commands}
503 \label{sec:usefulcommands}
504
505 \begin{description}
506 \item[\texttt{\bs eu}] Napier's number, $\mathrm{e}$, in roman.
507
508 \item[\texttt{\bs iu}] Imaginary unit, $\mathrm{i}$, in roman.
509
510 \item[\texttt{\bs der\{\dots\}\{\dots\}}] Derivative. The first argument represents the function to derive while the second the variables separated by commas. The differential symbol is automatically inserted. Examples:
511 \texttt{\bs der\{f\}\{x\}}, \texttt{\bs der\{f\}\{x,y\}}, \texttt{\bs der\{f\}\{*\{3\}\{x\}\}},
512 \texttt{\bs der\{f\}\{*\{2\}\{x\},*\{2\}\{y\},z\}}.
513
514 \item[\texttt{\bs pder\{\dots\}\{\dots\}}] Partial derivative. Same syntax of the \texttt{\bs der} command.
515
516 \item[\texttt{\bs rb\{\dots\}}] Roman suBscript
517
518 \item[\texttt{\bs rp\{\dots\}}] Roman suPerscript
519
520 \item[\texttt{\bs tb\{\dots\}}] Text suBscript
521
522 \item[\texttt{\bs tp\{\dots\}}] Text suPerscript
523
524 \item[\texttt{\bs un\{\dots\}}] Useful command to typeset measurement units in the correct way, e.g. \texttt{25\bs un\{m/s\}},
525 \texttt{13\bs un\{kg\bs ,cm\^{}\{-3\}\}}. It can be used both inside or outside the math environment.
526 For heavy usage of measurement units and to insert numbers in the form
527 \texttt{1.4e-5}, the package \textsf{siunitx} is recommended.
528
529 \item[\texttt{\bs mnote\{\dots\}}] Fancy margin notes
530
531 \item[\texttt{\bs g}] Shortcut for the \texttt{\bs degree} command. Example: \texttt{45\bs g} produces 45\g.
532
533 \item[\texttt{\bs C}] Shortcut for the \texttt{\bs celsius} command. Example: \texttt{37\bs ,\bs C} produces 37\,\C.\footnote{Not available in math mode compiling with \texttt{xelatex}.}
534
535 \item[\texttt{\bs A}] Angstrom. Example: \texttt{10\bs ,\bs A} produces 10\,\A.\footnote{Remember that the angstrom unit of measurement should not be used.}
536
537 \item[\texttt{\bs micro}] Micro prefix. Example: \texttt{7\bs ,\bs micro m} produces 7\,\micro m.
538
539 \item[\texttt{\bs ohm}] Ohm. Example: \texttt{100\bs ,\bs ohm} produces 100\,\ohm.
540
541 \item[\texttt{\bs di}] Differential symbol with automatic spacing. Example:
542 \texttt{\$\bs int x \bs di x\$} produces $\int x \di x$. If you prefer the differential symbol in roman ($\mathrm{d}$) you can give the option \texttt{romandiff} in the document class options.
543
544 \item[\texttt{\bs x}] Shortcut for the \texttt{\bs times} command. E.g.: \texttt{\$7 \bs x 10\^{}5\$} produces $7 \times 10^5$.
545
546 \end{description}
547
548
549 \clearpage
550 \section{Frequently Asked Questions}
551
552 \subsection{How can I increase the font size?}
553
554 The default font used in \unifith\ is Latin Modern. The default font size is 11\,pt using A4 and 10\,pt using A5 and B5. At the moment it is impossible to change the font size unless you modify the \unifith\ class file (\texttt{unifith.cls}). The reason for this choice is to maintain a common format for all the theses.
555
556
557 \subsection{How can I increase the line-spacing?}
558
559 The line-spacing in typography is defined as the distance between two lines. A strange ``tradition'' in Italy is to write the thesis with a double line-spacing. This is an incredibly large number. The lines are so separated that the effect is very ugly. Two reasons are behind this choice. The first one is that a lot of space is available for your professor to comment your text. The second one is that, in this way, the thesis is thicker.
560
561 This effect is amplified when you use Microsoft Word because Word defines the line-spacing in a different way with respect to the typical definition. And usually people do not know that. Therefore, when you set the value of 2 for the line-spacing in Word, actually you obtain a line-spacing of 2.34 according to the normal definition of the term! (Word adds an extra 17\% of space, I do not know why).
562
563 Of course this large value of the line-spacing is a nonsense. It is known in typography that the best value ranges between 1.20 and 1.45. In \LaTeX\ the default line-spacing is 1.20, which means that, if you use a font size of 10\,pt, the line-spacing is 12\,pt. In \unifith\ the line-spacing is set to 1.20. Nowadays, professors typically correct a thesis by using the comment tools of the their pdf viewer. There are still some who want to print it and want a double line-spacing. In that case, give them a copy with a double line-spacing but ask them to have the permission to print it in a more normal line-spacing, in order to save paper.
564
565 If you want to change the line-spacing, do not use the \texttt{\bs linespread} command. Load instead the \textsf{setspace} package and use, for example, the \texttt{\bs onehalfspacing} command.
566
567
568
569 \subsection{Single sided or double sided printing?}
570
571 A strange ``tradition'' in Italy is to print the theses only on one side of the paper sheets. In the past this was justified because a thesis was manually typed by a \href{https://en.wikipedia.org/wiki/Typewriter}{typewriter machine}.
572 Today, where the theses are all composed by a computer, this ``tradition'' is kept mainly because in this way the professors and the students are happy to see a thicker book.
573
574 Of course this is a nonsense. Not only because the bulky effect is only aesthetic (if you open the thesis you can see that only one side is printed), but especially because it is a waste of paper. Moreover, reading a book where only the right page is printed is quite ugly and strange, isn't it? (Have you ever seen a book, containing mainly text, printed single sided?)
575
576 The only real reason to print single sided is when a good paper is not available. Indeed, a low quality paper, like the one typically used for photocopies, has a grammage of 80\,g/m$^2$. It is a little bit semitransparent and this can be a problem when you print double sided, especially if you have many color images. The best approach is using a proper paper grammage of 90\,g/m$^2$ or 100\,g/m$^2$. Ask to the printing service which type of paper is more suitable to print your thesis double sided.
577
578
579 \subsection{Inverted margins? How much space for binding?}
580
581 Another typical question regards the margins of the thesis. Quite often the students (and incredibly also the printing services) complain about the margins of the thesis. They think that the margins are reversed because in \LaTeX\ standard classes, by default, the inner margin is smaller than the outer margin. The same behaviour, but with slightly different proportions, is adopted in \unifith\ (see Figure\,\ref{layout}). Of course, they are wrong. This is the correct behavior! Indeed, as you can see in any book, the sum of the two inner margins should be more or less equal to the width of a single outer margin. This is for an aesthetic reason. Otherwise the two columns of text would be too much separated when the book is open.
582
583 \begin{figure}[!b]
584 \centering
585 \setlength{\unitlength}{0.12mm}
586 \begin{picture}(420,297)(-210,0)
587 \polyline(-210,0)(210,0)(210,297)(-210,297)(-210,0)
588 \Line(0,0)(0,297)
589 \put(27.05,37.4){\polygon(0,0)(139.2,0)(139.2,223.8)(0,223.8)}
590 \put(-27.05,37.4){\polygon(0,0)(-139.2,0)(-139.2,223.8)(0,223.8)}
591 \put(27.05,268.16){\polygon(0,0)(139.2,0)(139.2,4.22)(0,4.22)}
592 \put(-27.05,268.16){\polygon(0,0)(-139.2,0)(-139.2,4.22)(0,4.22)}
593 \end{picture}
594 \caption{A4 page layout scheme of \textsf{UniFiTh} class using a zero binding margin.}
595 \label{layout}
596 \end{figure}
597
598
599 At this point the students usually reply ``what about the binding margin? The inner margin should be larger because some space is used by the binding process!'' This is partially true. The effect described above in Figure\,\ref{layout} is what should happen \emph{after} the binding process. For this reason there is the documentclass \texttt{binding} option in \unifith\ (see Section\,\ref{class_options}). Typical values are 6 or 7\,mm but it is always preferable to ask the printing service which is the correct value according to the binding method (be careful because many printing services are not professional and suggest arbitrarly binding margin values).
600
601 \subsection{Numbered introduction and conclusions?}
602
603 There is a strange ``tradition'' in Italy to not attribute a number to the Introduction and Conclusions of a thesis. Probably, only because they are usually short chapters. So it seems that they do not deserve a proper number like any other chapter.
604
605 In my (and not only mine) opinion this is a nonsense. The Introduction and Conclusions chapters are part of the thesis, and they should be read to properly understand the thesis. They cannot be skipped. So why don't attribute a number to those chapters?
606
607 Therefore I suggest to use the following structure of the thesis (which is the same reported in the examples in Appendix \ref{sec:PhDexample} and \ref{sec:LaMexample}).
608
609 \begin{lstlisting}
610 ...
611
612 \frontmatter
613 \maketitle
614 ...
615
616 % The chapters after the mainmatter command are numbered
617 \mainmatter
618 \chapter{Introduction}
619 \chapter{...}
620 \chapter{...}
621 \chapter{...}
622 \chapter{Conclusions}
623
624 \backmatter
625 ...
626 \end{lstlisting}
627
628 However, if you really want to follow the nonsense of not giving a number to the Introduction and Conclusions chapter, you can do it in the following way. But keep in mind that \emph{if you do not number the Introduction and Conclusions, you cannot insert any numbered equation, table, or picture in these chapters}. Indeed, all these objects are numbered with the chapter number: Fig.\,1.2, Tab.\,3.2, Eq.\,(4.1), etc. If the chapter does not have a number, how can we assign a number to Figures, Tables, or Equations?
629
630 \begin{lstlisting}
631 ...
632
633 \frontmatter
634 \maketitle
635
636 % The chapters after the mainmatter command are numbered
637 \mainmatter
638 \chapter*{Introduction} % The chapter* does not attribute a number
639 \markboth{Introduction}{} % This command is necessary for the headings
640 \chapter{...}
641 \chapter{...}
642 \chapter{...}
643 \chapter*{Conclusions} % The chapter* does not attribute a number
644 \markboth{Conclusions}{} % This command is necessary for the headings
645
646 \backmatter
647 ...
648 \end{lstlisting}
649
650 Finally, it is worth noting that the first and last chapter of a thesis must not to be always called Introduction and Conclusions!
651
652 \subsection{How to reduce the size of the pdf?}
653
654 Usually, students do not optimize the images of their thesis. This is a very bad practice and one of the typical consequences is the excessive large size of the final pdf. The topic is too long to be covered here, however I want to provide a simple way to reduce \textit{a posteriori} the file size of the pdf.
655
656 Using \href{https://www.ghostscript.com/}{Ghostscript} we can ``distill'' a pdf file, which means interpreting it and re-enconding it again. This is just a small list of possible commands (commands are intended for Windows 64 bit but they can easily applied to other operating systems changing the name of the Ghostscript executable):
657
658 \begin{lstlisting}
659 BEST QUALITY (Flate image encoding)
660
661 gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
662 -dAutoFilterColorImages=false -dAutoFilterGrayImages=false
663 -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode
664 -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.5 input.pdf
665 \end{lstlisting}
666
667 \begin{lstlisting}
668 BEST QUALITY (DECT image encoding)
669
670 gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
671 -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.5 input.pdf
672 \end{lstlisting}
673
674 \begin{lstlisting}
675 LOWER QUALITY (DECT image encoding)
676 Substitute XXXXXXX with one of the following settings (order of descending quality):
677 /printer /ebook /screen
678
679 gswin64c.exe -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
680 -dPDFSETTINGS=XXXXXXX -dCompatibilityLevel=1.5 input.pdf
681 \end{lstlisting}
682
683 \subsection{How to create an archivable pdf?}
684
685 \href{https://en.wikipedia.org/wiki/PDF/A}{PDF/A} is a particular PDF format, standardized by ISO, specialized for use in the archiving and long-term preservation of electronic documents. Public and private institutions, including universities, increasingly require this form to archive electronic documents. There are several levels of PDF/A. The suggested format for a thesis is the PDF/A-2b.
686
687 The best and free way to check if a pdf file is compliant to one of the PDF/A levels is to use \href{https://verapdf.org/}{veraPDF}, an open source software supported by the most important PDF associations in the world and funded by the European Commission. This software is freely available for Windows, Linux, and Mac.
688
689 A PDF/A file can be generated directly in \LaTeX, properly following some rules (see TOPTesi \LaTeX\ class documentation by Claudio Beccari) however we do not have enough space to cover this topic here.
690
691 A faster way is to transform the file of the thesis in a PDF/A compliant pdf file using \href{https://www.ghostscript.com/}{Ghostscript}. First of all you need to copy two files in the same directory of the pdf file you want to convert. One file is an ICC color profile and the other one is a PostScript definition file containing some information needed by the convertion process. Let us start from the ICC color profile. Since the pdf file will be viewed mainly on electronic screen, you can use a generic sRGB color profile. You can download one here: \url{https://www.color.org/srgbprofiles.xalter}. The PostScript definition file, already prepared for PDF/A file generation, can be found in the Ghostscript directory in your system (typically in the lib subfolder). Once copied (and RENAMED!) in your working directory, open it and modify the /ICCProfile variable, matching the name of the ICC color profile you downloaded, and the /Title variable, matching (reasonably) the title of your pdf.
692
693 Then, launch the following command:
694
695 \begin{lstlisting}
696 gswin64.exe -q -dNOPAUSE -dBATCH -dNOSAFER -sDEVICE=pdfwrite -sOutputFile=output.pdf
697 -dPDFA=2 -dPDFACompatibilityPolicy=1
698 -sColorConversionStrategy=UseDeviceIndependentColor -sProcessColorModel=DeviceRGB
699 PDFArenamed.ps input.pdf
700 \end{lstlisting}
701
702
703
704
705 %\subsection{Cover}
706 %
707 %In order to help the student to prepare the cover for the printing service, \unifith\ provides a class option \texttt{cover}. When this option is used, the thesis is not compiled, but the cover is generated as a single page pdf. This file is usually provided to the printing service to prepare the cover for the thesis. Of course the students can use their own cover or the cover provided by the printing services.
708
709
710 \addtocontents{toc}{\protect\end{multicols}}
711 \end{document}