generated from unibo-disi-cesena/thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisi-thesis.sty
135 lines (119 loc) · 3.68 KB
/
disi-thesis.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\usepackage[italian]{babel}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage[italian]{cleveref}
\usepackage{geometry}
\usepackage{titling}
\usepackage[inline]{enumitem}
\usepackage{setspace}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[RE,LO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\footrulewidth}{1pt}
}
\fancypagestyle{fancy}{
\fancyhf{}
\fancyhead[CE,CO]{\rightmark}
\fancyfoot[RE,LO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\setlength{\headheight}{14.49998pt}
\addtolength{\topmargin}{-2.49998pt}
}
\pagestyle{fancy}
\newcommand{\acknowledgementsname}{Acknowledgements}
\newcommand{\school}[1]{\def\theschool{#1}}
\newcommand{\programme}[1]{\def\theprogramme{#1}}
\newcommand{\subject}[1]{\def\thesubject{#1}}
\newcommand{\cosupervisor}[1]{\def\thecosupervisor{#1}}
\newcommand{\morecosupervisor}[1]{\def\themorecosupervisor{#1}}
\newcommand{\supervisor}[1]{\def\thesupervisor{#1}}
\newcommand{\session}[1]{\def\thesession{#1}}
\newcommand{\academicyear}[1]{\def\theacademicyear{#1}}
\newenvironment{abstract}{\chapter*{\centering\abstractname}\addcontentsline{toc}{chapter}{\abstractname}}{}
\newenvironment{acknowledgements}{\chapter*{\acknowledgementsname}}{}
\newenvironment{dedication}{\chapter*{}\begin{flushright}\itshape}{\normalfont\end{flushright}}
\newenvironment{inlinelist}{\begin{enumerate*}[label=\emph{(\roman{*})}]}{\end{enumerate*}}
\newcommand{\chapterWithoutNumber}[1]{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
\let\oldbibliography\bibliography
\renewcommand{\bibliography}[1]{
\addcontentsline{toc}{part}{}
\addcontentsline{toc}{chapter}{\bibname}
\oldbibliography{#1}
}
\def\themainlinespacing{1}
\newcommand{\mainlinespacing}[1]{\def\themainlinespacing{#1}}
\let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{
\oldmainmatter
% \onehalfspacing % https://tex.stackexchange.com/questions/30073/why-is-the-linespread-factor-as-it-is
\setstretch{\themainlinespacing}
}
\newcommand{\frontispiece}{
\newgeometry{margin=0.8in}
\begin{titlepage}
\centering
\large
\textbf{\theschool}
\\
\noindent\hrulefill
\vspace{0.4cm}
\Large
\theprogramme
\Huge
\vspace{4cm}
\textbf{
\thetitle
}
\large
\vspace{1cm}
Tesi di laurea in:
\\
\textsc{\thesubject}
\vspace{4cm}
%
\begin{minipage}[t]{0.64\textwidth}
\begin{flushleft}
\textit{Relatore}
\\
\textbf{\thesupervisor}
\\
\vspace{0.4cm}
\ifdefined\thecosupervisor
\ifdefined\themorecosupervisor
\textit{Correlatori}
\\
\textbf{\thecosupervisor}
\\
\textbf{\themorecosupervisor}
\else
\textit{Correlatore}
\\
\textbf{\thecosupervisor}
\fi
\fi
\end{flushleft}
\end{minipage}
%
\begin{minipage}[t]{0.34\textwidth}
\begin{flushright}
\textit{Candidato}
\\
\textbf{\theauthor}
\end{flushright}
\end{minipage}
\\
\vfill
\noindent\hrulefill
\vspace{0.3cm}
\Large
\thesession{} Sessione di Laurea
\\
Anno Accademico \theacademicyear
\end{titlepage}
\restoregeometry
}