Created
May 21, 2017 20:30
-
-
Save iamarcel/7391c5629f82c6916d15da12b8f76221 to your computer and use it in GitHub Desktop.
UGent-style LaTeX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{report} | |
\usepackage{pdfpages} | |
\usepackage{float} | |
\usepackage{color} | |
\usepackage{array,graphicx} | |
\usepackage{booktabs} | |
\usepackage{pifont} | |
\usepackage[space]{grffile} | |
\usepackage[backend=biber]{biblatex} | |
\usepackage{tcolorbox} | |
\usepackage{keycommand} | |
\usepackage{tabularx} | |
\usepackage{soul} | |
\usepackage{rotating} | |
\usepackage{fancyref} | |
% https://styleguide.ugent.be/basisprincipes/grid-en-lay-out.html | |
\newlength{\gridsize} | |
\setlength{\gridsize}{0.142857143\paperheight} % 1/7 | |
\newlength{\smallgridsize} | |
\setlength{\smallgridsize}{0.035714286\paperheight} % 1/7/4 | |
\usepackage[paper=a4paper, top=1in, bottom=1.25in, left=\gridsize, right=\gridsize]{geometry} | |
% Color definitions | |
\usepackage{color} | |
\definecolor{ugent-blue}{RGB}{30, 100, 200} | |
\definecolor{ugent-yellow}{RGB}{255, 210, 0} | |
% Main font | |
\usepackage{fontspec} | |
\setmainfont[Path=fonts/, | |
UprightFont=*.otf, | |
ItalicFont=*-Italic.otf, | |
BoldFont=*-Bold.otf, | |
Ligatures={NoDiscretionary, NoHistoric, NoRequired, NoContextual}]{BaskervaldADFStd} | |
% Heading font | |
\usepackage{titlesec} | |
\newfontfamily\headingfont[Path=fonts/, | |
UprightFont = *-Normal.otf, | |
BoldFont = *-SemiBold.otf]{UGentPannoText} | |
\titleformat{\chapter}[display] | |
{\large\headingfont} | |
{\chaptertitlename\ \thechapter}{0pt}{\Huge\uppercase} | |
\titleformat*{\section}{\LARGE\headingfont} | |
\titleformat*{\subsection}{\Large\headingfont} | |
\titleformat*{\subsubsection}{\large\headingfont} | |
\titleformat{\paragraph} | |
{\headingfont\normalsize\bfseries}{\theparagraph}{1em}{} | |
\titleformat*{\subparagraph}{\bfseries\headingfont} | |
\titlespacing*{\paragraph}{0pt}{2.8ex plus 0.8ex minus .4ex}{-\parskip} | |
% Paragraph formatting | |
\usepackage{setspace} | |
\setstretch{1.4} | |
\setlength{\parskip}{1.4ex} | |
\setlength{\parindent}{0pt} | |
\usepackage[inline]{enumitem} | |
\setlist{nosep, labelwidth=\parindent} | |
% Precise typography | |
\usepackage{microtype} | |
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} | |
% Consistantly format references | |
\newcommand{\tabref}[1]{Table~\ref{#1}} | |
% http://tex.stackexchange.com/a/12712 | |
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} | |
% Increase vertical spacing in tabular | |
\renewcommand{\arraystretch}{1.4} | |
\begin{document} | |
\newgeometry{margin=0pt, left=\smallgridsize, right=0pt, | |
top=0pt, bottom=\smallgridsize} | |
\begin{titlepage} | |
\begin{tcolorbox}[boxsep=0pt, | |
top=\smallgridsize, | |
left=\smallgridsize, | |
right=\smallgridsize, | |
bottom=\smallgridsize, | |
arc=0pt, | |
auto outer arc, | |
colback=ugent-blue, | |
colframe=black, | |
width=\paperwidth - \smallgridsize, | |
height=\paperheight - \gridsize - \smallgridsize, | |
valign lower=bottom, | |
coltext=white, | |
fontupper=\headingfont, | |
fontlower=\headingfont, | |
lower separated=false, | |
boxrule=0pt] | |
\noindent | |
\begin{minipage}[t]{0.45\linewidth}\raggedright | |
\textbf{\uppercase{2016{\textendash}2017}} | |
\end{minipage} | |
\hfill | |
\begin{minipage}[t]{0.45\linewidth}\raggedleft | |
\textbf{\uppercase{Group xx}} \\ | |
Marcel Samyn | |
Others | |
\end{minipage} | |
\tcblower | |
\begin{minipage}[b]{0.60\linewidth}\raggedright | |
\uppercase{Document subtitle} | |
\vspace{1.5ex} | |
\setul{5pt}{3pt} | |
{\fontsize{64pt}{0pt}\selectfont \ul{\textsc{UGENT LOVES LATEX}}} | |
\end{minipage} | |
\hfill | |
\begin{minipage}[b]{0.3\linewidth}\raggedleft | |
\today | |
\end{minipage} | |
\end{tcolorbox} | |
\vfill | |
\includegraphics[width=3\smallgridsize]{images/ugent.eps} | |
\end{titlepage} | |
\restoregeometry | |
\renewcommand{\contentsname}{CONTENTS} | |
\addtocontents{toc}{\protect\setstretch{0.9}} | |
\tableofcontents | |
\chapter{Introduction} | |
\label{chap:introduction} | |
Hello World! | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment