diff --git a/main/style/counters.tex b/main/style/counters.tex index 9580741..9536b35 100644 --- a/main/style/counters.tex +++ b/main/style/counters.tex @@ -71,6 +71,10 @@ % └ ┘ \newcommand{\setSubsectionNumbering}[1]{ \setcounter{numberSubsections}{#1} + \applySubsectionNumbering +} + +\newcommand{\applySubsectionNumbering}{ \ifnum\value{numberSubsections}=1 \renewcommand{\sectionNumbering}{\thesubsection} \renewcommand{\suffix}{ss} @@ -120,7 +124,7 @@ \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} } - +\applySubsectionNumbering % ── Label generation ──────────────────────────────────────────────── \newcommand{\labelSectionGeneration}{% @@ -168,9 +172,11 @@ % ┌ ┐ % │ Enable or disable numbering │ % └ ┘ +% Initialize with config file \newcounter{numberingConfigStore} \setcounter{numberingConfigStore}{\value{numberingConfig}} +% For later change \newcommand{\setNumberingStyle}[1]{ \typeout{Setting NumberingStyle to #1} \setcounter{numberingConfig}{#1} @@ -178,6 +184,8 @@ \setcounter{numberingConfigStore}{#1} } } + +% Enable / disable numbering \newcommand{\numberingOff}{ \setcounter{numberingConfig}{0} }