From e09a054148a30cd59c67d0bd0aca0e848286cc18 Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Sat, 31 Dec 2022 03:27:30 +0000
Subject: [PATCH] replace tabs with spaces

---
 docs.tex   |  74 +++----
 layout.sty | 622 ++++++++++++++++++++++++++---------------------------
 test.tex   |  48 ++---
 3 files changed, 372 insertions(+), 372 deletions(-)

diff --git a/docs.tex b/docs.tex
index 588d2670..44d51442 100644
--- a/docs.tex
+++ b/docs.tex
@@ -78,9 +78,9 @@ You can add things for these people to say with a {\tt\textbackslash begin\{spee
 
 \begin{speechtext}
 
-	``Would you tell me, please, which way I ought to go from here?''
+  ``Would you tell me, please, which way I ought to go from here?''
 
-	``That depends a good deal on where you want to get to.''
+  ``That depends a good deal on where you want to get to.''
 
 \end{speechtext}
 
@@ -91,22 +91,22 @@ This is a magical item.
 \begin{verbatim}
 
 \magicitem{Noodle of Death}% NAME
-	{Extinguish}% SPELL
-	{Divinity (FSM)}% PATH
-	{Instant}% DURATION
-	{Pocket Spell}% TYPE
-	{2}% Potency
-	{5}% MP
+  {Extinguish}% SPELL
+  {Divinity (FSM)}% PATH
+  {Instant}% DURATION
+  {Pocket Spell}% TYPE
+  {2}% Potency
+  {5}% MP
 
 \end{verbatim}
 
 \magicitem{Noodle of Death}% NAME
-	{Extinguish}% SPELL
-	{Divinity (FSM)}% PATH
-	{Instant}% DURATION
-	{Pocket Spell}% TYPE
-	{2}% Potency
-	{5}% MP
+  {Extinguish}% SPELL
+  {Divinity (FSM)}% PATH
+  {Instant}% DURATION
+  {Pocket Spell}% TYPE
+  {2}% Potency
+  {5}% MP
 
 \subsection{Encounters}
 
@@ -114,29 +114,29 @@ Make encounter tables like this:
 
 \begin{verbatim}
 
-	\begin{encounters}{Wonderland}
+  \begin{encounters}{Wonderland}
 
-		Fields & Gardens & Results \\\hline
+    Fields & Gardens & Results \\\hline
 
-		\li & Doormouse \\
-		\li & Dodo \\
-		\li \lii Unicorn \\
-		\li \lii Red Queen \\
-		& \lii Black Queen \\
-		& \lii Green Queen \\
+    \li & Doormouse \\
+    \li & Dodo \\
+    \li \lii Unicorn \\
+    \li \lii Red Queen \\
+    & \lii Black Queen \\
+    & \lii Green Queen \\
 
 \end{verbatim}
 
 \begin{encounters}{Wonderland}
 
-	Fields & Gardens & Results \\\hline
+  Fields & Gardens & Results \\\hline
 
-	\li & Doormouse \\
-	\li & Dodo \\
-	\li \lii Unicorn \\
-	\li \lii Red Queen \\
-	& \lii Black Queen \\
-	& \lii Green Queen \\
+  \li & Doormouse \\
+  \li & Dodo \\
+  \li \lii Unicorn \\
+  \li \lii Red Queen \\
+  & \lii Black Queen \\
+  & \lii Green Queen \\
 
 
 \end{encounters}
@@ -146,25 +146,25 @@ And charts about roll successes like this:
 \begin{verbatim}
 
 
-	\begin{rollchart}
+  \begin{rollchart}
 
-		Roll & Result \\\hline
+    Roll & Result \\\hline
 
-		12 & Success \\
+    12 & Success \\
 
-		11 & Failure \\
+    11 & Failure \\
 
-	\end{rollchart}
+  \end{rollchart}
 
 \end{verbatim}
 
 \begin{rollchart}
 
-	Roll & Result \\\hline
+  Roll & Result \\\hline
 
-	12 & Success \\
+  12 & Success \\
 
-	11 & Failure \\
+  11 & Failure \\
 
 \end{rollchart}
 
diff --git a/layout.sty b/layout.sty
index 7312eeb0..1a4c93a2 100644
--- a/layout.sty
+++ b/layout.sty
@@ -12,7 +12,7 @@
 \RequirePackage{dingbat} % for curly section symbols
 \RequirePackage{appendix}
 \RequirePackage{geometry} % changes page borders
-	\geometry{margin=50pt}
+  \geometry{margin=50pt}
 \RequirePackage[
   scale=1,
   angle=0,
@@ -21,7 +21,7 @@
 ]{background}% for fancy borders
 \RequirePackage{svg}
 \RequirePackage{alltt}
-	\svgsetup{width=\textwidth}
+  \svgsetup{width=\textwidth}
 \RequirePackage{tabularx}
 \RequirePackage{wrapfig}
 \RequirePackage{float}
@@ -30,15 +30,15 @@
 \RequirePackage{makeidx}
 \RequirePackage[english]{babel}
 \RequirePackage{multicol}
-	\raggedcolumns
+  \raggedcolumns
 \RequirePackage{graphicx}
 \RequirePackage{etoolbox}
 \RequirePackage{titlesec,titletoc}
 \RequirePackage{needspace}
 \RequirePackage{tikz}
-	\usetikzlibrary{calc,mindmap,trees}% calc for fancy borders
-	\usetikzlibrary{intersections}% for very fancy borders with intersecting lines
-	\usetikzlibrary{shapes.misc}% for very fancy \section
+  \usetikzlibrary{calc,mindmap,trees}% calc for fancy borders
+  \usetikzlibrary{intersections}% for very fancy borders with intersecting lines
+  \usetikzlibrary{shapes.misc}% for very fancy \section
 \RequirePackage{pifont}
 \RequirePackage{colortbl}
 \RequirePackage[poster]{tcolorbox}
@@ -54,58 +54,58 @@
 \setcounter{pageDarkness}{20}
 
 \newcommand\pageSideColor{%
-	black!\arabic{pageDarkness}%
+  black!\arabic{pageDarkness}%
 }
 
 \newtoggle{sideTab}
 \settoggle{sideTab}{true}
 
 \newcommand\ChapFrame{%
-	\AddEverypageHook{%
-		\iftoggle{sideTab}%
-		{
-		\ifodd\value{page}
-			\backgroundsetup{contents={%
-				\begin{tikzpicture}[overlay,remember picture]
-					\node[
-						fill=\pageSideColor,
-						inner sep=5pt,
-						rectangle,
-						text width=1.2cm,
-						text height=4.33cm,
-						align=center,
-						anchor=north east
-					]
-			 		at ($ (current page.north east) + (-0cm,-2*\thechapshift cm) $)
-			 		{\rotatebox{90}{\hspace*{.3cm}\parbox[c][1.5cm][t]{3.4cm}{%
-			 		\raggedright\textcolor{white}{\scshape\rightmark}}}};
-				\end{tikzpicture}%
-			}%
-		}
-		\else
-			\backgroundsetup{contents={%
-				\begin{tikzpicture}[overlay,remember picture]
-				\node[
-					fill=\pageSideColor,
-					inner sep=5pt,
-					rectangle,
-					text width=1.2cm,
-					text height=4.33cm,
-					align=center,
-					anchor=north west
-				]
-				at ($ (current page.north west) + (-0cm,-2*\thechapshift cm) $)
-				{\rotatebox{90}{\hspace*{.3cm}\parbox[c][1.5cm][t]{3.4cm}{%
-					\raggedright\textcolor{white}{\scshape\leftmark}}}};
-				\end{tikzpicture}%
-			}%
-		}
-		\fi
-		}
-		{}%
-	\BgMaterial
-	}%
-	\stepcounter{chapshift}%
+  \AddEverypageHook{%
+    \iftoggle{sideTab}%
+    {
+    \ifodd\value{page}
+      \backgroundsetup{contents={%
+        \begin{tikzpicture}[overlay,remember picture]
+          \node[
+            fill=\pageSideColor,
+            inner sep=5pt,
+            rectangle,
+            text width=1.2cm,
+            text height=4.33cm,
+            align=center,
+            anchor=north east
+          ]
+           at ($ (current page.north east) + (-0cm,-2*\thechapshift cm) $)
+           {\rotatebox{90}{\hspace*{.3cm}\parbox[c][1.5cm][t]{3.4cm}{%
+           \raggedright\textcolor{white}{\scshape\rightmark}}}};
+        \end{tikzpicture}%
+      }%
+    }
+    \else
+      \backgroundsetup{contents={%
+        \begin{tikzpicture}[overlay,remember picture]
+        \node[
+          fill=\pageSideColor,
+          inner sep=5pt,
+          rectangle,
+          text width=1.2cm,
+          text height=4.33cm,
+          align=center,
+          anchor=north west
+        ]
+        at ($ (current page.north west) + (-0cm,-2*\thechapshift cm) $)
+        {\rotatebox{90}{\hspace*{.3cm}\parbox[c][1.5cm][t]{3.4cm}{%
+          \raggedright\textcolor{white}{\scshape\leftmark}}}};
+        \end{tikzpicture}%
+      }%
+    }
+    \fi
+    }
+    {}%
+  \BgMaterial
+  }%
+  \stepcounter{chapshift}%
 }
 
 % redefinition of \chaptermark to contain only the title
@@ -122,18 +122,18 @@ bookmarks=true]%
 %%%%%%%%%% Allow for external referencing
 
 \newcommand*{\externalReferent}[1]{
-	\newtoggle{#1}
-	\IfFileExists{../#1/main.aux}{
-		\makeatletter
-		\@addtofilelist{../#1/main.tex}
-		\@addtofilelist{../#1/main.aux}%
-		\makeatother
-		\externaldocument{../#1/main}%
-		\settoggle{#1}{true}
-	}%
-	{\typeout{No file #1.}
-	\settoggle{#1}{false}
-	}
+  \newtoggle{#1}
+  \IfFileExists{../#1/main.aux}{
+    \makeatletter
+    \@addtofilelist{../#1/main.tex}
+    \@addtofilelist{../#1/main.aux}%
+    \makeatother
+    \externaldocument{../#1/main}%
+    \settoggle{#1}{true}
+  }%
+  {\typeout{No file #1.}
+  \settoggle{#1}{false}
+  }
 }
 
 
@@ -167,7 +167,7 @@ bookmarks=true]%
 }
 % and make repeating function
 \newcommand{\Repeat}[1]{%
-	\expandafter\@Repeat\expandafter{\the\numexpr #1\relax}%
+  \expandafter\@Repeat\expandafter{\the\numexpr #1\relax}%
 }
 
 \def\@Repeat#1{%
@@ -184,8 +184,8 @@ bookmarks=true]%
 
 
 \newcommand{\chapnumfont}{
-	\fontsize{50}{0}
-	\selectfont
+  \fontsize{50}{0}
+  \selectfont
 }
 
 % change bullet points
@@ -204,75 +204,75 @@ bookmarks=true]%
 \newcommand{\headingtype}{CHAPTER}
 
 \newcommand{\pic}[1]{
-	\needspace{4cm}
-	\noindent%
-	\IfFileExists{images/#1.svg}{%
-		\noindent\includesvg[width=\linewidth]{images/#1}
-	}{%
-		\includegraphics[width=\linewidth]{images/#1.jpg}
-	}
+  \needspace{4cm}
+  \noindent%
+  \IfFileExists{images/#1.svg}{%
+    \noindent\includesvg[width=\linewidth]{images/#1}
+  }{%
+    \includegraphics[width=\linewidth]{images/#1.jpg}
+  }
   \label{#1}
 }
 
 \newcommand{\sidepic}[3][5]{
-	\needspace{4cm}
-	\begin{wrapfigure}{R}{.#1\linewidth}
-	\noindent%
-	\IfFileExists{images/#2.svg}{%
-		\includesvg[width=\linewidth]{images/#2}
-	}{
-		\includegraphics[width=\linewidth]{images/#2.jpg}
-	}
-	#3
-	\end{wrapfigure}
+  \needspace{4cm}
+  \begin{wrapfigure}{R}{.#1\linewidth}
+  \noindent%
+  \IfFileExists{images/#2.svg}{%
+    \includesvg[width=\linewidth]{images/#2}
+  }{
+    \includegraphics[width=\linewidth]{images/#2.jpg}
+  }
+  #3
+  \end{wrapfigure}
 }
 
 \newcommand{\toppic}[2]{
-	\begin{figure*}[t!]
-		\IfFileExists{images/#1.svg}{
-			\includesvg[width=\textwidth]{images/#1}
-		}{
-			\includegraphics[width=\textwidth]{images/#1.jpg}
-		}
-		#2
-	\end{figure*}
+  \begin{figure*}[t!]
+    \IfFileExists{images/#1.svg}{
+      \includesvg[width=\textwidth]{images/#1}
+    }{
+      \includegraphics[width=\textwidth]{images/#1.jpg}
+    }
+    #2
+  \end{figure*}
 }
 
 \newcommand{\toppicBorder}[2]{
-	\begin{figure*}[t!]
-		\begin{tcolorbox}[before upper={\parindent0pt},colframe=black,colback=gray]
-		\IfFileExists{images/#1.svg}{
-			\includesvg[width=\textwidth]{images/#1}
-		}{
-			\includegraphics[width=\textwidth]{images/#1.jpg}
-		}
-		#2
-		\end{tcolorbox}
-	\end{figure*}
+  \begin{figure*}[t!]
+    \begin{tcolorbox}[before upper={\parindent0pt},colframe=black,colback=gray]
+    \IfFileExists{images/#1.svg}{
+      \includesvg[width=\textwidth]{images/#1}
+    }{
+      \includegraphics[width=\textwidth]{images/#1.jpg}
+    }
+    #2
+    \end{tcolorbox}
+  \end{figure*}
 }
 
 \newcommand{\bottompic}[2]{
-	\begin{figure*}[b!]
-		\IfFileExists{images/#1.svg}{
-			\includesvg[width=\textwidth]{images/#1}
-		}{
-			\includegraphics[width=\textwidth]{images/#1.jpg}
-		}
-		#2
-	\end{figure*}
+  \begin{figure*}[b!]
+    \IfFileExists{images/#1.svg}{
+      \includesvg[width=\textwidth]{images/#1}
+    }{
+      \includegraphics[width=\textwidth]{images/#1.jpg}
+    }
+    #2
+  \end{figure*}
 }
 
 \newcommand{\bottompicBorder}[2]{
-	\begin{figure*}[b!]
-		\begin{tcolorbox}[before upper={\parindent0pt},colframe=black,colback=gray]
-		\IfFileExists{images/#1.svg}{
-			\includesvg[width=\textwidth]{images/#1}
-		}{
-			\includegraphics[width=\textwidth]{images/#1.jpg}
-		}
-		#2
-		\end{tcolorbox}
-	\end{figure*}
+  \begin{figure*}[b!]
+    \begin{tcolorbox}[before upper={\parindent0pt},colframe=black,colback=gray]
+    \IfFileExists{images/#1.svg}{
+      \includesvg[width=\textwidth]{images/#1}
+    }{
+      \includegraphics[width=\textwidth]{images/#1.jpg}
+    }
+    #2
+    \end{tcolorbox}
+  \end{figure*}
 }
 
 % sidebling
@@ -440,15 +440,15 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 \newtcolorbox{boxtext}[1][]{ornamented,colback=white,fonttitle=\scshape, #1}
 
 \newcommand{\sidebox}[2][23]{
-	\iftoggle{verbose}{
+  \iftoggle{verbose}{
     \needspace{4em}
-		\begin{wrapfigure}{R}{.#1\textwidth} 
-		#2
-		\end{wrapfigure}%
-	}{
-		#2
-		
-	}%
+    \begin{wrapfigure}{R}{.#1\textwidth} 
+    #2
+    \end{wrapfigure}%
+  }{
+    #2
+    
+  }%
 }
 
 % Chapter Heading Color
@@ -457,32 +457,32 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 %%%%% Section Formatting %%%%%
 
 \newcommand{\frontpage}[3]{
-	\iftoggle{verbose}{
-	\begin{titlepage}
-		\centering
-		\vspace{2cm}
-		{\scshape\Huge\bfseries #1\par}
-		\vspace{2cm}
-		\includegraphics[width=0.6\textwidth]{#3}\par\vspace{1cm}
-		{\Large #2\par}
-		\vspace{1.5cm}
-		{\large Last edited \today\par}
-	
-	\end{titlepage}
-	\cleardoublepage
-	}{}
+  \iftoggle{verbose}{
+  \begin{titlepage}
+    \centering
+    \vspace{2cm}
+    {\scshape\Huge\bfseries #1\par}
+    \vspace{2cm}
+    \includegraphics[width=0.6\textwidth]{#3}\par\vspace{1cm}
+    {\Large #2\par}
+    \vspace{1.5cm}
+    {\large Last edited \today\par}
+  
+  \end{titlepage}
+  \cleardoublepage
+  }{}
 }
 
 \titleformat{\chapter}[display]
 {\bfseries}
 {%
-	\ChapFrame
-	\ifnum\value{pageDarkness}<80
-		\addtocounter{pageDarkness}{7}
-	\else
-		\colorlet{chapnumcol}{black!40}
-	\fi
-	\hspace*{-1.5em}
+  \ChapFrame
+  \ifnum\value{pageDarkness}<80
+    \addtocounter{pageDarkness}{7}
+  \else
+    \colorlet{chapnumcol}{black!40}
+  \fi
+  \hspace*{-1.5em}
 \begin{tikzpicture}
   \node[minimum width=\linewidth+3em, text=white, fill=\pageSideColor, inner sep=1, outer sep=0, anchor=south] (rectinit) {\Huge \headingtype};
  \node[minimum width=.75\textwidth, text=white, inner sep=3, outer sep=0, anchor=south west, text width=.75\textwidth, align=right] at (rectinit.south west) (chapname) {};
@@ -497,7 +497,7 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
     \fill [\pageSideColor] (2.5cm,-1ex) rectangle (\linewidth+1.5em,2.5ex);
     \node [
         fill=white,
-	text= \pageSideColor,
+  text= \pageSideColor,
         anchor= base east,
         rounded rectangle,
         minimum height=3.5ex] at (2.9cm,0) {
@@ -517,11 +517,11 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 
 %%%%% Character Sheet Tracker
 
-		\newcounter{track}
-		\setcounter{track}{18}
-		\newcommand{\tracker}{\center\noindent\arabic{track}\addtocounter{track}{-1}\vspace{.54cm}
+    \newcounter{track}
+    \setcounter{track}{18}
+    \newcommand{\tracker}{\center\noindent\arabic{track}\addtocounter{track}{-1}\vspace{.54cm}
 
-		}
+    }
 
 %%%%% NPC Names
 
@@ -558,35 +558,35 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 \settoggle{team}{false}
 
 \iftoggle{verbose}{
-	\setcounter{tocdepth}{1}
-	\setcounter{secnumdepth}{1}
+  \setcounter{tocdepth}{1}
+  \setcounter{secnumdepth}{1}
 }
 
 \newcounter{r4}
 \setcounter{r4}{\day}
 \addtocounter{r4}{1}
-	\whileboolexpr{
-		test {\ifnumcomp{\value{r4}}{>}{4}}
-	}
-	{\addtocounter{r4}{-3}}
+  \whileboolexpr{
+    test {\ifnumcomp{\value{r4}}{>}{4}}
+  }
+  {\addtocounter{r4}{-3}}
 
 \newcounter{r2}
 \setcounter{r2}{\value{r4}}
 \newcounter{r2b}
-	\setcounter{r2b}{\value{r2}}
-	\addtocounter{r2b}{-1}
+  \setcounter{r2b}{\value{r2}}
+  \addtocounter{r2b}{-1}
 \newcounter{r2c}
 \setcounter{r2c}{2}
 \newcounter{r3}
 \setcounter{r3}{\month}
-	\divide\value{r3} by 4
+  \divide\value{r3} by 4
 \newcounter{r3b}
-	\setcounter{r3b}{\value{r4}}
-	\addtocounter{r3b}{-1}
+  \setcounter{r3b}{\value{r4}}
+  \addtocounter{r3b}{-1}
 \newcounter{r3c}
-	\setcounter{r3c}{0}
+  \setcounter{r3c}{0}
 \newcounter{r4b}
-	\setcounter{r4b}{\day}
+  \setcounter{r4b}{\day}
 \newcounter{r12}
 \setcounter{r12}{\month}
 \newcounter{enc}
@@ -608,52 +608,52 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 \newcommand{\currentsphere}{magic}
 
 \newcommand{\sphere}[1]{%
-	\setcounter{spelllevel}{0}%
-	\renewcommand{\currentsphere}{#1}%
-	\index{#1}%
-	\section{\currentsphere}
+  \setcounter{spelllevel}{0}%
+  \renewcommand{\currentsphere}{#1}%
+  \index{#1}%
+  \section{\currentsphere}
 }%
 
 \newcommand{\spelllevel}{%
-	\needspace{10em}
-	\addtocounter{spelllevel}{1}%
-	\subsection{\currentsphere~ Level \arabic{spelllevel}}%
+  \needspace{10em}
+  \addtocounter{spelllevel}{1}%
+  \subsection{\currentsphere~ Level \arabic{spelllevel}}%
 }
 
 \newcommand{\enhancement}[3]{%
-	\paragraph[(#1) #2: #3]{(#1) Enhancement -- #2:}%
-	\index{Enhancement!#2}%
+  \paragraph[(#1) #2: #3]{(#1) Enhancement -- #2:}%
+  \index{Enhancement!#2}%
 }
 
 \newcommand{\magicitem}[7]{%
-	\vspace{2em}\needspace{4em}\noindent\textbf{#1}%
-	\index{Magical Item!#1}
+  \vspace{2em}\needspace{4em}\noindent\textbf{#1}%
+  \index{Magical Item!#1}
 
-	\noindent
-	\textit{Spells: #2, }%
-	\textit{Path: #3, }%
-	\textit{Duration: #4, }%
-	\textit{Type: #5, }%
-	\textit{Potency: +#6, }%
-	\textit{MP: #7}%
-	% Type can be 'Pocket Spell', 'Talisman', or 'Artefact'.
-	\needspace{2em}%
+  \noindent
+  \textit{Spells: #2, }%
+  \textit{Path: #3, }%
+  \textit{Duration: #4, }%
+  \textit{Type: #5, }%
+  \textit{Potency: +#6, }%
+  \textit{MP: #7}%
+  % Type can be 'Pocket Spell', 'Talisman', or 'Artefact'.
+  \needspace{2em}%
 }
 
 \newcommand{\manalake}[8]{
-	\subsection{#1 (Level #8)}
+  \subsection{#1 (Level #8)}
 
-	\textit{Spells: #2, }\textit{Path: #3, }\textit{Duration: #4, }\textit{Type: #5, }\textit{Potence: #6, }\textit{#7 MP}% Type can be 'pocket spell', 'magical item', or 'artefact'.
-	\index{Mana Lakes!#1}
-	\vspace{.3em}
+  \textit{Spells: #2, }\textit{Path: #3, }\textit{Duration: #4, }\textit{Type: #5, }\textit{Potence: #6, }\textit{#7 MP}% Type can be 'pocket spell', 'magical item', or 'artefact'.
+  \index{Mana Lakes!#1}
+  \vspace{.3em}
 }
 
 \newcommand{\spell}[4]{
-	\subsubsection[#1: #4]{#1}
+  \subsubsection[#1: #4]{#1}
 
-	{\it Type: #2, Skill: #3}
+  {\it Type: #2, Skill: #3}
 
-	\noindent%
+  \noindent%
 }
 
 % Toggles for knacks
@@ -661,7 +661,7 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 %%%%%%%%%%%%%%%%%%%% Environments %%%%%%%%%%%%%%%%%%%%
 
 \newenvironment{speechtext}{
-	\begin{boxtext}\it
+  \begin{boxtext}\it
 \begin{quotation}\noindent}%
 {\end{quotation}
 \end{boxtext}%
@@ -687,76 +687,76 @@ Roll & Result \\
 \it}{\normalfont\vspace{2em}}
 
 \newtcolorbox{xpchart}[1]{tabularx={l|X},adjusted title=XP Rewards for #1,
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	code={\rowcolors{3}{}{gray!10}}
-	}
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  code={\rowcolors{3}{}{gray!10}}
+  }
 
 % this shows encounters, and the two counters below show the encounter number
 
 \newtcolorbox[use counter=enc, use counter=list]{encounters}[1]{
-	ornamented,
-	adjusted title=Encounters in #1,
-	tabularx={XXp{.6\textwidth}},
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	code={\rowcolors{2}{}{gray!10}\setcounter{enc}{19}\setcounter{list}{18}}}
+  ornamented,
+  adjusted title=Encounters in #1,
+  tabularx={XXp{.6\textwidth}},
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  code={\rowcolors{2}{}{gray!10}\setcounter{enc}{19}\setcounter{list}{18}}}
 
 \newcommand{\li}{\addtocounter{enc}{-1}\arabic{enc}&}
 \newcommand{\lii}{\addtocounter{list}{-1}\arabic{list}&}
 
 \newtcolorbox{boxtable}[1][cX]{
-	tabularx={#1},
-	top=10pt,
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	code={\rowcolors{2}{}{gray!10}\needspace{2em}}
-	}
+  tabularx={#1},
+  top=10pt,
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  code={\rowcolors{2}{}{gray!10}\needspace{2em}}
+  }
 
 \newtcolorbox{nametable}[2][cX]{
-	tabularx={#1},
-	top=10pt,
-	adjusted title=#2,
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	code={\rowcolors{2}{}{gray!10}\needspace{1em}}
-	}
+  tabularx={#1},
+  top=10pt,
+  adjusted title=#2,
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  code={\rowcolors{2}{}{gray!10}\needspace{1em}}
+  }
 
 \newtcolorbox{rollchart}{
-	tabularx={cX},
-	top=10pt,
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	code={\rowcolors{2}{}{gray!10}\needspace{2em}}
-	}
+  tabularx={cX},
+  top=10pt,
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  code={\rowcolors{2}{}{gray!10}\needspace{2em}}
+  }
 
 \newtcolorbox{xpbox}[1]{
-	tabularx={lX},
-	bottom=10pt,
-	left=3pt,
-	right=3pt,
-	top=10pt,
-	code={\rowcolors{2}{}{gray!10}},
-	equal height group=#1
-	}
+  tabularx={lX},
+  bottom=10pt,
+  left=3pt,
+  right=3pt,
+  top=10pt,
+  code={\rowcolors{2}{}{gray!10}},
+  equal height group=#1
+  }
 
 
 %%%%%%%%%%%%%%%%%%% COMMANDS %%%%%%%%%%%%%%%%%%%%
 
 \newcommand{\story}[2]{%
-	\subsubsection{#2}
-	Cost: #1\par\noindent
+  \subsubsection{#2}
+  Cost: #1\par\noindent
 }
 
 \newcommand{\best}[2][\C]{
-	\npc{#1}{#2}
-	\subsubsection{#2}
-	\index{Antagonists!#2}
+  \npc{#1}{#2}
+  \subsubsection{#2}
+  \index{Antagonists!#2}
 }
 
 \newcounter{random}
@@ -765,84 +765,84 @@ Roll & Result \\
 \setcounter{increment}{1}
 
 \newcommand{\random}{
-	\addtocounter{random}{\value{page}}
-	\multiply\value{random} by \value{chapter}\addtocounter{random}{\value{increment}}
-	\whileboolexpr{
-		test {\ifnumcomp{\value{random}}{>}{100}}
-	}
-	{\addtocounter{random}{-100}}
-	\whileboolexpr{
-		test {\ifnumcomp{\value{random}}{>}{10}}
-	}
-	{\addtocounter{random}{-10}}
-	\addtocounter{increment}{1}
+  \addtocounter{random}{\value{page}}
+  \multiply\value{random} by \value{chapter}\addtocounter{random}{\value{increment}}
+  \whileboolexpr{
+    test {\ifnumcomp{\value{random}}{>}{100}}
+  }
+  {\addtocounter{random}{-100}}
+  \whileboolexpr{
+    test {\ifnumcomp{\value{random}}{>}{10}}
+  }
+  {\addtocounter{random}{-10}}
+  \addtocounter{increment}{1}
 }
 
 \newcommand{\randomtwo}{%
-	\ifnumcomp{\value{r2}}{>}{1}{\setcounter{r2}{1}}{\addtocounter{r2}{1}}%
+  \ifnumcomp{\value{r2}}{>}{1}{\setcounter{r2}{1}}{\addtocounter{r2}{1}}%
 \setcounter{enc}{\value{r2}}%
 }
 
 \newcommand{\randomtwoB}{
-	\ifodd\value{r3b}\setcounter{r2b}{1}\else\setcounter{r2b}{2}\fi%
+  \ifodd\value{r3b}\setcounter{r2b}{1}\else\setcounter{r2b}{2}\fi%
 }
 
 \newcommand{\randomtwoC}{
-	\ifnum\value{r2c}>1%
-	\setcounter{r2c}{1}\else%
-	\addtocounter{r2c}{1}%
-	\fi%
+  \ifnum\value{r2c}>1%
+  \setcounter{r2c}{1}\else%
+  \addtocounter{r2c}{1}%
+  \fi%
 }
 
 \newcommand{\randomthree}{%
-	\ifnumcomp{\value{r3}}{>}{2}{\setcounter{r3}{1}}{\addtocounter{r3}{1}}%
-	\setcounter{age}{\value{r3}}%
-	\ifnum\value{r3}<1\setcounter{r3}{2}\fi%
+  \ifnumcomp{\value{r3}}{>}{2}{\setcounter{r3}{1}}{\addtocounter{r3}{1}}%
+  \setcounter{age}{\value{r3}}%
+  \ifnum\value{r3}<1\setcounter{r3}{2}\fi%
 }
 
 \newcommand{\randomthreeB}{%
-	\ifnum\value{r3b}>2%
-		\setcounter{r3b}{1}%
-	\else%
-		\addtocounter{r3b}{1}%
-	\fi%
-	\ifnum\value{r3b}<1%
-		\setcounter{r3b}{3}
-	\fi%
+  \ifnum\value{r3b}>2%
+    \setcounter{r3b}{1}%
+  \else%
+    \addtocounter{r3b}{1}%
+  \fi%
+  \ifnum\value{r3b}<1%
+    \setcounter{r3b}{3}
+  \fi%
 }
 
 \newcommand{\randomthreeC}{
-	\ifnum\value{r3c}>3%
-	\setcounter{r3c}{1}\else%
-	\addtocounter{r3c}{1}%
-	\fi%
+  \ifnum\value{r3c}>3%
+  \setcounter{r3c}{1}\else%
+  \addtocounter{r3c}{1}%
+  \fi%
 }
 
 \newcommand{\randomfour}{%
-	\ifnumcomp{\value{r4}}{>}{3}{\setcounter{r4}{1}}{\addtocounter{r4}{1}}%
-	\ifnumcomp{\value{r4}}{<}{1}{\setcounter{r4}{1}}{}
-	\setcounter{track}{\value{r4}}%
+  \ifnumcomp{\value{r4}}{>}{3}{\setcounter{r4}{1}}{\addtocounter{r4}{1}}%
+  \ifnumcomp{\value{r4}}{<}{1}{\setcounter{r4}{1}}{}
+  \setcounter{track}{\value{r4}}%
 }
 
 \newcommand{\randomfourB}{%
-	\ifnum\value{r4b}>3\setcounter{r4b}{1}%
-	\else%
-	\addtocounter{r4b}{1}%
-	\fi%
+  \ifnum\value{r4b}>3\setcounter{r4b}{1}%
+  \else%
+  \addtocounter{r4b}{1}%
+  \fi%
 }
 
 \newcommand{\randomdozen}{%
-	\ifnum\value{r12}>12\setcounter{r12}{2}\fi%
-	\ifnum\value{r12}<4\setcounter{r12}{2}\fi%
-	\ifnum\value{age}>0\addtocounter{r12}{\value{age}}\else\ifnum\value{r4}>0\addtocounter{r12}{\value{r4}}\else\addtocounter{r12}{3}\fi\fi%
+  \ifnum\value{r12}>12\setcounter{r12}{2}\fi%
+  \ifnum\value{r12}<4\setcounter{r12}{2}\fi%
+  \ifnum\value{age}>0\addtocounter{r12}{\value{age}}\else\ifnum\value{r4}>0\addtocounter{r12}{\value{r4}}\else\addtocounter{r12}{3}\fi\fi%
 }
 
 \newcommand{\mapentry}[1]{
-	\needspace{2em}
-	\addtocounter{list}{1}
-	\subsubsection[#1]{
-		\arabic{list}: #1}
-	}
+  \needspace{2em}
+  \addtocounter{list}{1}
+  \subsubsection[#1]{
+    \arabic{list}: #1}
+  }
 
 %%%%% Side Quests
 
@@ -857,25 +857,25 @@ Roll & Result \\
 % Change the tocdepth from 2 to 3 in order to output a miniature table of contents on all side quests
 \newcommand{\sqminitoc}{
 
-	\begin{figure*}[t]
-	
-	\begin{tcolorbox}[ornamented,adjusted title={Summary: \sqName}]
-	\vspace{-1em}
-	\printcontents[sq]{l}{2}{\setcounter{tocdepth}{3}}
-	
-	\end{tcolorbox}
-	
-	\end{figure*}
+  \begin{figure*}[t]
+  
+  \begin{tcolorbox}[ornamented,adjusted title={Summary: \sqName}]
+  \vspace{-1em}
+  \printcontents[sq]{l}{2}{\setcounter{tocdepth}{3}}
+  
+  \end{tcolorbox}
+  
+  \end{figure*}
 }
 
 \newcommand{\sqName}{}
 
 \newcommand{\sidequest}[1]{%
-	\renewcommand{\sqName}{#1}
-	\resumecontents[\sqarea]
-	\subsection{\sqName}
-	\stopcontents[\sqarea]
-	\settoggle{firstsq}{true}
+  \renewcommand{\sqName}{#1}
+  \resumecontents[\sqarea]
+  \subsection{\sqName}
+  \stopcontents[\sqarea]
+  \settoggle{firstsq}{true}
 }
 
 \newcommand{\sqpart}[3]{\resumecontents[#1]\subsubsection[\iftoggle{firstsq}{\CheckedBox}{\Square} #2 -- #3]{(#1) #2}\stopcontents[#1]\settoggle{firstsq}{false}}
@@ -885,15 +885,15 @@ Roll & Result \\
 \newcommand{\trait}[1]{
 \vspace{.2cm} #1 \line(1,0){30}
 
-	\begin{tabular}{p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}}
+  \begin{tabular}{p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}p{0em}}
 
-		\ding{108} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109}  \\
-		\ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}  \\
-	\end{tabular}
+    \ding{108} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109}  \\
+    \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}  \\
+  \end{tabular}
 
 }
 
-\newcommand{\shortline}{\line(1,0){22}}	
+\newcommand{\shortline}{\line(1,0){22}}  
 \newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}}
 \newcommand{\vlongline}{\line(1,0){100}\hspace{0.8cm}}
 \newcommand{\writeline}{\hrulefill}
@@ -901,13 +901,13 @@ Roll & Result \\
 \newcommand{\fiveboxes}{\ding{111}\ding{111}\ding{111}\ding{111}\ding{111}}
 \newcommand{\threeboxes}{\ding{111}\ding{111}\ding{111}}
 \newcommand{\threecircles}{\ding{109}\ding{109}\ding{109}}
-\newcommand{\tenboxes}{	\ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}  \\}
+\newcommand{\tenboxes}{  \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}  \\}
 \newcommand{\tencircles}{\ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109}  \\}
 \newcommand{\attributecircles}{\ding{175}\ding{174}\ding{173}\ding{172}{\Large\ding{109}}\ding{172}\ding{173}\ding{174}\ding{175}}
 \newcommand{\Split}{
-	\line(1,0){120}
+  \line(1,0){120}
 
-	}
+  }
 \newcommand{\skill}[1]{#1 \hrulefill & \ding{109} & \ding{109} & \ding{109} \\
 }
 
diff --git a/test.tex b/test.tex
index 895f73a4..05b8bb7c 100644
--- a/test.tex
+++ b/test.tex
@@ -33,34 +33,34 @@ This is a test document, to make sure new code works before sticking it in a pro
 
 \begin{speechtext}
 
-	``Would you tell me, please, which way I ought to go from here?''
+  ``Would you tell me, please, which way I ought to go from here?''
 
-	``That depends a good deal on where you want to get to.''
+  ``That depends a good deal on where you want to get to.''
 
 \end{speechtext}
 
 \subsection{And now for something completely different}
 
 \magicitem{Noodle of Death}% NAME
-	{Extinguish}% SPELL
-	{Divinity (FSM)}% PATH
-	{Instant}% DURATION
-	{Pocket Spell}% TYPE
-	{2}% Potency
-	{5}% MP
+  {Extinguish}% SPELL
+  {Divinity (FSM)}% PATH
+  {Instant}% DURATION
+  {Pocket Spell}% TYPE
+  {2}% Potency
+  {5}% MP
 
 \subsection{Encounters}
 
 \begin{encounters}{Wonderland}
 
-	Fields & Gardens & Results \\\hline
+  Fields & Gardens & Results \\\hline
 
-	\li & Doormouse \\
-	\li & Dodo \\
-	\li \lii Unicorn \\
-	\li \lii Red Queen \\
-	& \lii Black Queen \\
-	& \lii Green Queen \\
+  \li & Doormouse \\
+  \li & Dodo \\
+  \li \lii Unicorn \\
+  \li \lii Red Queen \\
+  & \lii Black Queen \\
+  & \lii Green Queen \\
 
 
 \end{encounters}
@@ -80,17 +80,17 @@ Roll & Result \\\hline
 \lipsum[7]
 
 \begin{xpbox}
-		Attribute Level & Cost \\\hline
+    Attribute Level & Cost \\\hline
 
-		Buy off negative & 5 \\
+    Buy off negative & 5 \\
 
-		+1 & 10 \\
+    +1 & 10 \\
 
-		+2 & 20 \\
+    +2 & 20 \\
 
-		+3 & 30 \\
+    +3 & 30 \\
 
-		+4 & 50 \\
+    +4 & 50 \\
 \end{xpbox}
 
 \subsection{And further more\ldots}
@@ -99,11 +99,11 @@ Roll & Result \\\hline
 
 \begin{xpchart}{FSM}
 
-	1 & Boiling Pasta. \\
+  1 & Boiling Pasta. \\
 
-	3 & Being a pirate. \\
+  3 & Being a pirate. \\
 
-	5 & Perfecting Meatballs. \\
+  5 & Perfecting Meatballs. \\
 
 \end{xpchart}
 
-- 
GitLab