-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDissertateUSU.cls
272 lines (240 loc) · 7.75 KB
/
DissertateUSU.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
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
% -------------------------------------------------------------------
% @LaTeX-class-file{
% filename = "DissertateUSU.cls",
% version = "1.0",
% date = "01 July 2017",
% codetable = "ISO/ASCII",
% keywords = "LaTeX, Dissertate",
% note = "Based on 'Dissertate' by Jordan Suchow,
% For support, email '[email protected]',
% docstring = "Class for a dissertation at Utah State."
% --------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{DissertateUSU}[2017/07/01 v1.0 DissertateUSU Class]
\LoadClass[12pt, oneside, letterpaper]{book}
%%%%%%%%%%%%%%%%%
%% Options %%
%%%%%%%%%%%%%%%%%
\RequirePackage{etoolbox}
\usepackage{chngcntr}
\counterwithin*{equation}{section}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
%{{{ Line-spacing control
\RequirePackage{setspace}
\newcommand{\singlespaced}{\singlespacing} %espaciado por defecto entre las lineas
\newcommand{\doublespaced}{\doublespacing}
\newcommand{\triplespaced}{\setstretch {2.6}}
%}}}
% Text layout.
\usepackage{ragged2e}
\RaggedRight
%\justifying
\RequirePackage{graphicx}
\usepackage{fixltx2e}
\usepackage{parskip}
\setlength{\parindent}{0cm}
%\setlength{\parskip}{5ex}
\RequirePackage{lettrine}
\RequirePackage{setspace}
\RequirePackage{verbatim}
\usepackage{indentfirst}
% Fonts.
\RequirePackage{color}
\usepackage{hyperref}
\RequirePackage{url}
\RequirePackage{amssymb}
\RequirePackage{mathspec}
\AtBeginEnvironment{tabular}{\addfontfeature{RawFeature=+tnum}}
\widowpenalty=300
\clubpenalty=300
% \setromanfont[Numbers=OldStyle, Ligatures={Common, TeX}, Scale=1.0]{EB Garamond}
% \newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
% \setsansfont[Scale=MatchLowercase, BoldFont={Lato Bold}]{Lato Regular}
% \setmonofont[Scale=MatchLowercase]{Source Code Pro}
\RequirePackage[labelfont={bf,small,singlespacing},
textfont={small,singlespacing},
justification={justified,RaggedRight},
singlelinecheck=false,
margin=0pt,
figurewithin=chapter,
tablewithin=chapter]{caption}
\RequirePackage{microtype}
\captionsetup{justification=centering} %centrado de los caption
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Headings & Headers %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\RequirePackage[tiny, md, sc]{titlesec}
\setlength{\headheight}{300pt}
\RequirePackage{titling}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Page number in upper right corner %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\thepage} % numeros de pagina abajo
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: TABLE of CONTENTS -auto fill %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{tocdepth}{3}
\usepackage[titles]{tocloft}
\usepackage[titletoc]{appendix}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftchapfont}{\normalsize \normalfont}
\renewcommand\contentsname{ÍNDICE}
\renewcommand{\figurename}{Figura}
\renewcommand{\tablename}{Tabla}
\renewcommand\listfigurename{LISTA DE FIGURAS}
\renewcommand\listtablename{LISTA DE TABLAS}
\renewcommand{\cftchapafterpnum}{\vspace{10pt}}
\newcommand{\hsp}{\hspace{20pt}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: List of TABLES - auto fill %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{{{ List of Tables
% LoT should be single-spaced within entries and double-spaced between entries
\renewcommand*{\listoftables}{
\singlespaced
% \vskip0pt
\chapter*{ \begin{center} \textnormal{LISTA DE TABLAS} \end{center}}
\addcontentsline{toc}{section}{LISTA DE TABLAS}
% \addcontentsline{toc}{chapter}{\textnormal{LIST OF TABLES}}
% \addvspace{10pt}
% \typeout{!! List of Tables...!!}
\noindent Tabla \hfill Página\\ % newline allows us to use a vspace...
% vspace adjusts spacing to get a doublespace between table headings
% and table contents
% \vspace{\baselineskip}
\@starttoc{lot}
\newpage
% \doublespaced
}
% Ensure double-spacing between entries
\renewcommand*\l@table{\par\addvspace{\bigskipamount}\pagebreak[2]
\@dottedtocline{1}{1.5em}{2.3em}}
%}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: List of FIGURES -auto fill %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{{{ List of Figures
% LoF should be single-spaced within entries and double-spaced between entries
\renewcommand*{\listoffigures}{
\singlespaced
% \vskip0pt
\chapter*{\begin{center} \textnormal{LISTA DE FIGURAS} \end{center}}
\addcontentsline{toc}{section}{LISTA DE FIGURAS}
% \addcontentsline{toc}{chapter}{\textnormal{LIST OF FIGURES}}
% \addvspace{10pt}
% \typeout{!! List of Figures...!!}
\noindent Figura \hfill Página\\ % newline allows us to use a vspace...
% vspace adjusts spacing to get a doublespace between table headings
% and table contents
% \vspace{\baselineskip}
\@starttoc{lof}
\newpage
% \doublespaced
}
% Ensure double-spacing between entries
\renewcommand*\l@figure{\par\addvspace{\bigskipamount}\pagebreak[2]
\@dottedtocline{1}{1.5em}{2.3em}}
%}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: SECTION HEADINGS- auto fill %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\setthesection}{\roman{chapter}.A\roman{section}}
\usepackage{quotchap}
\parskip 0pt
\usepackage{titlesec, blindtext, color}
\titleformat{\chapter}[display]
{\vspace{-60pt}\center} %% spacing of chapter headings
{{CAPÍTULO \thechapter}}
{0pt}
{}
\titleformat{\section}[display]
{\normalfont\normalsize\bfseries}
{}
{0pt}
{{}}
\titleformat{\subsection}[display]
{\normalfont\normalsize\itshape}
{}
{0pt}
{{}}
\titleformat{\subsubsection}[display]
{\normalfont\normalsize}
{}
{0pt}
{{}}
% An environment for paragraph-style section.
\providecommand\newthought[1]{%
\addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}%
\textsc{#1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Figure numbering - chapter.number %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\renewcommand\thechapter{\Roman{chapter}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: Title Page - info filled above %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\maketitle}{
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
\doublespaced
\MakeUppercase{\@title}\\
por\\
\@author \\
\singlespaced
Tesis entregada como cumplimiento parcial\\
de los requisitos del grado \\
\doublespaced
de\\
\MakeUppercase{\degree} \\
en\\
\singlespaced
\field \\
\end{center}
\vspace{12pt}
\noindent Aprobado: \\
\vspace{20pt}
\begin{tabular}{ll}
\centering
\makebox[2.75in]{\hrulefill} & \makebox[2.7in]{\hrulefill}\\
%\chairperson & \committeeone \\
Dr. Salvador Torra & Director del trabajo \\
& \\
& \\
\end{tabular}
\vspace{10pt}
\begin{center}
\singlespacing
UNIVERSITAT DE BARCELONA Y UNIVERSITAT POLITECNICA DE CATALUNYA\\
Barcelona, España\\
\doublespacing
\yeardegree
\end{center}
\vspace*{\fill}
\clearpage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT: Copy Right - info filled above %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\copyrightpage}{
\vspace*{\fill}
\begin{center}
\doublespacing
Copyright \hspace{3pt}
\scshape \small \copyright \hspace{3pt}
\@author \hspace{3pt} \yeardegree\\
Todos los derechos reservados
\end{center}
\vspace*{\fill}
}