From 31081225ff2a9e9410c3207c834b2f6e4945c96a Mon Sep 17 00:00:00 2001 From: Malin Freeborn <malinfreeborn@posteo.net> Date: Mon, 25 Jul 2022 21:00:37 +0200 Subject: [PATCH] change section colour to match tab --- layout.sty | 7 ++++--- test.tex | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/layout.sty b/layout.sty index 28384b86..5e5a89c9 100644 --- a/layout.sty +++ b/layout.sty @@ -469,15 +469,16 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) \tikz[baseline,trim left=1em,trim right=3cm] { \fill [\pageSideColor] (2.5cm,-1ex) rectangle (\linewidth+1.5em,2.5ex); \node [ - fill=\pageSideColor, + fill=white, + text= \pageSideColor, anchor= base east, rounded rectangle, - minimum height=3.5ex] at (3cm,0) { + minimum height=3.5ex] at (2.9cm,0) { \textbf{\arabic{section}} }; }% } -\titleformat{\section}{\large}{\titlebar}{0.1cm}{\textcolor{chapnumcol}} +\titleformat{\section}{\large\needspace{8em}}{\titlebar}{0.1cm}{\textcolor{white}} \renewcommand*{\thesection}{\arabic{section}} % diff --git a/test.tex b/test.tex index af9bcbba..254962f7 100644 --- a/test.tex +++ b/test.tex @@ -427,7 +427,53 @@ When using a bestiary chapter, the stats appear as dice rolls, rather than fixed \noindent \lipsum +\end{multicols} + +\newcommand{\tests}{ + +\chapter{Another Test} + +\section{Test Section} + +\begin{multicols}{2} + +\lipsum[3] + +\humanbard + +\lipsum[2] + +\subsection{Test subsection} + +\elf + +\lipsum[3] + +\elf + +\subsubsection{Test sub-sub-section} + +\lipsum[10] + +\subsubsection{Test sub-sub-section again} + + +\subsection{Test subsection} + +\lipsum[2] + +\elf + +\lipsum[10] + +\section{Last Section} + +\lipsum[3] \end{multicols} +} + +\Repeat{4}{\tests} + \end{document} -- GitLab