You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
2.6 KiB
TeX
125 lines
2.6 KiB
TeX
\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}} |