diff --git a/docs/docs.pdf b/docs/docs.pdf index fe80a51..a1231b0 100644 Binary files a/docs/docs.pdf and b/docs/docs.pdf differ diff --git a/docs/parts/reference/loading.tex b/docs/parts/reference/loading.tex index ec7dea7..5ff60c8 100644 --- a/docs/parts/reference/loading.tex +++ b/docs/parts/reference/loading.tex @@ -8,7 +8,7 @@ \item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only \item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only \item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'') - \item \verb|\setcounter{numberingConfig}|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 0 = off, 1 = Separately, 2 = Combined (except for definition), 3 = Combined + \item \verb|\setNumberingStyle|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 0 = off, 1 = Separately, 2 = Combined (except for definition), 3 = Combined \item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc. 0 = $<$section$>$.$<$number$>$,\\ 1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\ @@ -34,4 +34,6 @@ \item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up) \item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected \item \verb|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate| + \item \verb|\numberingOn| Turn on the numbering (will set back to config previously set by \verb|\setNumberingStyle|) + \item \verb|\numberingOff| Turn off the numbering (if you want to temporarily not use it. Do not use \verb|\setNumberingStyle| for that) \end{itemize} diff --git a/main/style/counters.tex b/main/style/counters.tex index 87d5d53..3e09703 100644 --- a/main/style/counters.tex +++ b/main/style/counters.tex @@ -55,6 +55,21 @@ % ──────────────────────────────────────────────────────────────────── +\newcounter{numberingConfigStore} +\setcounter{numberingConfigStore}{\value{numberingConfig}} + +\newcommand{\setNumberingStyle}[1]{ + \setcounter{numberingConfig}{#1} + \ifthenelse{\equals{#1}{0}}{ + \setcounter{numberingConfigStore}{#1} + }{} +} +\newcommand{\numberingOff}{ + \setcounter{numberingConfig}{0} +} +\newcommand{\numberingOn}{ + \setcounter{numberingConfig}{\value{numberingConfigStore}} +} % Reset definition, lemma, etc counters, add a new page \newcommand{\newsection}{