/
report.tex
229 lines (185 loc) · 7 KB
/
report.tex
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
% !TeX encoding = UTF-8 Unicode
%% !TeX TS-program = make all
% !TeX TS-program = pdflatex
% !TeX root = report.tex
% !TeX spellcheck = en-GB
% !BIB program = bibtex
% MIT License - Copyright (c) 2021 Sergio Martínez-Losa
%
% IT IS MANDATORY TO HAVE TEX LIVE 2019 DISTRIBUTION INSTALLED TO COMPILE THIS TEMPLATE
%
%\documentclass[11pt,letterpaper,openright,spanish,english]{extbook}
\documentclass[11pt,a4paper,spanish,english]{book}
%\documentclass[11pt,a4paper,spanish,english]{book-unizar}
%\documentclass[11pt,a4paper,openright,spanish,english]{book}
\input{utils/super_macro}
%\SetInputPaths{%
% {./}%
% {./utils/}%
% {./utils/covers/}%
% {./chapters/}%
% {./packages/}%
%}
% Set whether twoside enable of not (true or false), by default twoside
%\twosidelayout[true] % select twoside layout
%\twosidelayout[false] % select oneside layout
\twosidelayout % default twoside layout active
%\onesidelayout % equivalent to \twosidelayout[false]
\checkforceprintable
\input{utils/imports}
\input{utils/macros}
\input{utils/mute_warnings}
\showtodos{true}
%\setstretch{1.0}
% Show or hide watermark by calling \showwatermark{true} or \preliminary{true} both are equals
%\showwatermark{true}
%\preliminary{false}
% NECESSARY TITLE & AUTHOR
\title{\THETITLE}
\author{\THEAUTHOR}
\makeindex
\setglossarystyle{betterglossary}
\makeglossaries
\input{chapters/glossary}
\iffilepublications
\newcites{publications}{\listofpublicationsname\protect\thispagestyle{phdfancyempty}} % multibib bibliography section
\fi
\begin{document}
\thispagestyle{empty}
\pagenumbering{alph}
\setcounter{page}{-1}
% supress page numbering
%\pagenumbering{gobble}
% insert cover
% other fancy cover: https://tex.stackexchange.com/questions/475597/how-to-create-a-cover-page-like-this
% https://latexdraw.com/how-to-create-a-beautiful-cover-page-in-latex-using-tikz/
\begin{titlepage}
\pagestyle{empty}
\protect\thispagestyle{empty}
\ifx\printableimages\trueValue
\input{utils/cover_bw}
\else
% \input{utils/cover_colour}
\input{utils/cover_colour_alternative_rainbow}
% \input{utils/cover_colour_blue}
% \input{utils/cover_colour_blue_hexa}
% \input{utils/cover_colour_tschichold}
% \input{utils/cover_colour_tschichold_blue}
\fi
\end{titlepage}
\frontmatter % apply TOC styles frontmatter
\pagenumbering{Roman}
\renewcommand{\contentsname}{Contents}
\SetHeaderTitle{\MakeUppercase{\contentsname}}
\protect\addtocontents{toc}{~\hfill\textbf{Page}\par\protect\thispagestyle{phdfancyempty}}
\protect\pagestyle{phdfancyspecialempty}
\ifexpandsubsublevel
\setcounter{secnumdepth}{4} % numbering depth for section levels
\else
\setcounter{secnumdepth}{2} % numbering depth for section levels
\fi
\tableofcontents
\clearpage
% https://tex.stackexchange.com/questions/48509/insert-list-of-figures-in-the-table-of-contents
\renewcommand{\listfigurename}{List of Figures}
\renewcommand{\figurename}{Figure}
\SetHeaderTitle{\MakeUppercase{\listfigurename}}
\protect\addtocontents{lof}{~\hfill\textbf{Page}\par\protect\thispagestyle{phdfancyempty}\vspace{0.4cm}}
\phantomsection\addcontentsline{toc}{chapter}{\listfigurename}
\protect\pagestyle{phdfancyspecialempty}\listoffigures
\clearpage
\renewcommand{\listtablename}{List of Tables}
\renewcommand{\tablename}{Table}
\SetHeaderTitle{\MakeUppercase{\listtablename}}
\protect\addtocontents{lot}{~\hfill\textbf{Page}\par\protect\thispagestyle{phdfancyempty}\vspace{0.4cm}}
\phantomsection\addcontentsline{toc}{chapter}{\listtablename}
\protect\pagestyle{phdfancyspecialempty}\listoftables
\clearpage
% Custom section - list of equations
\renewcommand{\listequationsname}{List of Equations}
\renewcommand{\equationname}{Equation}
\renewcommand{\equationpagetext}{Page}
\SetHeaderTitle{\MakeUppercase{\listequationsname}}
\protect\thispagestyle{phdfancyempty}
\phantomsection\addcontentsline{toc}{chapter}{\listequationsname}
\protect\pagestyle{phdfancyspecialempty}\listofequations
\clearpage
% show glossary items
\SetHeaderTitle{\MakeUppercase{\glossaryname}}
\phantomsection\addcontentsline{toc}{chapter}{\glossaryname}
\printglossary[title={\vspace{-1.5cm}\protect\raggedright\glossaryname}]\protect\pagestyle{phdfancyspecialempty}
\clearpage
% report declaration of authenticity
% #1 declaration without page numbers and without page number in TOC or declaration with page numers and page number in TOC
% #2 show or not to show in TOC
\inputdeclaration[true][true]
%% start abstract section
% #1 show page number or not
% #2 show or hide rule below title
% #3 show in TOC or not
% #4 input text file
\renewcommand{\abstractname}{Abstract}
\inputabstract[true][showrule]{true}{chapters/abstract}
%% end abstract section
% Acknowledgements and dedications
%\input{utils/dedications}
\mainmatter % apply TOC styles mainmatter
\begin{startpagenumbering}[1]
% \setstretch{1.5}
% \linespread{1.5}
\input{chapters/00_introduction}
\input{chapters/01_first_chapter}
% \tocclearpage
\end{startpagenumbering}
\backmatter % apply TOC styles backmatter
%\forcestylebackmatter
%\ContinuePaginingWithNumbering[Roman]
%% APPENDIX
% https://tex.stackexchange.com/questions/183185/roman-numeral-of-defined-counter
\newcounter{appendixcounter} % initialized to 0 by default
\newcommand{\Romanappendixcounter}{\Roman{appendixcounter}}
\newcommand{\stepappendixcounter}{\stepcounter{appendixcounter}}
%
%% Custom section - Appendix I - Script sample file
\stepappendixcounter
\def\FirstAppendixTitleTopLine{Appendix~\Romanappendixcounter}
\def\FirstAppendixTitleBottomLine{Title Appendix}
\def\FullAppendixFirstOneTitle{\FirstAppendixTitleTopLine~-~\FirstAppendixTitleBottomLine}
\SetHeaderTitle{\FullAppendixFirstOneTitle}
\phantomsection\addcontentsline{toc}{chapter}{\FullAppendixFirstOneTitle\itshape}
\protect\pagestyle{phdfancyspecialappendix}
%\protect\thispagestyle{phdfancyspecialappendixmain}
%\protect\thispagestyle{phdfancyplain}
\input{chapters/appendix_i}
%\protect\thispagestyle{phdfancyspecialappendixmain}
\clearpage
% Custom section - Epilogue
\def\epilogueTitle{Epilogue}
\SetHeaderTitle{\MakeUppercase{\epilogueTitle}}
\phantomsection\addcontentsline{toc}{chapter}{\epilogueTitle}
\protect\pagestyle{phdfancyspecialempty}\input{utils/epilogue}
\clearpage
% Bibliography
\SetTitleBibliography{Bibliography}
\SetHeaderTitle{\MakeUppercase{\bibname}}
%\protect\bibliographystyle{./packages/ieeetr-redux} % default bibliography style
\protect\bibliographystyle{unsrt}
%\protect\bibliographystyle{apalike}
\bibliography{./utils/report-bib}
\nocite{SergioTemplateLatex2021}
\protect\pagestyle{phdfancyspecialempty}
\addcontentsline{toc}{chapter}{\bibname}
\clearpage
% List of publications
\iffilepublications
\renewcommand{\listofpublicationsname}{List of Publications}
\SetHeaderTitle{\MakeUppercase{\listofpublicationsname}}
\phantomsection\addcontentsline{toc}{chapter}{\listofpublicationsname}
\protect\pagestyle{phdfancyspecialempty}
\nocitepublications{*}
% \protect\bibliographystylepublications{./packages/ieeetr-redux}
\protect\bibliographystylepublications{unsrt}
\bibliographypublications{./utils/publications}
\clearpage
\fi
\end{document}