-
Notifications
You must be signed in to change notification settings - Fork 0
/
amysparkSlides.cls
152 lines (133 loc) · 4.49 KB
/
amysparkSlides.cls
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{amysparkSlides}[2021/04/25 v4.0 Amyspark Beamer slides]
\RequirePackage{ifluatex}
\ifluatex
\else
\ClassError{amysparkSlides}{This class requires LuaLaTeX.}
\fi
%%% CARGA DE PAQUETES Y OPCIONES DE FORMATO %%%
% -------------------------------------------------------------------
% COLORES Y ENLACES DE HIPERTEXTO.
% -------------------------------------------------------------------
% Forzamos que cada una de las secciones aparezca numerada en la
% tabla de contenidos que generan los visores de PDF.
\PassOptionsToPackage{bookmarksnumbered,pdfencoding=auto}{hyperref}
\PassOptionsToPackage{svgnames,x11names}{xcolor}
\LoadClassWithOptions{beamer}
% -------------------------------------------------------------------
% FUENTES TIPOGRÁFICAS.
% -------------------------------------------------------------------
\RequirePackage{fontspec}
\urlstyle{same}
\useinnertheme{metropolis}
\useoutertheme{metropolis}
\usefonttheme[stillsansserifsmall,stillsansseriflarge]{serif}
\usefonttheme[onlylarge]{structurebold}
\usefonttheme{professionalfonts}
% \setbeamertemplate{headline}{\insertnavigation{\pagewidth}}
% \setbeamertemplate{footline}
% {%
% \hbox{%
% \hbox{\insertslidenavigationsymbol}
% \hbox{\insertframenavigationsymbol}
% \hbox{\insertsubsectionnavigationsymbol}
% \hbox{\insertsectionnavigationsymbol}
% \hbox{\insertdocnavigationsymbol}
% \hbox{\insertbackfindforwardnavigationsymbol}%
% }%
% }
\setbeamertemplate{title}{
\ifx\inserttitle\@empty\else%
\raggedright%
\inserttitle%
\par%
\vspace*{0.5em}%
\fi
}
\setbeamertemplate{subtitle}{
\ifx\insertsubtitle\@empty\else%
\raggedright%
\insertsubtitle%
\par%
\vspace*{0.5em}%
\fi
}
\setbeamertemplate{author}{
\ifx\insertauthor\@empty\else%
\insertauthor%
\par%
\vspace*{0.25em}
\fi
}
\setbeamertemplate{frametitle continuation}{(\insertcontinuationcountroman)}
\setmainfont[Ligatures={Common, TeX}]{TeX Gyre Termes}
\setsansfont[Scale=MatchUppercase]{Fira Sans}
\setmonofont[Scale=MatchUppercase]{Source Code Pro}
\setbeamerfont{caption}{size=\footnotesize}
% https://github.com/matze/mtheme/issues/233
\@ifundefined{metroset}{
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
}{}
\metroset{inner/subsectionpage=progressbar}
% https://tex.stackexchange.com/questions/591505/disable-hyphenation-in-metropolis-frametitles/591523#591523
\defbeamertemplate*{frametitle}{newplain2}{%
\nointerlineskip%
\begin{beamercolorbox}[%
wd=\paperwidth,%
sep=0pt,%
leftskip=\metropolis@frametitle@padding,%
rightskip=\the\glueexpr \metropolis@frametitle@padding plus 1fill\relax,%
]{frametitle}%
\metropolis@frametitlestrut@start%
\insertframetitle%
\nolinebreak%
\metropolis@frametitlestrut@end%
\end{beamercolorbox}%
}
% Remove ugly bar
\setbeamertemplate{title separator}{}
% Perfección tipográfica.
\RequirePackage{microtype}
% -------------------------------------------------------------------
% SISTEMA MATEMÁTICO.
% -------------------------------------------------------------------
% El paquete 'amsmath' tuneado.
\RequirePackage{mathtools}
% Fuentes tipográficas para símbolos matemáticos.
\RequirePackage{amssymb}
% Uniformizar con la fuente del documento.
\RequirePackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
% -------------------------------------------------------------------
% LOCALIZACIÓN.
% -------------------------------------------------------------------
\RequirePackage{csquotes}
\RequirePackage{polyglossia}
% -------------------------------------------------------------------
% BIBLIOGRAFÍA.
% -------------------------------------------------------------------
\RequirePackage[uniquename=false, giveninits,
maxnames=2, uniquelist=false,
sortcites, style=authoryear]{biblatex}
\DefineBibliographyStrings{spanish}{
andothers = {\emph{et\addabbrvspace al\adddot}},
mathesis = {Tesis de maestría},
phdthesis = {Tesis doctoral},
techreport = {Informe técnico}
}
\DefineBibliographyStrings{english}{
mathesis = {Master's thesis},
phdthesis = {PhD thesis},
techreport = {Technical report}
}
\setlength\bibitemsep{\itemsep}
\setcounter{biburlucpenalty}{100}
\setcounter{biburlnumpenalty}{100} % usar si es necesario
\def\oaitourl#1:#2{https://#1/#2}
\DeclareFieldFormat{eprint:oai}{%
\mkbibacro{oai}\addcolon\space
\ifhyperref
{\href{\oaitourl#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\ProcessOptions\relax
%%% FIN CARGA DE PAQUETES Y OPCIONES DE FORMATO %%%