From a71b0fc97c775db5d232a87fbfa2df988a013296 Mon Sep 17 00:00:00 2001 From: Malin Freeborn <malinfreeborn@posteo.net> Date: Wed, 30 Apr 2025 18:30:56 +0200 Subject: [PATCH] add random numbers r6 and r6b --- layout.sty | 9 ++++++++- test.tex | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/layout.sty b/layout.sty index 6b340bab..c9940496 100644 --- a/layout.sty +++ b/layout.sty @@ -929,6 +929,10 @@ bookmarks=true]% \setcounter{r4b}{\day} \divide\value{r4b} by 7 \stepcounter{r4b} +\newcounter{r6} + \setcounter{r6}{\month} +\newcounter{r6b} + \setcounter{r6b}{\month} \newcounter{rn4tn1} \setcounter{rn4tn1}{-3} @@ -1077,7 +1081,7 @@ bookmarks=true]% \foreach\c in {r2,r2b,r2c}% {\ifnum\value{\c}>2\setcounter{\c}{1}\stepcounter{r3c}\fi}% \foreach\c in {r3,r3b,r3c}% - {\ifnum\value{\c}>3\setcounter{\c}{1}\fi}% + {\ifnum\value{\c}>3\setcounter{\c}{1}\addtocounter{r6b}{-1}\fi}% \foreach\c in {r4,r4b}% {\ifnum\value{\c}>4\setcounter{\c}{1}\stepcounter{rn1t2}\fi}% \ifnum\value{r0t1}>1\setcounter{r0t1}{0}\fi% @@ -1088,6 +1092,9 @@ bookmarks=true]% \ifnum\value{r3t4}>4\setcounter{r3t4}{3}\fi% \ifnum\value{r4t5}>5\setcounter{r4t5}{4}\fi% \ifnum\value{r4t6}>6\setcounter{r4t6}{4}\fi% + \ifnum\value{r6b}<1\setcounter{r6b}{6}\fi% + \setcounter{r6}{\value{rn1t2}}% + \addtocounter{r6}{\value{r2t4}}% } \newcommand\set[2]{% diff --git a/test.tex b/test.tex index 3507ccfd..57e1d282 100644 --- a/test.tex +++ b/test.tex @@ -98,6 +98,8 @@ Words are needed after each subsection to avoid the boxes making problems. \arabic{r3c} & \arabic{r4} & \arabic{r4b} & + \arabic{r6} & + \arabic{r6b} & \arabic{r0t1} & \arabic{rn1t0} & \arabic{rn1t2} & @@ -112,8 +114,8 @@ Words are needed after each subsection to avoid the boxes making problems. \\ } -\begin{tabular}{ccccccccccccccccccc} - \textbf{r2} & \textbf{r2b} & \textbf{r2c} & \textbf{r3} & \textbf{r3b} & \textbf{r3c} & \textbf{r4} & \textbf{r4b} & \textbf{r0t1} & \textbf{rn1t0} & \textbf{rn1t2} & \textbf{rn3t3} & \textbf{r2t3} & \textbf{r2t4} & \textbf{r3t4} & \textbf{r4t5} & \textbf{r4t6} & \textbf{r12} \\\hline +\begin{tabular}{ccccccccccccccccccccc} + \textbf{r2} & \textbf{r2b} & \textbf{r2c} & \textbf{r3} & \textbf{r3b} & \textbf{r3c} & \textbf{r4} & \textbf{r4b} & \textbf{r6} & \textbf{r6b} & \textbf{r0t1} & \textbf{rn1t0} & \textbf{rn1t2} & \textbf{rn3t3} & \textbf{r2t3} & \textbf{r2t4} & \textbf{r3t4} & \textbf{r4t5} & \textbf{r4t6} & \textbf{r12} \\\hline \showCounters \showCounters \showCounters -- GitLab