Skip to content
Snippets Groups Projects
layout.sty 26.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malin Freeborn's avatar
    Malin Freeborn committed
    %%%%% Side Quests
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\declareSQareas[1]{
      \foreach \area in {sq,#1}%
        {\startcontents[\area]
        \stopcontents[\area]}
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    % the first side quest gets a ticked box in the toc.
    % the rest get an empty box, so the GM can tick it once it's ready.
    
    \newtoggle{firstsq}
    \settoggle{firstsq}{true}
    
    \newcommand{\sqtoc}{\printcontents[\sqarea]{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 side quests
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \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*}
    
    \newcounter{sqNo}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\sqName}{}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\sidequest}[2][]{%
      \stopcontents[sq]
      \foreach \area in {#1}%
        {\resumecontents[\area]}
      %%%%%%%%%%%%%
      \renewcommand{\sqName}{#2}
    
      \resumecontents[\sqarea]
      \subsection{\sqName}
      \stopcontents[\sqarea]
      \settoggle{firstsq}{true}
    
      \setcounter{sqNo}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach \area in {#1}%
        {\stopcontents[\area]}
      \startcontents[sq]
    
    \newcommand{\sqpart}[3]{
      \refstepcounter{sqNo}
      \resumecontents[#1]
      \subsubsection[%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hspace{-4em}\arabic{sqNo} -- %
    
        \iftoggle{firstsq}{\sqr}{\sqn}%
    
        {(#1) #2}
      \stopcontents[#1]\settoggle{firstsq}{false}
    
    \titlecontents*{lsubsection}[0pt]
    {\large\raggedright}{}{}
    {}[][]
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\printAllSideQuests[1]{
      \foreach \x in {#1}{
        \center\subsection*{\x}
        \printcontents[\x]{l}{2}{\setcounter{tocdepth}{3}}
      }
    
    }
    
    
    \newcommand\hint[1]{%
      \iftoggle{examplecharacter}{}%
      {\small\textcolor{gray}{(#1)}}
    }