This repository has been archived by the owner on Mar 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnitroma-article.cls
58 lines (53 loc) · 2 KB
/
nitroma-article.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{nitroma-article}[2020/01/27 LaTeX class for Nitroma articles]
\LoadClass[a4paper]{article}
\RequirePackage[margin=20mm]{geometry}
%%% COLOURS
\RequirePackage[table,xcdraw]{xcolor}
\definecolor{color1}{HTML}{2D4F6C}
\definecolor{color2}{HTML}{8BDBDE}
\definecolor{red}{HTML}{EF476F}
\definecolor{green}{HTML}{06D6A0}
\definecolor{blue}{HTML}{0582CA}
\definecolor{yellow}{HTML}{FFD166}
%%% FONTS
\RequirePackage{fontspec}
\setmainfont{Fira Sans}
\setmonofont{inconsolata}
\RequirePackage[usefilenames]{firamath-otf}
\RequirePackage{raleway}
\newcommand{\headingfont}{\ralewayextra}
%%% SECTION TITLE FORMAT
\RequirePackage{titlesec}
% \titleformat{\chapter}{\LARGE\bfseries\scshape\color{color1}}{\thechapter}{1em}{}[\titlerule]
\titleformat{\section}{\color{color1}\Large\bfseries\headingfont}{\thesection}{1em}{}[\titlerule]
\titleformat{\subsection}{\color{color1}\large\bfseries\headingfont}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\color{color1}\bfseries\headingfont}{\thesubsubsection}{1em}{}
% original spacing values can be found here https://tex.stackexchange.com/a/48754/135479
\titlespacing*{\section}{0pt}{*1}{*1}
\titlespacing*{\subsection}{0pt}{2pt plus 4pt}{*0}
\titlespacing*{\subsubsection}{0pt}{2pt plus 2pt}{*0}
\titlespacing*{\paragraph} {0pt}{2pt plus 1pt minus 1pt}{1em}
%%% TITLEPAGE
\newcommand\subtitle[1]{\newcommand\@subtitle{#1}}
\makeatletter
\renewcommand{\maketitle}{
\thispagestyle{empty}
% \geometry{margin=10mm}
\hfill
\begin{minipage}[t][0.5\linewidth][c]{0.5\linewidth}
\includegraphics[width=\linewidth]{brand/logo-tight.pdf}
\end{minipage}
\vfill\vfill
\begin{minipage}{0.65\textwidth}
\raggedright\headingfont\bfseries
\color{color2}\large\MakeUppercase{\@subtitle}\\
\color{color1}\huge\linespread{1.3}\@title\\[3ex]
\mdseries\rmfamily
\color{color2}\normalsize\@author\\[1ex]
\color{color2}\small\@date\\
\end{minipage}
\vfill
\clearpage
}
\makeatother