Skip to content
Snippets Groups Projects
layout.sty 38 KiB
Newer Older
  • Learn to ignore specific revisions
  • \newtoggle{intro}
    \settoggle{intro}{true}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newtoggle{personality}
    \settoggle{personality}{false}
    
    
    \setcounter{tocdepth}{1}
    \setcounter{secnumdepth}{1}
    
    %%%%%%%%%%%%% Season Numbers %%%%%%%%%%%%%
    
    % We need these in seasons.sty
    \newcounter{cycle}
    \newcounter{temperature}
    
    
    
    %%%%%%%%%%%%%%%%%%%% RANDOM NUMBERS %%%%%%%%%%%%%%%%%%%%
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r4}
    \setcounter{r4}{\day}
    \addtocounter{r4}{1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \whileboolexpr{
        test {\ifnumcomp{\value{r4}}{>}{4}}
      }
      {\addtocounter{r4}{-3}}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \newcounter{r2}
    \setcounter{r2}{\value{r4}}
    \newcounter{r2b}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r2b}{\value{r2}}
      \addtocounter{r2b}{-1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r2c}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r2c}{2}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r3}
    \setcounter{r3}{\month}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \divide\value{r3} by 4
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r3b}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r3b}{\value{r4}}
      \addtocounter{r3b}{-1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r3c}
    
      \setcounter{r3c}{1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r4b}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r4b}{\day}
    
      \divide\value{r4b} by 7
      \stepcounter{r4b}
    
    \newcounter{r6}
      \setcounter{r6}{\month}
    \newcounter{r6b}
      \setcounter{r6b}{\month}
    
      \divide\value{r6b}by 2%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{rn4tn1}
      \setcounter{rn4tn1}{-3}
    
    \newcounter{rn1t0}
      \setcounter{rn1t0}{-1}
    \newcounter{r0t1}
      \setcounter{r0t1}{0}
    \newcounter{r2t3}
      \setcounter{r2t3}{2}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r2t4}
      \setcounter{r2t4}{2}
    
    \newcounter{r3t4}
      \setcounter{r3t4}{3}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{rn1t2}
      \setcounter{rn1t2}{0}
    
    \newcounter{rn3t3}
      \setcounter{rn3t3}{3}
    \newcounter{r4t5}
      \setcounter{r4t5}{4}
    
    \newcounter{r4t6}
      \setcounter{r4t6}{4}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{r12}
    \setcounter{r12}{\month}
    \newcounter{enc}
    \newcounter{list}
    
    \newcounter{age}
    \setcounter{age}{1}
    \newcounter{gold}
    \setcounter{gold}{\day}
    \setcounter{enc}{0}
    
    \newcounter{noAppearing}
      \setcounter{noAppearing}{1}
    
    \newcommand{\randomtwo}{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{r2}>1%
        \setcounter{r2}{1}%
      \else%
        \stepcounter{r2}%
      \fi%
      \setcounter{enc}{\value{r2}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\randomtwoB}{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifodd\value{r3}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \setcounter{r2b}{1}%
      \else%
        \setcounter{r2b}{2}%
      \fi%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\randomtwoC}{%
    
      \ifnum\value{r2c}>1%
    
        \setcounter{r2c}{1}%
      \else%
        \stepcounter{r2c}%
    
      \fi%
    }
    
    \newcommand{\randomthree}{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{r3}>2%
        \setcounter{r3}{1}%
      \fi%
      \ifnum\value{r3}<1%
        \setcounter{r3}{2}%
      \fi%
      \stepcounter{r3}%
    
      \setcounter{age}{\value{r3}}%
    }
    
    \newcommand{\randomthreeB}{%
    
      \ifnum\value{r3b}>2%
        \setcounter{r3b}{1}%
      \fi%
      \ifodd\value{r3}%
        \stepcounter{r3b}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\randomthreeC}{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r3c}{1}%
      \ifodd\value{r12}%
        \stepcounter{r3c}%
      \fi%
      \ifodd\value{r3}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r3c}%
    
      \fi%
    }
    
    \newcommand{\randomfour}{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{r4}>3%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \setcounter{r4}{0}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \else%
        \ifnum\value{r4}<1%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
          \setcounter{r4}{2}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \fi%
      \fi%
      \stepcounter{r4}%
    
      \setcounter{track}{\value{r4}}%
    }
    
    \newcommand{\randomfourB}{%
    
      \randomthreeB%
      \setcounter{r4b}{\value{r3b}}%
      \stepcounter{r4b}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\randomize{%
      \stepcounter{r2}%
      \stepcounter{r3}%
      \stepcounter{r4}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{rn4tn1}{\value{r4b}}%
      \addtocounter{rn4tn1}{-5}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{rn3t3}{\value{r3b}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifodd\value{r3}%
        \stepcounter{r2b}%
        \stepcounter{r3b}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r2t4}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r4t5}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \else%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \multiply\value{rn3t3} by -1%
        \addtocounter{rn3t3}{0}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r4t6}%
        \stepcounter{r0t1}%
        \stepcounter{rn1t0}
      \fi%
      \ifodd\value{r3b}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r2c}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r3t4}%
      \else%
        \stepcounter{r2t3}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \stepcounter{r4b}%
      \fi%
      \foreach\c in {r2,r2b,r2c}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        {\ifnum\value{\c}>2\setcounter{\c}{1}\stepcounter{r3c}\fi}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach\c in {r3,r3b,r3c}%
    
        {\ifnum\value{\c}>3\setcounter{\c}{1}\addtocounter{r6b}{-1}\fi}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach\c in {r4,r4b}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        {\ifnum\value{\c}>4\setcounter{\c}{1}\stepcounter{rn1t2}\fi}%
    
      \ifnum\value{r0t1}>1\setcounter{r0t1}{0}\fi%
      \ifnum\value{rn1t0}>0\setcounter{rn1t0}{-1}\fi%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{r2t3}>3\setcounter{r2t3}{2}\stepcounter{rn1t2}\fi%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{rn1t2}>2\setcounter{rn1t2}{-1}\fi%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \ifnum\value{r2t4}>4\setcounter{r2t4}{2}\fi%
    
      \ifnum\value{r3t4}>4\setcounter{r3t4}{3}\fi%
      \ifnum\value{r4t5}>5\setcounter{r4t5}{4}\fi%
    
      \ifnum\value{r4t6}>6\setcounter{r4t6}{4}\fi%
    
      \ifnum\value{r6b}<1\setcounter{r6b}{6}\fi%
      \setcounter{r6}{\value{rn1t2}}%
      \addtocounter{r6}{\value{r2t4}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \setcounter{r12}{\value{r6}}%
      \addtocounter{r12}{\value{r6b}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    }
    
    \newcommand\set[2]{%
      \ifltxcounter{#2}{\setcounter{#1}{\value{#2}}}{\setcounter{#1}{#2}}%
    }
    
    \newcounter{stackedNo}
    \newcommand\stack[2]{%
      \ifltxcounter{#1}{\setcounter{stackedNo}{\value{#1}}}{\setcounter{stackedNo}{#1}}%
      \ifltxcounter{#2}{\setcounter{diceNo2}{\value{#2}}}{\setcounter{diceNo2}{#2}}%
      \ifnum\value{stackedNo}>\value{diceNo2}%
        \roundUp{diceNo2}%
        \addtocounter{stackedNo}{\value{diceNo2}}%
      \else%
        \roundUp{stackedNo}%
        \addtocounter{stackedNo}{\value{diceNo2}}%
      \fi%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    %%%%%%%%%%%%%%%%%%%% LAYOUT %%%%%%%%%%%%%%%%%%%%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    %%% Index
    
    \def\breakitem{\par\goodbreak\hangindent 40\p@}
    
    
    \makeindex[columns=3]
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \indexsetup{
      noclearpage,
      level=\section,
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      othercode={\let\item\breakitem},
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    %%%
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \raggedbottom
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    % Make floats hug the text.
    \setlength\intextsep{0em}
    
    
    %\renewcommand\tabularxcolumn[1]{m{#1}}
    
    \newcolumntype{Y}{>{\centering\arraybackslash}X}
    
    \newcolumntype{L}{>{\normalfont\raggedright\arraybackslash}X}
    
    \arrayrulecolor{background}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \setlength\arrayrulewidth{2.2pt}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \renewcommand{\arraystretch}{1.1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    %%%%%%%%%%%%%%%%%%%% Environments %%%%%%%%%%%%%%%%%%%%
    
    
    \newenvironment{speechtext}%
    
      {%
        \it
        \begin{quotation}%
        \noindent%
      }%
    
      {
        \end{quotation}
      }
    
    \newcommand*\@NoIndentAfter{%
        \@ifnextchar\par{%
            \def\par{%
                \everypar{\setbox\z@\lastbox\everypar{}}%
                \@restorepar%
            }%
        }{}%
    }
    \newrobustcmd*{\NoIndentAfterThis}{\@NoIndentAfter\par\par}
    
    
    \AfterEndEnvironment{enumerate}{\NoIndentAfterThis}
    \AfterEndEnvironment{itemize}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{description}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{dlist}{\NoIndentAfterThis}
    \AfterEndEnvironment{list}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{boxtext}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{speechtext}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{exampletext}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{nametable}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{boxtable}{\NoIndentAfterThis}
    \AfterEndEnvironment{tcolorbox}{\NoIndentAfterThis}
    
    \AfterEndEnvironment{multicols}{\NoIndentAfterThis}
    
    \newenvironment{exampletext}
    
      {
        \parindent2em%
        \needspace{2em}
        \vspace{1em}%
        \it%
    
        \nobreak\bigLine\par
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \null
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\boxPair[3][b]{
      \begin{figure*}[#1!]
    
        \ifstrequal{#1}{b}{%
          \bigLine
        }{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \begin{multicols}{2}
        #2
        \vfill\null
        \columnbreak
        #3
        \end{multicols}
    
        \ifstrequal{#1}{t}{%
          \bigLine
        }{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \end{figure*}
    }
    
    
    \newcommand\playCommentary[3][b]{
    
      \iftoggle{intro}{
    
        \begin{figure*}[#1!]
          \ifstrequal{#1}{b}{%
            \bigLine
          }{}
    
          \begin{multicols}{3}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
          \bigLine
    
          \parindent2em%
          \par%
    
          \vspace{\baselineskip}
    
          \noindent%
          #3
          \end{multicols}
          \ifstrequal{#1}{t}{%
            \bigLine
          }{}
        \end{figure*}
      }{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newenvironment{boxtable}[1][cL]
      {
    
        \vspace{0.5em}
    
        \rowcolors{2}{}{background!6}%
        \needspace{2em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \par\noindent
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \scshape
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \tabularx{\linewidth}{#1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hline
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hline
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \endtabularx
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \vspace{0.5em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    \newenvironment{nametable}[2][cL]
      {
    
        \rowcolors{2}{}{background!6}%
        \needspace{6em}%
    
        \begin{center}\npcsymbol~\titleFont\textbf{#2}~\npcsymbol\end{center}%
        \par\noindent\nobreak%
    
        \tabularx{\linewidth}{#1}
        \hline
      }%
      {
        \hline
        \endtabularx
    
    Malin Freeborn's avatar
    gc  
    Malin Freeborn committed
        \vspace{1em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newtcolorbox{wideTable}[2][cX]{
      tabularx=#1,
      float*=h!,
      ornamented,
      adjusted title=#2,
      bottom=1em,
      top=-1pt,
      left=3pt,
      right=6pt,
    
      code={\rowcolors{2}{}{background!6}\needspace{1em}}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    %%%%%%%%%%%%%%%%%%% COMMANDS %%%%%%%%%%%%%%%%%%%%
    
    \newcommand{\story}[2]{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \subsubsection[#2]{The #2\\\hint{Cost: #1}}%
      \index{#2 (Story)}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    }
    
    \newcommand{\startingCondition}[1]{
      \ifnum\value{list}<95
        \item
        #1
      \fi
    }
    
    
    \newcommand{\mapentry}[2][]{
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \needspace{2em}
    
      \refstepcounter{list}
    
      \subsubsection[#2]{%
    
        \arabic{list}: \textbf{\ifdefmacro{#2}{#2}{\MakeUppercase#2}}%
    
      \label{#1}%
    
    %%%%% Threads
    
    \newcommand\declareRegions[1]{
      \foreach \area in {segments,#1}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        {\startcontents[\area]
        \stopcontents[\area]}
    }
    
    
    % the first thread gets a ticked box in the toc.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    % the rest get an empty box, so the GM can tick it once it's ready.
    
    
    \newcommand{\threadToc}{\printcontents[\region]{l}{2}{\section*{Summaries}\setcounter{tocdepth}{3}}}
    
    % Change the to depth from 2 to 3 in order to output a miniature table of contents on all threads
    
    \newcommand{\threadMiniToc}{%
      \printcontents[segments]{t}{3}{\setcounter{tocdepth}{3}}%
    
    \newcounter{segNo}
    \newcounter{segNoSpare}
    \newcommand{\threadName}{}
    
    \newcommand{\thread}[2][]{
    
      \vspace{1em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \par
    
      \stopcontents[segments]
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach \area in {#1}%
        {\resumecontents[\area]}
    
      \renewcommand{\threadName}{#2}
    
      \needspace{5em}
    
      \subsection[\it #2]{#2}
    
      \setcounter{segNo}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach \area in {#1}%
        {\stopcontents[\area]}
    
      \startcontents[segments]
      \threadMiniToc%
    
      \bigLine
      \vspace{1em}
    
    \newcommand{\segment}[4][]{
    
      \vspace{1em}
    
      \refstepcounter{segNo}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \resumecontents[#2]
    
      \subsubsection[%
    
        \setcounter{segNoSpare}{\expandafter\thesegNo}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \ifstrequal{#1}{}{}{(#1)~}%
        \bfseries#3 -- \mdseries#4]%
    
        {\large{\scshape\ifnum\thesegNo<1 1\else \thesegNo\fi)}~\large#3\ \hint{\ifglsentryexists{#2}{\Glsfmttext{#2}}{#2}}}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \stopcontents[#2]%
    
    % Floating SQ ToCs, e.g.:
    % Goblin Attacks!
    % 1 - Scouting - the PCs spot a goblin
    % 2 - Rude Awakening - A goblin raids the PCs food
    % 3 - Raiders Galore - Goblins raid a local bailey
    
    \titlecontents{tsubsubsection}
                  [3em]
                  {%
    
                    \contentspush{\scshape\large%
    
                    \ifnum\thesegNoSpare=0 % The thread num is set to 0 to stop
    
                    % the first part being ready.
                      1%
                    \else%
    
                      \thesegNoSpare%
    
                    \thecontentslabel%
                  }%
                  {}%
                  {}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
                  {.}%
    
    
    % Summary SQ Docs
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \titlecontents*{fsubsection}%
      [20pt]
      {%
    
        \vspace{2\baselineskip}%
    
        \needspace{5\baselineskip}
    
        \textcolor{background}{\adforn{54}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \quad\large%
    
        \setcounter{segNo}{0}%
    
      {\quad\textcolor{background}{\titlerule*[1pc]{---}}}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      []%
      []
    
    
    \titlecontents{fsubsubsection}
                  [5em]
                  {%
                    \vspace{.3em}%
                    \contentspush{%
    
                    \ifnum\thesegNoSpare=1%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
                      \sgr\else\sgn%
    
                    \fi\quad%
    
                    \ifnum\thesegNoSpare>0%
                      Part~\thesegNoSpare%
    
                    \else%
                      Part~1%
                    \fi:\quad%
                    \raggedright%
    
                    }%
                    \thecontentslabel%
                  }%
                  {}%
                  {}%
                  { \enspace\titlerule*[1pc]{.}\bfseries\large\contentspage }%
                  []%
    
    %\titlecontents*{lsubsection}[0pt]
    %{\adforn{10}~\large\raggedright}{}{}
    %{}[][]
    
    \newcommand\printThreadsInRegion[1]{
      \label{threadList:#1}
    
      \printcontents[#1]{f}{2}{\setcounter{tocdepth}{3}}
    }
    
    
    \newcommand\printAllThreads[1]{
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach \x in {#1}{
    
        \ifglsentryexists{\x}{%
          \section*{\Glsfmttext{\x}}
        }{%
          \section*{\x}
        }%
    
        \label{threads:\x}
    
        \printcontents[\x]{f}{2}{\setcounter{tocdepth}{3}}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      }
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \vspace{2em}
    
    \newcommand\hint[1]{%
      \iftoggle{examplecharacter}{}%
    
      {\textcolor{background}{\small(\textbf{#1})}}
    
    %%%%%%%%%%%%%%%%%%%% Rules to Reference %%%%%%%%%%%%%%%%%%%%
    
    \newcommand\makeRule[5]{
      \subsubsection[#2: \roll{#3}{#4}, \glsentrytext{tn} #5]{#2}
      \label{#1}%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \index{#2}%
    
      \textit{\roll{#3}{#4}, \glsentrytext{tn}~#5.}%
    }
    
    \newcommand\makeAutoRule[3]{
      \subsubsection[#2: #3]{#2}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \index{#2}%