From 83e3221df470cd3a5bf27267603f8b6ceb00d4bd Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Wed, 8 Feb 2023 15:39:23 +0100
Subject: [PATCH] formatting cleanup

---
 layout.sty | 70 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 38 insertions(+), 32 deletions(-)

diff --git a/layout.sty b/layout.sty
index 9068587d..68c5aff4 100644
--- a/layout.sty
+++ b/layout.sty
@@ -638,55 +638,76 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
 \setcounter{enc}{0}
 
 \newcommand{\randomtwo}{%
-  \ifnumcomp{\value{r2}}{>}{1}{\setcounter{r2}{1}}{\addtocounter{r2}{1}}%
-\setcounter{enc}{\value{r2}}%
+  \ifnum\value{r2}>1%
+    \setcounter{r2}{1}%
+  \else%
+    \stepcounter{r2}%
+  \fi%
+  \setcounter{enc}{\value{r2}}%
 }
 
-\newcommand{\randomtwoB}{
-  \ifodd\value{r3b}\setcounter{r2b}{1}\else\setcounter{r2b}{2}\fi%
+\newcommand{\randomtwoB}{%
+  \ifodd\value{r3b}%
+    \setcounter{r2b}{1}%
+  \else%
+    \setcounter{r2b}{2}%
+  \fi%
 }
 
-\newcommand{\randomtwoC}{
+\newcommand{\randomtwoC}{%
   \ifnum\value{r2c}>1%
   \setcounter{r2c}{1}\else%
-  \addtocounter{r2c}{1}%
+  \stepcounter{r2c}%
   \fi%
 }
 
 \newcommand{\randomthree}{%
-  \ifnumcomp{\value{r3}}{>}{2}{\setcounter{r3}{1}}{\addtocounter{r3}{1}}%
+  \ifnum\value{r3}>2%
+    \setcounter{r3}{1}%
+  \fi%
+  \ifnum\value{r3}<1%
+    \setcounter{r3}{2}%
+  \fi%
+  \stepcounter{r3}%
   \setcounter{age}{\value{r3}}%
-  \ifnum\value{r3}<1\setcounter{r3}{2}\fi%
 }
 
 \newcommand{\randomthreeB}{%
   \ifnum\value{r3b}>2%
     \setcounter{r3b}{1}%
   \else%
-    \addtocounter{r3b}{1}%
+    \stepcounter{r3b}%
   \fi%
   \ifnum\value{r3b}<1%
-    \setcounter{r3b}{3}
+    \setcounter{r3b}{3}%
   \fi%
 }
 
-\newcommand{\randomthreeC}{
+\newcommand{\randomthreeC}{%
   \ifnum\value{r3c}>2%
-  \setcounter{r3c}{1}\else%
-  \addtocounter{r3c}{1}%
+    \setcounter{r3c}{1}
+  \else%
+    \stepcounter{r3c}%
   \fi%
 }
 
 \newcommand{\randomfour}{%
-  \ifnumcomp{\value{r4}}{>}{3}{\setcounter{r4}{1}}{\addtocounter{r4}{1}}%
-  \ifnumcomp{\value{r4}}{<}{1}{\setcounter{r4}{1}}{}
+  \ifnum\value{r4}>3%
+    \setcounter{r4}{2}%
+  \else%
+    \ifnum\value{r4}<1%
+      \setcounter{r4}{1}%
+    \fi%
+  \fi%
+  \stepcounter{r4}%
   \setcounter{track}{\value{r4}}%
 }
 
 \newcommand{\randomfourB}{%
-  \ifnum\value{r4b}>3\setcounter{r4b}{1}%
+  \ifnum\value{r4b}>3%
+    \setcounter{r4b}{1}%
   \else%
-  \addtocounter{r4b}{1}%
+    \stepcounter{r4b}%
   \fi%
 }
 
@@ -699,7 +720,6 @@ interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)
   \addtocounter{r12}{\value{r4}}%
 }
 
-
 %%%%%%%%%%%%%%%%%%%% LAYOUT %%%%%%%%%%%%%%%%%%%%
 \makeindex
 \raggedbottom
@@ -962,22 +982,8 @@ Roll & Result \\
 
 }
 
-\newcommand{\shortline}{\line(1,0){22}}  
 \newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}}
-\newcommand{\vlongline}{\line(1,0){100}\hspace{0.8cm}}
-\newcommand{\writeline}{\hrulefill}
-\newcommand{\fiveBoxesRow}{\ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}}
-\newcommand{\fiveboxes}{\ding{111}\ding{111}\ding{111}\ding{111}\ding{111}}
-\newcommand{\threeboxes}{\ding{111}\ding{111}\ding{111}}
-\newcommand{\threecircles}{\ding{109}\ding{109}\ding{109}}
-\newcommand{\tenboxes}{  \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111} & \ding{111}  \\}
-\newcommand{\tencircles}{\ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109}  \\}
 \newcommand{\attributecircles}{\ding{175}\ding{174}\ding{173}\ding{172}{\Large\ding{109}}\ding{172}\ding{173}\ding{174}\ding{175}}
-\newcommand{\Split}{
-  \line(1,0){120}
-
-  }
 \newcommand{\skill}[1]{#1 \dotfill & \Repeat{3}{\ding{109}}\\
 }
 
-\newcommand{\longline}{\line(1,0){320}\par\vspace{.2cm}}
-- 
GitLab