-
Notifications
You must be signed in to change notification settings - Fork 3
/
tfg_fiupm.sty
109 lines (92 loc) · 3.48 KB
/
tfg_fiupm.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tfg_fiupm}[2010/01/31 (Ángel Herranz) ETSIINF UPM "Trabajo fin de grado" package]
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[english,spanish,es-lcroman]{babel}
% Paquetes "molones"
\RequirePackage{graphicx}
\RequirePackage{hyperref}
\RequirePackage{fancyhdr}
\RequirePackage{lipsum}
\RequirePackage{mmap}
\RequirePackage{relsize}
\RequirePackage{fontawesome}
\RequirePackage{rotating}
\RequirePackage{csquotes}
\RequirePackage[textwidth=2.5cm, textsize=smaller]{todonotes}
\setlength{\marginparwidth}{2.5cm}
% Tipo de letra
\RequirePackage{times}
\RequirePackage[scaled=0.75]{beramono}
% Formateo e inclusión de código: listings
\RequirePackage{listings}
\lstset{
basicstyle=\ttfamily,
showstringspaces=false,
extendedchars=true,
literate=
{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
{À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
{œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
{ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
{ñ}{~n}1
{€}{{\EUR}}1 {£}{{\pounds}}1
{¿}{{?`}}1 {¡}{{!`}}1 {‘}{`}1 {’}{'}1
}
% Márgenes recomendados
\RequirePackage[left=3cm, right=3cm, top=3.5cm, bottom=3.5cm]{geometry}
% Tipos de letra en títulos y secciones
\newcommand{\dedicafont}{\usefont{T1}{phv}{m}{n}\fontsize{14}{17.5}\selectfont}
\newcommand*{\copyrightfont}{\usefont{T1}{phv}{m}{n}\fontsize{6}{7.5}\selectfont}
\newcommand{\sectionalfont}{\usefont{T1}{phv}{b}{n}}
% {64}{80} {56}{70} {48}{60} {32}{40} {24}{30} {18}{22.5} {16}{20} {14}{17.5} {12}{15}
\newcommand{\partnumberfont}{\sectionalfont\fontsize{64}{80}\selectfont}
\newcommand{\parttitlefont}{\sectionalfont\fontsize{48}{60}\selectfont}
\newcommand{\chapternumberfont}{\sectionalfont\fontsize{64}{80}\selectfont}
\newcommand{\chaptertitlefont}{\sectionalfont\fontsize{32}{40}\selectfont}
\newcommand{\sectiontitlefont}{\sectionalfont\fontsize{18}{22.5}\selectfont}
\newcommand{\subsectiontitlefont}{\sectionalfont\fontsize{16}{20}\selectfont}
\newcommand{\subsubsectiontitlefont}{\sectionalfont\fontsize{14}{17.5}\selectfont}
\newcommand{\headertitlefont}{\sectionalfont\fontsize{12}{15}\selectfont}
\RequirePackage{titlesec}
\titleformat{\chapter} % command
[display] % shape
{} % format
{\chapternumberfont\flushright\thechapter} % label
{0pt} % sep
{\chaptertitlefont\flushright} % before
[] % after
\titleformat{\section} % command
[block] % shape
{} % format
{\sectiontitlefont\thesection} % label
{1.5ex} % sep
{\sectiontitlefont} % before
[] % after
\titleformat{\subsection} % command
[block] % shape
{} % format
{\subsectiontitlefont\thesubsection} % label
{1.5ex} % sep
{\subsectiontitlefont} % before
[] % after
\titleformat{\subsubsection} % command
[block] % shape
{} % format
{\subsubsectiontitlefont\thesubsubsection} % label
{1.5ex} % sep
{\subsubsectiontitlefont} % before
[] % after
% Bibliografía en formato IEEE
\RequirePackage[style=ieee, backend=bibtex]{biblatex}
% Portada
\RequirePackage{portada}
%% Separamos los párrafos un poquito más
\setlength{\parskip}{1.5ex}
\endinput