diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2023-01-27 21:17:26 +0000 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2023-01-27 21:17:26 +0000 |
commit | 5d14b64751980c2d0deb202b8908505350a043ba (patch) | |
tree | 5b2742f29ac624a263596c823577fa6b51d7e0bb | |
parent | 1bc0d90f1dd541e480eb72f92ad2e8dc22940192 (diff) | |
download | UiO_profile-5d14b64751980c2d0deb202b8908505350a043ba.tar.gz UiO_profile-5d14b64751980c2d0deb202b8908505350a043ba.zip |
Do things
-rw-r--r-- | UiO_profile.cls | 102 |
1 files changed, 87 insertions, 15 deletions
diff --git a/UiO_profile.cls b/UiO_profile.cls index e4c09a3..33fcad0 100644 --- a/UiO_profile.cls +++ b/UiO_profile.cls @@ -1,17 +1,21 @@ -\LoadClass{article} - \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{UiO_profile/UiO_profile}[2022/00/06 My custom CV class] - -\usepackage[scaled]{helvet} -\renewcommand\familydefault{\sfdefault} -\usepackage[T1]{fontenc} +\ProvidesClass{UiO_profile/UiO_profile}[2023/01/01 Package that tries to follow the UiO profile] -\RequirePackage{titling} -\RequirePackage{tikz} -\RequirePackage[export]{adjustbox} +% Required packages +\RequirePackage[T1]{fontenc} \RequirePackage{xcolor} +% Options +\DeclareOption{binding}{\def \uiop@bind {24pt}} +\DeclareOption{font=cmr}{\def \uiop@font {\RequirePackage{lmodern} + \RequirePackage[scaled]{helvet}}} +\DeclareOption{font=garamond}{\def \uiop@font {\RequirePackage[garamond]{mathdesign} + \RequirePackage[scaled]{helvet}}} +\DeclareOption{font=times}{\RequirePackage{txfonts}} + +\def \uiop@bind {0pt} +\def \uiop@base {report} + % UiO Brand colors % Blue \definecolor{UiOBlue}{RGB}{67, 101, 226} @@ -40,19 +44,87 @@ \colorlet{UiOFrontpagePrimary}{UiODarkGreen} \colorlet{UiOFrontpageBackground}{UiOLightGreen} } + \newif\iflangno \DeclareOption{no}{\langnotrue} + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\uiom@base}} + +\ExecuteOptions{font=cmr} + \ProcessOptions\relax -%\sectionfont{\color{UioBlue}} -%\subsectionfont{\color{UioBlue}} +\LoadClass[a4paper,11pt,twoside,openright]{report} + +% Margins +\RequirePackage[vmargin=3cm,bindingoffset=\uiop@bind]{geometry} + +% Adjustements +\pretolerance = 3000 +\tolerance = 6000 \hbadness = \tolerance +\setlength{\parskip}{0cm plus 1mm} + +% Font +\uiop@font +\renewcommand*\familydefault{\sfdefault} + +% Other required packages for frontpage and stuff +\RequirePackage{titling} + +%% Chapter and section headers: + +%% Redefine \begin{abstract}...\end{abstract} +\renewenvironment{abstract}{% + \ifthenelse{\equal{\uiom@base}{report}} + {\cleardoublepage + \markboth{\abstractname}{}% + \vspace*{5\baselineskip}}% + {\bigskip}% + \small + \begin{center}% + {\sf\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% + \end{center}% + \quotation}% +{\endquotation \bigskip} + +%% Define \begin{preface} +\newenvironment{preface}{% + \chapter*{\prefacename} + \markboth{\prefacename}{}} + {} + +%% Headers and footers: +\RequirePackage{fancyhdr} +\fancyhead{} +\setlength{\headheight}{15pt} +\fancyhead[LE]{\textsf{\small \nouppercase{\leftmark}}} +\fancyhead[RO]{\textsf{\small \nouppercase{\rightmark}}} +\renewcommand{\headrulewidth}{0pt} +\fancyfoot{} +\fancyfoot[LE,RO]{\textsf{\thepage}} +\renewcommand{\footrulewidth}{0pt} +\pagestyle{fancy} +\fancypagestyle{plain}{\fancyhead{}} + +%% Figurer og tabeller +\RequirePackage[labelfont=sf,font=small]{caption} + +%% Document parts: +\newcommand{\frontmatter}{\cleardoublepage \pagenumbering{roman}} +\newcommand{\mainmatter}{\cleardoublepage \pagenumbering{arabic}} +\newcommand{\backmatter}{\cleardoublepage} + +\providecommand{\preface}{\chapter*{}\markboth{}{}} +\providecommand{\endpreface}{} % Titlepage +\RequirePackage{tikz} +\RequirePackage[export]{adjustbox} \newcommand{\subtitle}[1]{ - \def\@subtitle{#1} + \def\@subtitle{#1} } \newcommand{\deliverableversion}[1]{ - \def\@deliverableversion{#1} + \def\@deliverableversion{#1} } \newcommand{\programname}[1]{ \def\@programname{#1} @@ -107,7 +179,7 @@ % Tittel \node[anchor=north west] (title) at ([shift={(10mm,-10mm)}]names.south west) { \ifdefined\thetitle - \Huge\thetitle + {\sf\Huge\thetitle} \else \fi }; |