aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/thesis/Fading.tex4
-rw-r--r--doc/thesis/tex/docstyle.sty25
2 files changed, 23 insertions, 6 deletions
diff --git a/doc/thesis/Fading.tex b/doc/thesis/Fading.tex
index 2c10109..da9bdb1 100644
--- a/doc/thesis/Fading.tex
+++ b/doc/thesis/Fading.tex
@@ -4,6 +4,8 @@
% vim: set ts=2 sw=2 noet:
\documentclass[
+ % show when a line is too long (drafting)
+ overfullrule,
% page size and margins
paper = a4, twoside, openright, BCOR = 5mm,
headinclude, footexclude,
@@ -22,7 +24,7 @@
%% Custom packages
\usepackage{tex/docmacros}
-\usepackage{tex/docstyle}
+\usepackage[draft]{tex/docstyle}
%% Pretty figures
\usepackage{circuitikz} % Electric diagrams
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