[Counters] Handle no explicit initialization better
This commit is contained in:
@@ -71,6 +71,10 @@
|
|||||||
% └ ┘
|
% └ ┘
|
||||||
\newcommand{\setSubsectionNumbering}[1]{
|
\newcommand{\setSubsectionNumbering}[1]{
|
||||||
\setcounter{numberSubsections}{#1}
|
\setcounter{numberSubsections}{#1}
|
||||||
|
\applySubsectionNumbering
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\applySubsectionNumbering}{
|
||||||
\ifnum\value{numberSubsections}=1
|
\ifnum\value{numberSubsections}=1
|
||||||
\renewcommand{\sectionNumbering}{\thesubsection}
|
\renewcommand{\sectionNumbering}{\thesubsection}
|
||||||
\renewcommand{\suffix}{ss}
|
\renewcommand{\suffix}{ss}
|
||||||
@@ -120,7 +124,7 @@
|
|||||||
\renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}}
|
\renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}}
|
||||||
\renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}}
|
\renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}}
|
||||||
}
|
}
|
||||||
|
\applySubsectionNumbering
|
||||||
|
|
||||||
% ── Label generation ────────────────────────────────────────────────
|
% ── Label generation ────────────────────────────────────────────────
|
||||||
\newcommand{\labelSectionGeneration}{%
|
\newcommand{\labelSectionGeneration}{%
|
||||||
@@ -168,9 +172,11 @@
|
|||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
% │ Enable or disable numbering │
|
% │ Enable or disable numbering │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
|
% Initialize with config file
|
||||||
\newcounter{numberingConfigStore}
|
\newcounter{numberingConfigStore}
|
||||||
\setcounter{numberingConfigStore}{\value{numberingConfig}}
|
\setcounter{numberingConfigStore}{\value{numberingConfig}}
|
||||||
|
|
||||||
|
% For later change
|
||||||
\newcommand{\setNumberingStyle}[1]{
|
\newcommand{\setNumberingStyle}[1]{
|
||||||
\typeout{Setting NumberingStyle to #1}
|
\typeout{Setting NumberingStyle to #1}
|
||||||
\setcounter{numberingConfig}{#1}
|
\setcounter{numberingConfig}{#1}
|
||||||
@@ -178,6 +184,8 @@
|
|||||||
\setcounter{numberingConfigStore}{#1}
|
\setcounter{numberingConfigStore}{#1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% Enable / disable numbering
|
||||||
\newcommand{\numberingOff}{
|
\newcommand{\numberingOff}{
|
||||||
\setcounter{numberingConfig}{0}
|
\setcounter{numberingConfig}{0}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user