From 642fec7b08a369ee488682a05fe1232720574f97 Mon Sep 17 00:00:00 2001 From: HeNine <> Date: Mon, 8 May 2023 18:18:39 +0200 Subject: [PATCH] style --- README.md | 4 ++ kartsstyle.cls | 125 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 README.md create mode 100644 kartsstyle.cls diff --git a/README.md b/README.md new file mode 100644 index 0000000..bc44c75 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +KaRTS Style +=========== + +LaTeX style for KaRTS. \ No newline at end of file diff --git a/kartsstyle.cls b/kartsstyle.cls new file mode 100644 index 0000000..c1a26b4 --- /dev/null +++ b/kartsstyle.cls @@ -0,0 +1,125 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{kartsstyle}[2023/05/08 Class for KaRTS books] + +% +% Start from KOMA book +% +\LoadClass[a4paper,12pt,openany]{scrbook} +\KOMAoptions{ + numbers=noenddot, + chapterprefix, + parskip=half, + pagesize=auto +} +\setlength{\footskip}{2.5em} + +% +% Load for later +% +\RequirePackage{etoolbox} + +% +% Page geometry and PDF settings +% +\RequirePackage[a4paper,bottom=3.2cm,outer=2cm, inner=1.5cm, footskip=2.0cm]{geometry} +\usepackage[hidelinks]{hyperref} +\hypersetup{pdfpagelayout=TwoColumnRight,pdfstartview={XYZ null null 1.00}} + +\raggedbottom + +% +% Microtype and fonts +% +\usepackage{microtype} +\usepackage[scaled]{helvet} +\usepackage[]{scholax} +\usepackage{anyfontsize} + +% +% Colors +% +\RequirePackage[dvipsnames]{xcolor} +\definecolor{chapterbrown}{RGB}{ 89, 25, 9} +\definecolor{sectionbrown}{RGB}{140, 39, 14} + +% +% Headers and footers +% +\RequirePackage{scrlayer-scrpage} + +\addtokomafont{pagenumber}{\normalshape} + +\renewcommand\chapterpagestyle{plain} +\renewcommand\partpagestyle{empty} + +\setkomafont{pagehead}{\footnotesize\sffamily} + +\ihead[]{} +\makeatletter +\lehead[]{\@title} +\makeatother +\cehead[]{} +\rohead[]{\leftmark} + +\ofoot[\pagemark]{\pagemark} + +\AtBeginEnvironment{document}{\pagestyle{scrheadings}} + +% +% Chapter headings +% +\addtokomafont{section}{\color{sectionbrown}} +\addtokomafont{subsection}{\color{sectionbrown}} +\addtokomafont{subsubsection}{\color{sectionbrown}} + +\renewcommand{\chapterlineswithprefixformat}[3]{% + \color{chapterbrown}#2\MakeUppercase{#3}% +} +\renewcommand*{\chapterheadmidvskip}{\par\nobreak\vspace{0em}} + +\newcommand{\clearpart}[1]{\cleardoubleevenpage\part{#1}} + +% +% Stat and dice typesetting +% +\RequirePackage{relsize} + +\newcommand{\dc}[1]{\textsc{\larger d}#1} + +\newcommand*{\stat}[1]{\textsc{\larger[2]\MakeLowercase{#1}}} + +% +% Firstpar environment for the first paragraph of the chapter. Adds drop-capital, increases font size and add line spacing +% +\usepackage[loversize=0.2,nindent=0.0em]{lettrine} +\usepackage{setspace} + +\newenvironment{firstpar}{\onehalfspacing\large\lettrine}{\normalsize\par} + +% +% Multicol package. Change font size to \small. +% +\RequirePackage{multicol} + +\setlength{\columnsep}{0.75cm} + +\raggedcolumns + +\AtBeginEnvironment{multicols}{\small} + +% +% Cleveref -- Must be loaded after hyperref +% +\RequirePackage[]{cleveref} + +% +% Siunitx because what a TTRPG needs is precise metric typesetting +% +\RequirePackage[mode=match]{siunitx} + +% +% For side boxes +% +\usepackage{framed} + +\newenvironment{boxnote}[1][Note]{\begin{framed}\textbf{\sffamily #1} }{\end{framed}} \ No newline at end of file