diff --git a/layout.sty b/layout.sty index ef414929b9b4e99cd827b538ffe67558727d3ac7..28384b865311ad26d04b25e0aa1cfd7d7390ee2a 100644 --- a/layout.sty +++ b/layout.sty @@ -38,6 +38,7 @@ \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 \RequirePackage{pifont} \RequirePackage{colortbl} \RequirePackage[poster]{tcolorbox} @@ -464,20 +465,21 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) {\Huge} -\titleformat{\section}[frame] -{\needspace{20em}\normalfont} -{\filright -\footnotesize -\enspace SECTION \thesection\enspace} -{8pt} -{\Large\bfseries\filcenter} - -\titleformat{\subsection}% - {\needspace{13em}\center\large\bfseries}% - {}% - {1em}% - {}% - [\rule{.9\linewidth}{.2pt}] +\newcommand\titlebar{% +\tikz[baseline,trim left=1em,trim right=3cm] { + \fill [\pageSideColor] (2.5cm,-1ex) rectangle (\linewidth+1.5em,2.5ex); + \node [ + fill=\pageSideColor, + anchor= base east, + rounded rectangle, + minimum height=3.5ex] at (3cm,0) { + \textbf{\arabic{section}} + }; +}% +} +\titleformat{\section}{\large}{\titlebar}{0.1cm}{\textcolor{chapnumcol}} +\renewcommand*{\thesection}{\arabic{section}} + % \titleformat{\subsubsection} {\needspace{4em}\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} diff --git a/test.tex b/test.tex index 27f3a94cf12ab0660573af7fed61b912932570ac..af9bcbbad63d97b9f84b545a7744ebc527b2dba0 100644 --- a/test.tex +++ b/test.tex @@ -114,7 +114,9 @@ Roll & Result \\\hline \end{multicols} -\chapter{Humanoids} +\chapter{Stat Blocks} + +\section{Humanoids} \begin{multicols}{2} @@ -178,7 +180,7 @@ Roll & Result \\\hline \end{multicols} -\chapter{Forest Critters} +\section{Forest Critters} \begin{multicols}{2} @@ -192,7 +194,7 @@ Roll & Result \\\hline \end{multicols} -\chapter{Undead} +\section{Undead} \begin{multicols}{2} @@ -246,6 +248,8 @@ Roll & Result \\\hline \chapter{Outsiders} +\section{Weird Ones} + \begin{multicols}{2} \archmage @@ -260,6 +264,22 @@ Roll & Result \\\hline \end{multicols} +\section{Same} + +\begin{multicols}{2} + +\rockman + +\archmage + +\dragon + +\archmage + +\lavaman + +\end{multicols} + \chapter{Bestiary Chapters} \begin{multicols}{2}