Skip to content
Snippets Groups Projects
layout.sty 28.8 KiB
Newer Older
  • Learn to ignore specific revisions
  •     \vspace{1em}%
        \it%
    
        \nobreak\bigLine\par
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \newcommand\sideBySide[2]{
      \end{multicols}
      \vspace{-1em}
    
      \begin{tcolorbox}[sidebyside,bicolor,colback=white,colbacklower=black!5!white]
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      {#1}
    
      \tcblower
      {\it #2}
      \end{tcolorbox}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \begin{multicols}{2}
    
    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*}
    }
    
    
    \newenvironment{boxtable}[1][cL]
      {
    
        \vspace{0.5em}
    
        \rowcolors{2}{}{gray!10}\needspace{2em}
        \par\noindent
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \scshape
    
        \tabularx{\linewidth}{#1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hline
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hline
    
        \endtabularx
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \vspace{0.5em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    \newenvironment{nametable}[2][cL]
      {
        \rowcolors{2}{}{gray!10}\needspace{3em}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \begin{center}\flourish~\titleFont\textbf{#2}~\flourish\end{center}
    
        \par\noindent
        \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}{}{gray!10}\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
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\mapArea[3][]{
      \ifglsentryexists{#1}{
        \subsection[#3]{\glsentrytext{#1}~#3~\glsentrytext{#1}}
        \label{#2}
      }{
        \subsection{#3}
        \label{#2}
      }
    }
    
    
    \newcommand{\mapentry}[2][]{
    
      \needspace{2em}
    
      \refstepcounter{list}
    
      \subsubsection[#2]{%
    
        \arabic{list}: \ifdefmacro{#2}{#2}{\MakeUppercase#2}%
    
      \label{#1}%
    
    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}
    
      \subsection[\it #2]{#2}
    
      \settoggle{firstsq}{true}
    
      \setcounter{sqNo}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \foreach \area in {#1}%
        {\stopcontents[\area]}
      \startcontents[sq]
    
    \newcommand{\sqpart}[3]{
    
      \vspace{1em}
    
      \refstepcounter{sqNo}
      \resumecontents[#1]
      \subsubsection[%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \hspace{-4em}\arabic{sqNo} -- %
    
        \iftoggle{firstsq}{\sqr}{\sqn}%
    
        {#2 \\\hint{#1}}
    
      \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)}}
    }