-
Notifications
You must be signed in to change notification settings - Fork 0
/
thesis.tex
237 lines (196 loc) · 5.79 KB
/
thesis.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
230
231
232
233
234
235
236
237
\newif\ifelectronic
\electronictrue
\documentclass[12pt, a4paper]{report}
\usepackage[table]{xcolor} %warning: put before tikz
\definecolor{lightgray}{gray}{0.9}
\usepackage{xparse}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains,positioning,calc,matrix,backgrounds,trees}
\usepackage[noend]{algpseudocode}
\usepackage{afterpage}
\usepackage{pdflscape} % horizontal pages
\usepackage{array} % control the size of columns in tables
% \usepackage{rotating} % tables
\usepackage[Algoritmo]{algorithm}
\usepackage{nth}
\usepackage[spanish, es-tabla]{babel}
\addto\captionsspanish{%
\renewcommand{\bibname}{Referencias} % change bibliografía by referencias
}
\usepackage[utf8x]{inputenc}
\usepackage[obeyspaces]{url}
\usepackage{graphicx,latexsym,amssymb}
\usepackage[font=scriptsize]{subfig}
\usepackage[font=footnotesize, figurename=FIGURA]{caption}
\usepackage{pdfpages} % include external files
\usepackage{enumerate}
%\usepackage{times}
%\usepackage{biblatex} \addbibresource{thesis.bib}
\usepackage[sc]{titlesec}
\usepackage{titletoc}
\usepackage{setspace}
\onehalfspacing %space between lines
\usepackage[hang]{footmisc}
\setlength{\footnotemargin}{5mm}
\renewcommand{\thefootnote}{\textbf{\arabic{footnote}}}
% \usepackage{todonotes}
\usepackage{multirow} % combine cells in tabular environment
\usepackage{amsmath} % multiline equation, split
%\usepackage{minted} % fancy code hightlighting as Pygments
% \usemintedstyle{murphy}
% \renewcommand{\theFancyVerbLine}{
% \sffamily\textcolor[rgb]{0.1,0.1,0.1}{\scriptsize\arabic{FancyVerbLine}}
% }
% \usepackage[none]{hyphenat} % problems with hyphenation
% rules of code
\usepackage{listings}
\lstset{
language=Matlab,
basicstyle={\small\ttfamily},
stringstyle=\color{gray},
keywordstyle=\color{blue},
numberstyle=\color{blue},
numbers=left,
frame=single,
% rulesepcolor=\color{gray},
showstringspaces=false
}
% change the format of title chapters --> titlesec package
\titleformat{\chapter}[hang]
{\selectfont\huge}
{\chaptertitlename\ \Roman{chapter}.}
{20pt}{\huge}
% less space before chapter titles
\titlespacing*{\chapter}{0pt}{-50pt}{40pt}
% change the format of subsubsection --> titlesec package
\titleformat{\subsubsection}[runin]
{\normalfont\bfseries}
{\thesubsubsection}
{1em}{}
% less space before section, subsection and subsubsection titles
% {before}{above}{after}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{5pt}
% change the format of table of contents --> titletoc
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand\thesection{\arabic{chapter}.\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\titlecontents{chapter}
[0pt]
{\addvspace{1pt}} % space above the title
{\chaptertitlename\ {\thecontentslabel}. }
{}
{} % title ........... page X
[\addvspace{1pt}] % space below the title
% configure links
\usepackage[pagebackref]{hyperref}
\hypersetup{
colorlinks,
citecolor = blue,
pdfborder = {0 0 0}, % this solution is temporal
}
\usepackage{bookmark}
% backreferences
\usepackage{backref}
\renewcommand*{\backreflastsep}{ y~}
\renewcommand*{\backreftwosep}{ y~}
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{%
\ifcase #1 %
\relax % or 'No citations'
\or
(página #2). % page
\else
(páginas #2). % pages
\fi
}
\renewcommand*{\backrefentrycount}[2]{%
#1%
\ifnum#2>1 %
(#2)b %
\fi
}
% change padding columns in tables
\renewcommand{\tabcolsep}{3.5mm}
% change padding rows in tables
\renewcommand{\arraystretch}{1.5}
\renewcommand{\familydefault}{\sfdefault}
% hack backref for 'precise' backreference (problems with double reference)
% \input{hackbackref.tex}
% title page
\input{front.tex}
\begin{document}
% front page
\pagestyle{plain}
\titlePage
\newpage
\pagenumbering{roman}
\setcounter{page}{1}
\thispagestyle{empty}
% stupid burocracy files
\pdfbookmark[0]{Files}{Institutional files}
\newpage
\includepdf{jcanul.pdf}
\newpage
\includepdf{gsantos.pdf}
\newpage
\includepdf{changename.pdf}
\newpage
\includepdf{signs.pdf}
\newpage
\includepdf{auth.pdf}
\newpage
\includepdf{rights.pdf}
%\newpage
%\thispagestyle{empty}
%\mbox{}
% dedicatoria y agradecimientos
\input{chapters/thanks.tex}
\ifelectronic
%\newgeometry{twoside, vmargin={2.5cm, 2.5cm}, hmargin={3.2cm, 1.8cm}}
\newgeometry{vmargin={2.5cm, 2.5cm}, hmargin={3.1cm, 1.9cm}} %oneside
\else
\newgeometry{vmargin={2.5cm, 2.5cm}, hmargin={2.5cm, 2.5cm}}
\fi
% table of contents
\begingroup
\newpage
\pdfbookmark[0]{Contenido}{Contenido}
\hypersetup{linkcolor = black}
\tableofcontents
\endgroup
% change the format of figure numeration
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\begingroup
\newpage
\pdfbookmark[0]{Figuras}{Figuras}
\hypersetup{linkcolor = black}
\listoffigures
\endgroup
% change the format of table numeration
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\begingroup
\newpage
\pdfbookmark[0]{Tablas}{Tablas}
\hypersetup{linkcolor = black}
\listoftables
\endgroup
% change the format of equation numeration
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
% space between paragraphs
\setlength{\parskip}{\baselineskip}
\input{chapters/summary.tex}
% content
% \input{chapters/introduction.tex}
\input{chapters/generalities.tex}
\input{chapters/conceptualframework.tex}
\input{chapters/development.tex}
\input{chapters/results.tex}
\input{chapters/conclusions.tex}
% bibliography APA style
\bibliographystyle{apalike}
%\bibliographystyle{ieeetr}
\bibliography{thesis}
%\printbibliography
\end{document}