Debian Codegraph @

texmf-dist/doc/latex/unamth-template/Latex/Classes/PhDthesisPSnPDF.cls

raw
1 %-------------------------------------------------------------------
2 % PhDthesis version 2 style file by Jakob Suckale, 2007
3 % based on CUEDthesis version 1 by Harish Bhanderi 2002
4 % Modificaciones para FI-UNAM por Jesús Velázquez y Marco Ruiz, 2014
5 %-------------------------------------------------------------------
6
7 %-------------------------- identification ---------------------
8 %\NeedsTeXFormat{LaTeX2e}
9 \ProvidesClass{Latex/Classes/PhDthesisPSnPDF}[2007/09/06 v2 PhD thesis class]
10
11
12 %If you want to use a Book style document then uncomment the following 3 lines and comment the above 8 report style lines:
13 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
14 \ProcessOptions\relax
15 \ifx\pdfoutput\undefined
16 \LoadClass[dvips, a4paper]{book} % CAMBIAR "a4paper" POR "letterpaper" PARA TAMAÑO CARTA
17 \else
18 \LoadClass[pdftex, a4paper]{book}
19 \fi
20
21 %:------------------------- PAQUETES -----------------------
22 \usepackage{amssymb, amsmath, amsbsy, amsfonts} % ECUACIONES Y SÍMBOLOS MATEMÁTICOS
23 \usepackage[utf8]{inputenc} % CODIFICACIÓN UTF8, PARA Ñs Y ACENTOS Y DEMÁS
24 \usepackage{listings} % PERMITE AGREGAR CÓDIGO DE LENGUAJES DE PROGRAMACIÓN (DOCUMENTACIÓN EN GOOGLE)
25 \usepackage{emptypage} % QUITA LOS ENCABEZADOS Y PIES DE PÁGINA EN LAS HOJAS VACÍAS PRODUCIDAS POR LA IMPRESIÓN A DOS CARAS
26 %\usepackage{wrapfig} % to include figure with text wrapping around it
27 \usepackage[margin=10pt,font=small,labelfont=bf]{caption} % for improved layout of figure captions with extra margin, smaller font than text
28 \usepackage[bf,SL,BF]{subfigure} % Permite crear figuras múltiples
29 \usepackage{makeidx} % Contiene los macros para indexar en un glosario
30 %\usepackage[style=list,toc,number=none]{glossary}
31 \usepackage{mathdots} % para el comando \iddots
32 \usepackage{mathrsfs} % para formato de letra en ecuaciones
33 \raggedbottom %Evita que LaTeX distribuya los espacios en blanco sobre la página, en lugar de eso los envía al fondo
34 \usepackage{fancyhdr} % for better header layout
35 \usepackage{eucal}
36 \usepackage[spanish,mexico]{babel}
37 \usepackage{color}
38 \usepackage[perpage]{footmisc}
39 \usepackage[round, sort, numbers]{natbib}
40 \usepackage{ifthen}
41 \usepackage{multicol} % for pages with multiple text columns, e.g. References
42 \setlength{\columnsep}{20pt} % space between columns; default 10pt quite narrow
43 \usepackage[nottoc]{tocbibind} % correct page numbers for bib in TOC, nottoc suppresses an entry for TOC itself
44 %\usepackage{nextpage}
45 \usepackage{titlesec}
46 %\usepackage[siunitx]{circuitikz} %para circuitos
47 %\usepackage[makeroom]{cancel}%Para cancelar términos en modo matemático
48 %\usepackage{cleveref} %COMO UNA FORMA DE REFERENCIAR TABLAS, ECUACIONES, ETC. -->http://mirror.utexas.edu/ctan/macros/latex/contrib/cleveref/cleveref.pdf
49
50
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 % REDEFINIENDO EL FORMATO DE LOS CAPITULOS %
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 \newcommand{\bigrule}{\titlerule[0.5mm]}
55 \titleformat{\chapter}[display] % CAMBIAMOS EL FORMATO DE LOS CAPÍTULOS
56 %{\bfseries\Huge} % por defecto se usarán caracteres de tamaño \Huge en negrita
57 {\Huge} % por defecto se usarán caracteres de tamaño \Huge en negrita
58 {% contenido de la etiqueta
59 \titlerule % línea horizontal
60 \filleft % texto alineado a la derecha
61 \Large\chaptertitlename\ % "Capítulo" o "Apéndice" en tamaño \Large en lugar de \Huge
62 \Large\thechapter} % número de capítulo en tamaño \Large
63 {0mm} % espacio mínimo entre etiqueta y cuerpo
64 {\filleft} % texto del cuerpo alineado a la derecha
65 [\vspace{0.5mm} \bigrule] % después del cuerpo, dejar espacio vertical y trazar línea horizontal gruesa
66
67
68 %:-------------------------- Glossary/Abbrev./Symbols -----------------------
69 \usepackage[intoc]{nomencl} % load nomencl extension; include in TOC
70 %\nomrefpage % to include page numbers after abbrevations
71 \renewcommand{\nomname}{Glossary} % rename nomenclature
72 \renewcommand{\nomlabel}[1]{\textbf{#1}} % make abbreviations bold
73 \makenomenclature % used to be \makeglossary
74 \newcommand{\g}{\footnote{For all abbreviations see the glossary on page \pageref{nom}.}} % type "\g" to refer to glossary
75
76 % used to be for sorting into categories:
77 %\renewcommand\nomgroup[1]{%
78 % \ifthenelse{\equal{#1}{A}}{%
79 % \item[\textbf{Roman Symbols}] }{% A - Roman
80 % \ifthenelse{\equal{#1}{G}}{%
81 % \item[\textbf{Greek Symbols}]}{% G - Greek
82 % \ifthenelse{\equal{#1}{R}}{%
83 % \item[\textbf{Superscripts}]}{% R - Superscripts
84 % \ifthenelse{\equal{#1}{S}}{%
85 % \item[\textbf{Subscripts}]}{{% S - Subscripts
86 % \ifthenelse{\equal{#1}{X}}{%
87 % \item[\textbf{Other Symbols}]}{{% X - Other Symbols
88 % \ifthenelse{\equal{#1}{Z}}{%
89 % \item[\textbf{Acronyms}]}% Z - Acronyms
90 % {{}}}}}}}}}}
91
92
93 %:-------------------------- PDF/PS setup -----------------------
94
95 %if you use a macTeX 2008 or later, use the ifpdf package
96 \usepackage{ifpdf}
97
98 %if you use an older version, uncomment these lines:
99 %\newif \ifpdf
100 % \ifx \pdfoutput \undefined
101 % for running latex
102 % \pdffalse
103 % \else
104 % for running pdflatex
105 % \pdfoutput = 1 % positive value for a PDF output
106 % otherwise a DVI
107 % \pdftrue
108 %\fi
109
110
111
112 \ifpdf
113 %-->
114 %--> Google.com search "hyperref options"
115 %-->
116 %--> http://www.ai.mit.edu/lab/sysadmin/latex/documentation/latex/hyperref/manual.pdf
117 %--> http://www.chemie.unibas.ch/~vogtp/LaTeX2PDFLaTeX.pdf
118 %--> http://www.uni-giessen.de/partosch/eurotex99/ oberdiek/print/sli4a4col.pdf
119 %--> http://me.in-berlin.de/~miwie/tex-refs/html/latex-packages.html
120 %-->
121 \usepackage[ pdftex, plainpages = false, pdfpagelabels,
122 pdfpagelayout = OneColumn, % display single page, advancing flips the page - Sasa Tomic
123 bookmarks,
124 bookmarksopen = true,
125 bookmarksnumbered = true,
126 breaklinks = true,
127 linktocpage,
128 pagebackref,
129 colorlinks = true,
130 linkcolor = blue,
131 urlcolor = blue,
132 citecolor = red,
133 anchorcolor = green,
134 hyperindex = true,
135 hyperfigures
136 ]{hyperref}
137 \usepackage[pdftex]{graphicx}
138 \DeclareGraphicsExtensions{.png, .jpg, .pdf}
139
140 \pdfcompresslevel=9
141 %\graphicspath{{ThesisFigs/PNG/}{ThesisFigs/PDF/}{ThesisFigs/}}
142 \else
143 \usepackage[ dvips,
144 bookmarks,
145 bookmarksopen = true,
146 bookmarksnumbered = true,
147 breaklinks = true,
148 linktocpage,
149 pagebackref,
150 colorlinks = true,
151 linkcolor = blue,
152 urlcolor = blue,
153 citecolor = red,
154 anchorcolor = green,
155 hyperindex = true,
156 hyperfigures
157 ]{hyperref}
158
159 %\usepackage{epsfig}
160 \usepackage{graphicx}
161 \DeclareGraphicsExtensions{.eps, .ps}
162 %\graphicspath{{ThesisFigs/EPS/}{ThesisFigs/}}
163 \fi
164
165
166
167 %:-------------------------- page layout -----------------------
168
169 %A4 settings
170 \ifpdf
171 \pdfpageheight=297mm
172 \pdfpagewidth=210mm
173 \else
174 \setlength{\paperheight}{297mm}
175 \setlength{\paperwidth}{210mm}
176 \fi
177
178 \setlength{\hoffset}{0.00cm}
179 \setlength{\voffset}{0.00cm}
180
181 %: Uncomment this secion for two-sided printing
182 % ------------------------------
183 \setlength{\oddsidemargin}{1.5cm}
184 \setlength{\evensidemargin}{0cm}
185 \setlength{\topmargin}{1mm}
186 \setlength{\headheight}{1.36cm}
187 \setlength{\headsep}{1.00cm}
188 \setlength{\textheight}{20.84cm}
189 \setlength{\textwidth}{14.5cm}
190 \setlength{\marginparsep}{1mm}
191 \setlength{\marginparwidth}{3cm}
192 \setlength{\footskip}{2.36cm}
193
194
195 %: Uncomment this secion for one-sided printing
196 % taken from the original file, but with the first two lanes modified
197 % ------------------------------
198 %\setlength{\evensidemargin}{1.9cm} % was 1.96cm in original
199 %\setlength{\oddsidemargin}{-0.001cm} % was -0.54cm in original file
200 %\setlength{\topmargin}{1mm}
201 %\setlength{\headheight}{1.36cm}
202 %\setlength{\headsep}{1.00cm}
203 %\setlength{\textheight}{20.84cm}
204 %\setlength{\textwidth}{14.5cm}
205 %\setlength{\marginparsep}{1mm}
206 %\setlength{\marginparwidth}{3cm}
207 %\setlength{\footskip}{2.36cm}
208
209
210 %: section below defines fancy page layout options
211 % ------------------------------
212 \pagestyle{fancy}
213 \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. #1 }}{}}
214 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
215 \fancyhf{}
216 %\fancyhead[RO]{\bfseries\rightmark}
217 %\fancyhead[LE]{\bfseries\leftmark}
218 \fancyhead[RO]{\rightmark}
219 \fancyhead[LE]{\leftmark}
220 \fancyfoot[C]{\thepage}
221 \renewcommand{\headrulewidth}{0.5pt}
222 \renewcommand{\footrulewidth}{0.1pt}
223
224
225
226 \addtolength{\headheight}{0.5pt}
227 \fancypagestyle{plain}{
228 \fancyhead{}
229 \renewcommand{\headrulewidth}{0pt}
230 }
231
232
233
234
235
236 %:-------------------------- title page layout -----------------------
237
238 % starts roman page numbering until chapter 1
239 % important to avoid two pages numbered 1 and 2 which may cause bad links
240 % bug: cover i + back side ii and then numbering restarts with i; should be iii
241 \renewcommand{\thepage}{\roman{page}}
242
243 % ******************************************************************************
244 % **************************** Macro Definitions *******************************
245 % ******************************************************************************
246 % These macros are used to declare arguments needed for the
247 % construction of the title page and other preamble.
248
249 % The year and term the degree will be officially conferred
250 \newcommand{\@degreedate}{}
251 \newcommand{\degreedate}[1]{\renewcommand{\@degreedate}{#1}}
252
253 % The full (unabbreviated) name of the degree
254 \newcommand{\@degree}{}
255 \newcommand{\degree}[1]{\renewcommand{\@degree}{#1}}
256
257 % The name of your department(eg. Engineering, Maths, Physics)
258 \newcommand{\@dept}{}
259 \newcommand{\dept}[1]{\renewcommand{\@dept}{#1}}
260
261 % The name of your college (eg. King's)
262 \newcommand{\@college}{}
263 \newcommand{\college}[1]{\renewcommand{\@college}{#1}}
264
265 % The name of your University
266 \newcommand{\@university}{}
267 \newcommand{\university}[1]{\renewcommand{\@university}{#1}}
268
269 % Defining the crest
270 \newcommand{\@escudouniversidad}{}
271 \newcommand{\escudouniversidad}[1]{\renewcommand{\@escudouniversidad}{#1}}
272
273 \newcommand{\@escudofacultad}{}
274 \newcommand{\escudofacultad}[1]{\renewcommand{\@escudofacultad}{#1}}
275
276 %Definiendo al director de tesis:
277 \newcommand{\@director}{}
278 \newcommand{\director}[1]{\renewcommand{\@director}{#1}}
279
280 %Definiendo el lugar
281 \newcommand{\@lugar}{}
282 \newcommand{\lugar}[1]{\renewcommand{\@lugar}{#1}}
283
284 %Definiendo la portada
285 \newif\ifportada
286
287 % Submission Text
288 \newcommand{\submissiontext}{This dissertation is submitted for the degree of }
289
290 % keywords (These keywords will appear in the PDF meta-information
291 % called `pdfkeywords`.)
292 \newcommand{\@keywords}{}
293 \newcommand{\keywords}[1]{\renewcommand{\@keywords}{#1}}
294
295 % subjectline (This subject will appear in the PDF meta-information
296 % called `pdfsubject`.)
297 \newcommand{\@subject}{}
298 \newcommand{\subject}[1]{\renewcommand{\@subject}{#1}}
299
300 % These macros define an environment for front matter that is always
301 % single column even in a double-column document.
302 \newenvironment{alwayssingle}{%
303 \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
304 \else\newpage\fi}
305 {\if@restonecol\twocolumn\else\newpage\fi}
306
307 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
308 % PORTADA de la UNAM %
309 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
310
311 \renewcommand{\maketitle}{%
312 \begin{alwayssingle}
313 \begin{center}
314 \thispagestyle{empty}
315 %% Barra izquierda - Escudos
316 \hskip -2cm
317 \begin{minipage}[c][10cm][s]{3cm}
318 \begin{center}
319 \ifportada
320 \includegraphics[height=2.6cm]{Latex/Classes/Escudos/unam_azul_5x5cm}\\[10pt]
321 \hskip2pt\colorvrule{Azul}{2.5pt}{13cm}
322 \hskip -0.4mm
323 \colorvrule{Oro}{1pt}{13cm}\\[10pt]
324 \includegraphics[height=2.6cm]{Latex/Classes/Escudos/fi_azul}
325 \else
326 \includegraphics[height=2.6cm]{Latex/Classes/Escudos/unam_negro_5x5cm}\\[10pt]
327 \hskip2pt\vrule width2.5pt height13cm
328 \hskip1mm
329 \vrule width1pt height13cm\\[10pt]
330 \includegraphics[height=2.6cm]{Latex/Classes/Escudos/fi_negro}
331 \fi
332
333 \end{center}
334 \end{minipage}\quad
335 %% Barra derecha - Títulos
336 \begin{minipage}[c][9.5cm][s]{11cm}
337 \begin{center}
338 % Barra superior
339 {\large \scshape Universidad Nacional Autónoma de México}
340 \vspace{.3cm}
341 \ifportada
342 %\hrule height2.5pt
343 \colorhrule{Azul}{2.5pt}
344 \vspace{.1cm}
345 %\hrule height1pt
346 \colorhrule{Oro}{1pt}
347 \else
348 \hrule height2.5pt
349 \vspace{.1cm}
350 \hrule height1pt
351 \fi
352 \vspace{.3cm}
353 {\scshape Facultad de Ingeniería}
354
355 \vspace{.3cm}
356
357
358 % Título del trabajo
359 \vspace{3cm}
360
361 {\Large \scshape {\@title}}
362
363 \vspace{3cm}
364
365 % Tipo de trabajo
366 \makebox[8cm][s]{\Huge T E S I S}\\[8pt]
367 QUE PARA OBTENER EL TÍTULO DE:\\[5pt]
368 \textbf{{\@degree}}\\[40pt]
369 PRESENTA:\\[5pt]
370 \textbf{{\@author}}
371
372 \vspace{2cm}
373
374 {\small DIRECTOR DE TESIS:\\ {\@director}}
375
376 \vspace{0.5cm}
377
378 %{\small CODIRECTOR DE TESIS:\\ en caso de que aplique}
379
380 \vspace{1.5cm}
381
382 {\@lugar}{, }{\@degreedate}
383
384 \end{center}
385 \end{minipage}
386
387 \end{center}
388 \null\vfill
389 \end{alwayssingle}}
390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
391
392
393 %:-------------------------- front matter layout -----------------------
394
395 % DEDICATION
396 %
397 % The dedication environment makes sure the dedication gets its
398 % own page and is set out in verse format.
399
400 \newenvironment{dedication}
401 {\begin{alwayssingle}
402 \pagestyle{empty}
403 \vspace*{1.5cm}
404 {\large{}}
405 \vspace{0.5cm}
406 \begin{flushright}\itshape}
407 {\end{flushright} \end{alwayssingle}}
408
409
410 % ACKNOWLEDGEMENTS
411 %
412 % The acknowledgements environment puts a large, bold, centered
413 % "Acknowledgements" label at the top of the page. The acknowledgements
414 % themselves appear in a quote environment, i.e. tabbed in at both sides, and
415 % on its own page.
416
417 \newenvironment{acknowledgements}
418 {\pagestyle{empty}
419 \begin{alwayssingle}
420 \vspace*{1.5cm}
421 {\chapter*{Reconocimientos}}
422 \vspace{0.5cm}}
423 {\end{alwayssingle}}
424
425 % The acknowledgementslong environment puts a large, bold, centered
426 % "Acknowledgements" label at the top of the page. The acknowledgement itself
427 % does not appears in a quote environment so you can get more in.
428
429 \newenvironment{acknowledgementslong}
430 {\pagestyle{empty}
431 \begin{alwayssingle}
432 \vspace*{1.5cm}
433 {\chapter*{Reconocimientos}}
434 \vspace{0.5cm}}
435 {\end{alwayssingle}}
436
437 %ABSTRACT
438 %
439 %The abstract environment puts a large, bold, centered "Abstract" label at
440 %the top of the page. The abstract itself appears in a quote environment,
441 %i.e. tabbed in at both sides, and on its own page.
442
443 \newenvironment{abstracts} {\begin{alwayssingle} \pagestyle{empty}
444 \begin{center}
445 \vspace*{1.5cm}
446 {\chapter*{Resumen}}
447 \end{center}
448 \vspace{0.5cm}}
449 {\end{alwayssingle}}
450
451 %The abstractlong environment puts a large, bold, centered "Abstract" label at
452 %the top of the page. The abstract itself does not appears in a quote
453 %environment so you can get more in.
454
455 \newenvironment{abstractslong} {\begin{alwayssingle} \pagestyle{empty}
456 \begin{center}
457 \vspace*{1.5cm}
458 {\chapter*{Resumen}}
459 \end{center}
460 \vspace{0.5cm}}
461 {\end{alwayssingle}}
462
463 %The abstractseparate environment is for running of a page with the abstract
464 %on including title and author etc as required to be handed in separately
465
466 \newenvironment{abstractseparate} {\begin{alwayssingle} \pagestyle{empty}
467 \vspace*{-1in}
468 \begin{center}
469 { \Large {\bfseries {\@title}} \par}
470 {{\large \vspace*{1ex} \@author} \par}
471 {\large \vspace*{1ex}
472 {{UNAM} \par}
473 {{Facultad de Ingeniería} \par}
474 \vspace*{1ex}
475 {{\it \submittedtext} \par}
476 {\it {\@degree} \par}
477 \vspace*{2ex}
478 {\@degreedate}}
479 \end{center}}
480 {\end{alwayssingle}}
481
482 %Statement of originality if required
483
484 \newenvironment{declaration} {\begin{alwayssingle} \pagestyle{empty}
485 \begin{center}
486 \vspace*{1.5cm}
487 {\chapter*{Declaración de autenticidad}}
488 \end{center}
489 \vspace{0.5cm}}
490 {\vspace{1.5cm}\flushright{\@author. \@lugar, \@degreedate}\end{alwayssingle}}
491
492
493 %:-------------------------- page numbers: roman+arabic -----------------------
494
495 % ROMANPAGES
496 %
497 % The romanpages environment set the page numbering to lowercase roman one
498 % for the contents and figures lists. It also resets
499 % page-numbering for the remainder of the dissertation (arabic, starting at 1).
500
501 %\newenvironment{romanpages}
502 %{
503 % \setcounter{page}{1}
504 % \renewcommand{\thepage}{\roman{page}}
505 %} % close romanpage env't
506
507 {\newpage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}}