[Counters] Handle no explicit initialization better
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user