% !TEX encoding = utf8
% !TEX program = pdflatex
% !TEX root = not-the-end
% !TEX spellcheck = it-IT

\documentclass[a4paper,titlepage=firstiscover]{scrbook}

% Basic setup
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[italian]{babel}

% Misc typography
\setcounter{tocdepth}{1}

\DeclareTOCStyleEntry[numwidth=2.3em]{part}{part}
    % Set part number width in TOC: default is 2em, but is too short

\usepackage{geometry}

% Margin notes
\usepackage{marginfix}
    % Manage overflowing notes

\newcommand{\marginparfontsize}{\tiny}
    % Variable for usage elsewhere
\makeatletter
    % Reduce marginpar font size to \marginparfontsize
\long\def\@ympar#1{%
    \@savemarbox\@marbox{\marginparfontsize#1}%
    \global\setbox\@currbox\copy\@marbox
    \@xympar}
\makeatother

% Lesson cards
\include{definitions}
    % Cards drawing

% Figures
\usepackage{svg}
\svgsetup{inkscapepath={.svg-inkscape},
          inkscapelatex=false}
\graphicspath{{img/},}


% Hyperlinks
\usepackage[hidelinks]{hyperref}
\newcommand{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
\usepackage[italian]{cleveref}
\crefname{section}{paragrafo}{paragrafi}
\Crefname{section}{Paragrafo}{Paragrafi}

% Misc
\usepackage[nopdftrailerid=true]{pdfprivacy}
    % Metadata removal and reproducible builds

\usepackage{ccicons}

\usepackage{qrcode}


\begin{document}
\title{Not The End}
\author{Claudio Pustorino}
\date{}
\publishers{Reimpaginato da bursa-pastoris}

\include{doc/colophon}

\maketitle

\tableofcontents

\part{Introduzione}
    \label{part:introduzione}
    \include{doc/benvenuto}

\part{Gli eroi di \nte{}}
    \include{doc/creare-eroe}
    \include{doc/alternative-creazione-eroe}

\part{Giocare l'\glo{eroe}}
    \label{part:giocare-eroe}
    \include{doc/affrontare-prove}
    \include{doc/altri-tipi-prove}
    \include{doc/uscire-scena-tornare}

\part{Far evolvere l'\glo{eroe}}
    \label{part:evolvere-eroe}
    \include{doc/evolvere-eroe}
    \include{doc/alternative-evoluzione}

\part{Affrontare la \glo{fine}}
    \label{part:affrontare-fine}
    \include{doc/non-fine}

\part{Narrare le \glo{storie}}
    \label{part:narrare-storie}
    \include{doc/compiti-narratore}
    \include{doc/narrare-prove}
    \include{doc/sfide}
    \include{doc/ritmo-sessioni}

\part{\glo{Ambientazioni}}
    \label{part:ambientazioni}
    \include{doc/creare-ambientazioni}

\appendix
\part{Esempi di \glo{ambientazione}}
    \label{part:esempi-ambientazione}
    \include{doc/koeniger-akademie}
    \include{doc/sinkapore}
    \include{doc/knights-round}
    \include{doc/red-creek}
    \include{doc/tavola-rotonda}

\part{Materiale finale}
    \include{doc/ringraziamenti}
    \include{doc/materiali-gioco}

\include{doc/quarta-copertina}

\end{document}
