From c68d09d1683bdd4d303f9ced50f7da2844c468b6 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Tue, 2 Nov 2021 16:17:16 +0100
Subject: Set up drafting options

---
 doc/thesis/tex/docstyle.sty | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

(limited to 'doc/thesis/tex')

diff --git a/doc/thesis/tex/docstyle.sty b/doc/thesis/tex/docstyle.sty
index ae33342..32a76e8 100644
--- a/doc/thesis/tex/docstyle.sty
+++ b/doc/thesis/tex/docstyle.sty
@@ -1,5 +1,11 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tex/docstyle}[2021/10/31 v0.1 Document Style]
+\ProvidesPackage{tex/docstyle}[2021/10/31 v0.1 Styling for my thesis]
+
+% Package options
+\newif\ifdraftmode
+\DeclareOption{draft}{\draftmodetrue}
+
+\ProcessOptions\relax
 
 %% Page Margins (done with KOMA)
 % \PassOptionsToPackage{geometry}{
@@ -13,19 +19,29 @@
 % 	}
 % }
 
+%% Need colors
+\RequirePackage{xcolor}
+
 %% Pager headers and footers (using KOMA)
-\PassOptionsToPackage{scrlayer-scrpage}{autooneside = false}
+\PassOptionsToPackage{scrlayer-scrpage}{autooneside=false, draft=false}
 \RequirePackage{scrlayer-scrpage}
 
 \setkomafont{pagenumber}{\sffamily\bfseries\slshape}
 \setkomafont{pageheadfoot}{\itshape}
 
-% Add marks
 \lehead{\leftmark}
 \rohead{\rightmark}
 
+%% Draft date when in draft mode
+\ifdraftmode
+	\RequirePackage{scrtime}
+	\newcommand{\draftfooterstring}{\footnotesize\slshape (Draft of \today\ at \thistime)}
+	\cefoot{\draftfooterstring}
+	\cofoot{\draftfooterstring}
+\fi
+
 %% Font configuration
-% use roboto from sans serif
+% use roboto for sans serif
 \RequirePackage{roboto}
 
 %% Floating captions configuration
@@ -43,7 +59,6 @@
 \RequirePackage{biblatex}
 
 %% Set up links
-\RequirePackage{xcolor}
 \PassOptionsToPackage{hyperref}{%
 	bookmarks = true,
 	%% TODO: set title
-- 
cgit v1.2.1