From 73684723edd69a39c8d02ed94820e6ec21d2a04a Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Thu, 28 Jul 2022 00:34:59 +0200
Subject: [PATCH] make standardized nametable and boxtable env

---
 layout.sty | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/layout.sty b/layout.sty
index 220b47cd..5e20a5b5 100644
--- a/layout.sty
+++ b/layout.sty
@@ -411,12 +411,7 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 }
 
 
-\newtcolorbox{boxtext}[1][]{
-	ornamented,
-	colback=white,
-	code={\needspace{1em}}
-	fonttitle=\scshape,
-	#1}
+\newtcolorbox{boxtext}[1][]{ornamented,colback=white,fonttitle=\scshape, #1}
 
 \newcommand{\sidebox}[2][23]{
 	\iftoggle{verbose}{
@@ -681,13 +676,32 @@ Roll & Result \\
 \newcommand{\li}{\addtocounter{enc}{-1}\arabic{enc}&}
 \newcommand{\lii}{\addtocounter{list}{-1}\arabic{list}&}
 
+\newtcolorbox{boxtable}[1][c|X]{
+	tabularx={#1},
+	top=10pt,
+	bottom=10pt,
+	left=3pt,
+	right=3pt,
+	code={\rowcolors{2}{}{gray!10}\needspace{2em}}
+	}
+
+\newtcolorbox{nametable}[2][cX]{
+	tabularx={#1},
+	top=10pt,
+	adjusted title=#2,
+	bottom=10pt,
+	left=3pt,
+	right=3pt,
+	code={\rowcolors{2}{}{gray!10}\needspace{1em}}
+	}
+
 \newtcolorbox{rollchart}{
-	tabularx={p{.25\linewidth}X},
+	tabularx={cX},
 	top=10pt,
 	bottom=10pt,
 	left=3pt,
 	right=3pt,
-	code={\rowcolors{2}{}{gray!10}}
+	code={\rowcolors{2}{}{gray!10}\needspace{2em}}
 	}
 
 \newtcolorbox{xpbox}[1]{
-- 
GitLab