diff options
author | Nao Pross <np@0hm.ch> | 2021-05-21 14:32:55 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-05-21 14:32:55 +0200 |
commit | ddaef5f42d4f32207e1fcb270ede25ce57f3876a (patch) | |
tree | d0deea2ee331b64e6a372e22706a0ae100dc0fb8 /tex | |
download | TKI-doku-ddaef5f42d4f32207e1fcb270ede25ce57f3876a.tar.gz TKI-doku-ddaef5f42d4f32207e1fcb270ede25ce57f3876a.zip |
First commit
Diffstat (limited to '')
-rw-r--r-- | tex/Makefile.inc | 1 | ||||
-rw-r--r-- | tex/docstyle.sty | 101 |
2 files changed, 102 insertions, 0 deletions
diff --git a/tex/Makefile.inc b/tex/Makefile.inc new file mode 100644 index 0000000..7492feb --- /dev/null +++ b/tex/Makefile.inc @@ -0,0 +1 @@ +SOURCES += tex/docstyle.sty diff --git a/tex/docstyle.sty b/tex/docstyle.sty new file mode 100644 index 0000000..a442e32 --- /dev/null +++ b/tex/docstyle.sty @@ -0,0 +1,101 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tex/docstyle}[2021/02/26 v0.1 Styling for a Sans-Serif report] + +%% Margins +\RequirePackage{geometry} +\newgeometry{margin=2.5cm, top=3cm, bottom=3cm} + +%% Set math font to sans-serif +%% Note: must be set before text font +\RequirePackage{cmbright} +\RequirePackage{sfmath} + +%% Set font to sans-serif +\RequirePackage{fontspec} +\PassOptionsToPackage{ + usefilenames, + DefaultFeatures = { + Ligatures = Common + } +}{plex-otf} +\RequirePackage{plex-otf} +\renewcommand*{\familydefault}{\sfdefault} + +%% Headers and footers +\RequirePackage{fancyhdr} +\fancypagestyle{docstyle}{ + \fancyhf{} % clear currrent values + \fancyhead[L]{\itshape\leftmark} + \fancyhead[R]{} + \fancyfoot[C]{\thepage} + \renewcommand{\headrulewidth}{0pt} +} +\pagestyle{docstyle} % apply style + +%% Title style +\RequirePackage{titling} +\setlength{\droptitle}{-1cm} +\pretitle{ + \begin{flushleft} + \bfseries\Huge +} +\posttitle{ + \end{flushleft} + \large +} +\preauthor{ + \begin{flushleft} + \large +} +\postauthor{ + \end{flushleft} +} +\predate{ + \begin{flushleft} +} +\postdate{ + \par\end{flushleft} +} + +%% Link colors +\RequirePackage{xcolor} +\PassOptionsToPackage{ + plainpages=false, + pdfpagelabels, + pdfusetitle, + colorlinks = true, + linkcolor = darkgray!50!black, + urlcolor = blue!60!black, + citecolor = black, + anchorcolor = black +}{hyperref} +\RequirePackage{hyperref} + +%% Source code listings +\RequirePackage{listings} +\lstset{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{gray}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=[LaTeX]TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + % postbreak=\mbox{\textcolor{blue!60!black}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{black}, + keywordstyle=\color{blue!60!black}, + commentstyle=\color{red!60!black}, + stringstyle=\color{orange!60!black}, +} |