-
Notifications
You must be signed in to change notification settings - Fork 2
/
imunam-tesis.sty
217 lines (176 loc) · 5.23 KB
/
imunam-tesis.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
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
\NeedsTeXFormat{LaTeX2e}[25/08/2014 Geri Ochoa]
\ProvidesPackage{imunam-tesis}
\RequirePackage{xcolor}
\definecolor{orounam}{HTML}{CC9933}
\definecolor{azulunam}{HTML}{13406F}
\newcommand{\enlaces}{
\PassOptionsToPackage{draft}{hyperref}
}
\DeclareOption{enlaces}{
\renewcommand{\enlaces}{
\PassOptionsToPackage{
colorlinks=true,
linkcolor=azulunam,
urlcolor=orounam,
pdftitle=Tesis UNAM,
pdfauthor=Gerino,
bookmarks=true,
bookmarksopen=true,
}{hyperref}
}
}
\ProcessOptions\relax
\enlaces
\RequirePackage{hyperref}
\RequirePackage{import}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{xstring}
\RequirePackage{graphicx}
\RequirePackage[spanish]{todonotes}
\RequirePackage{fancyhdr}
\RequirePackage{geometry}
\RequirePackage{imakeidx}
\makeindex
% Encabezado y pie de paginas personalizados
\fancypagestyle{principal}{
\fancyhf{}
\fancyhead[LO]{\scriptsize \leftmark}
\fancyhead[RE]{\scriptsize \rightmark}
\fancyfoot[LE,RO]{\scriptsize \thepage}
\fancyfoot[LO,RE]{\includegraphics[height=4ex]{img/IM_gris.pdf}}
}
% Página de dedicatoria
\newcommand{\dedicatoria}[1]{%
\topskip0pt
\vspace*{\fill}
\begin{flushright}
\textit{#1}
\end{flushright}
\vspace*{\fill}
\cleardoublepage%
}
% Estilos para teoremas, corolarios, lemas y pruebas
\newtheorem{teorema}{Teorema}[chapter]
\newtheorem{corolario}[teorema]{Corolario}
\newtheorem{lema}[teorema]{Lema}
\newenvironment{prueba}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item[\hskip\labelsep
\itshape
#1\@addpunct{.}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\newcommand{\caja}[1]{\begin{center} \vspace{\abovedisplayskip} \mbox{#1}
\vspace{\abovedisplayskip} \end{center}}
\theoremstyle{definition}
\newtheorem{definicion}[teorema]{Definición}
\theoremstyle{remark}
\newtheorem{ejemplo}{Ejemplo}[teorema]
\newtheorem{observacion}[teorema]{Observación}
\newcommand{\pendiente}[1]{\textbf{\textcolor{red}{PENDIENTE: (#1)}}}
\newcommand{\figurapendiente}{\missingfigure}
\newcommand{\importante}[1]
{\IfSubStr{#1}{!}
{\index{#1}\emph{\textbf{\StrBefore{#1}{!}~\StrBehind{#1}{!}}}\kern-1pt}
{\index{#1}\emph{\textbf{#1}}\index{#1}\kern-1pt}
}
\newcommand\restr[2]{{ % we make the whole thing an ordinary symbol
\left.\kern-\nulldelimiterspace % automatically resize the bar with \right
#1 % the function
\vphantom{\big|} % pretend it's a little taller at normal size
\right|_{#2} % this is the delimiter
}}
\newcommand{\mb}{\mathbb}
\newcommand{\sing}{\mathrm{Sing\,}}
\newcommand{\mcd}{\mathrm{MCD}}
\newcommand{\bif}{\mathrm{Bif\,}}
\def\thickhrule{\leavevmode \leaders \hrule height 1.5pt \hfill \kern \z@}
\def\position{\centering}
%% Note the difference between the commands this one is
%% make and the other one is makes
\renewcommand{\@makechapterhead}[1]{%
\vspace*{10\p@}%
{\parindent \z@ \position \reset@font
\vspace*{10\p@}%
\interlinepenalty\@M
{\color{gray!30!}\thickhrule}
\par\nobreak
\vspace*{2\p@}%
{\raggedleft \huge \scshape \textcolor{gray!60!}{\thechapter}~ #1\par\nobreak}
\par\nobreak
\vspace*{2\p@}%
{\color{gray!30!}\thickhrule}
\vskip 40\p@
\vskip 50\p@
}}
%% This uses makes
\def\@makeschapterhead#1{%
\vspace*{10\p@}%
{\parindent \z@ \position \reset@font
\vspace*{10\p@}%
\interlinepenalty\@M
{\color{gray!30!}\thickhrule}
\par\nobreak
\vspace*{2\p@}%
{\raggedleft \huge \scshape #1\par\nobreak}
\par\nobreak
\vspace*{2\p@}%
{\color{gray!30!}\thickhrule}
\vskip 50\p@
}}
\def\eltitutlo{}
\def\elnombre{}
\def\eldirector{}
\def\lainstitucion{}
\def\lafecha{}
\define@key{alumnoinfo}{nombre}{\def\elnombre{#1}}
\define@key{alumnoinfo}{grado}{\def\elgrado{#1}}
\define@key{tutorinfo}{nombre}{\def\eldirector{#1}}
\define@key{tutorinfo}{institucion}{\def\lainstitucion{#1}}
\define@key{tesisinfo}{titulo}{\def\eltitulo{#1}}
\define@key{tesisinfo}{fecha}{\def\lafecha{#1}}
\newcommand{\alumno}[1]{\setkeys{alumnoinfo}{#1}}
\newcommand{\tesis}[1]{\setkeys{tesisinfo}{#1}}
\newcommand{\director}[1]{\setkeys{tutorinfo}{#1}}
\renewcommand{\titlepage}{
\newgeometry{textwidth=14cm}
\pagestyle{empty}
{
\centering
\includegraphics[width=2.5cm]{img/unamlogo.png}
\vspace{\stretch{.2}}
\noindent
\textbf{UNIVERSIDAD NACIONAL AUTÓNOMA DE MÉXICO}
\noindent
PROGRAMA DE MAESTRÍA Y DOCTORADO EN CIENCIAS MATEMÁTICAS Y DE LA
ESPECIALIZACIÓN EN ESTADÍSTICA APLICADA
\vspace{\stretch{.2}}
\noindent
\MakeUppercase{\eltitulo}
\vspace{\stretch{.2}}
\noindent
TESIS\\
QUE PARA OPTAR POR EL GRADO DE:\\
\MakeUppercase{\elgrado}
\vspace{\stretch{.2}}
\noindent
PRESENTA:\\
\MakeUppercase{\elnombre}
\vspace{\stretch{.2}}
\noindent
DIRECTOR DE LA TESIS:\\
\MakeUppercase{\eldirector} \\
\MakeUppercase{\lainstitucion}
\vspace{\stretch{.2}}
\noindent
MÉXICO, D.F.~\MakeUppercase{\lafecha}
\vspace{0.5pt}
}
\cleardoublepage
\pagestyle{principal}
}