-
Notifications
You must be signed in to change notification settings - Fork 3
/
JTH.cls
executable file
·75 lines (63 loc) · 1.83 KB
/
JTH.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{JTH}[2017/10/03 JU-JTH LaTeX class]
% Build on existing report class
\LoadClass[11pt, a4paper]{report}
% --- Package loading starts ---
% Core LaTeX features
\RequirePackage{hyperref}
\RequirePackage{graphicx}
\graphicspath{{images/}}
% Colors for front page
\RequirePackage{xcolor}
\RequirePackage{pagecolor}
% Fonts for headers and body
\RequirePackage{helvet}
\RequirePackage{mathptmx}
% Various styling and spacing
\RequirePackage{setspace}
\RequirePackage{sectsty}
\RequirePackage{fancyhdr}
\RequirePackage{geometry}
% --- Package loading ends ---
% Define a macro for the subtitle
\newcommand*{\subtitle}[1]{\gdef\@subtitle{#1}}
\newcommand*{\@subtitle}{}%
% Various color, font, and indentation
\definecolor{jublue}{RGB}{0.0, 56, 101}
\allsectionsfont{\sffamily}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
% Configure footer (i.e., page number) style
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\sffamily\fontsize{10pt}{10pt}\selectfont\thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\pagestyle{plain}
% --- Start of fancy title page command ---
\renewcommand{\maketitle}{%
% Reconfigure front page colors, geometries, etc.
\thispagestyle{empty}
\newgeometry{left=2cm,top=2cm, right=7cm}
\newpagecolor{jublue}
\color{white}
\sffamily
% Logo, nice spacing, title, subtitle, author..
\includegraphics[width=70mm]{JTH-logo.pdf}\par
\vspace{4 cm}
\setstretch{1.1}
\Huge\textbf{\@title}\par
\huge \@subtitle\par
\vspace{1 cm}
\Large\textbf{\@author}
% Restore default settings for the rest of the document
\color{black}
\normalsize
\rmfamily
\newpage
\restoregeometry
\restorepagecolor
% And finally, set the nice spacing again
\setstretch{1.2}
}
% --- End of fancy title page command ---