diff --git a/config/layout.sty b/config/layout.sty index 6cbb0135f0973ceb902a38b3945488d61ed3c680..41fe4dfe1c132bbe6cdd09f2b98fdb49a4274feb 100644 --- a/config/layout.sty +++ b/config/layout.sty @@ -1,4 +1,5 @@ \ProvidesPackage{layout} +\RequirePackage[table]{xcolor} \RequirePackage[acronym]{glossaries} \setacronymstyle{short-long-desc} \RequirePackage{glossary-mcols} @@ -390,6 +391,7 @@ bookmarks=true]% \tcbset{enhanced, ornamented, +code={\rowcolors{2}{}{gray!10}}, before upper={\parindent15pt}, fonttitle=\bfseries,coltitle=black,attach boxed title to top center= {yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=-2mm-\tcboxedtitleheight/2}, @@ -408,10 +410,14 @@ 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}{ \begin{wrapfigure}{R}{.#1\textwidth} #2 \end{wrapfigure} + }{ + #2 + + } } % Chapter Heading Color @@ -629,7 +635,7 @@ Roll & Result \\ \newtcolorbox{xpchart}[1]{tabularx={l|p{.8\textwidth}},adjusted title=XP Rewards for #1,bottom=10pt} -\newtcolorbox[use counter=enc, use counter=list]{encounters}[1]{ornamented,adjusted title=Encounters in #1,tabularx={XXp{.6\textwidth}},bottom=10pt,code={\setcounter{enc}{19}\setcounter{list}{18}}} +\newtcolorbox[use counter=enc, use counter=list]{encounters}[1]{ornamented,adjusted title=Encounters in #1,tabularx={XXp{.6\textwidth}},bottom=10pt,code={\rowcolors{2}{}{gray!10}\setcounter{enc}{19}\setcounter{list}{18}}} \newtcolorbox{rollchart}{tabularx={p{.25\linewidth}X},top=10pt,bottom=10pt} diff --git a/config/stats.sty b/config/stats.sty index 376549aab7b557881428c4a37d509c5a83079384..b2b85d104400f11657f43bca09fb80a140c84602 100644 --- a/config/stats.sty +++ b/config/stats.sty @@ -410,11 +410,16 @@ \setcounter{spdb}{0} \setcounter{dexb}{0} -\begin{tabularx}{\textwidth}{lrlrlr} +\begin{tabularx}{\textwidth}{lr|lr|lr} + +% the tcolorbox has coloured rows (xcolor package) +% but that doesn't work with creature stats, so we suppress it here +\hiderowcolors + \iftoggle{verbose}{Strength}{STR} & \arabic{str} & \iftoggle{verbose}{Dexterity}{DEX} & \arabic{dex} & \iftoggle{verbose}{Speed}{SPD} & \arabic{spd} \\ \iftoggle{mind}{ \iftoggle{verbose}{Intelligence}{INT} & \arabic{int} & \iftoggle{verbose}{Wits}{WTS} & \arabic{wts} & \iftoggle{verbose}{Charisma}{CHA} & \arabic{cha} \\}{% - \iftoggle{verbose}{Wits}{WTS} & \arabic{wts} \\ + && \iftoggle{verbose}{Wits}{WTS} & \arabic{wts} \\ } \setcounter{hp}{\value{str}} \end{tabularx}