diff --git a/docs/docs.pdf b/docs/docs.pdf index acff65a..45412a1 100644 Binary files a/docs/docs.pdf and b/docs/docs.pdf differ diff --git a/docs/docs.tex b/docs/docs.tex index eb7389e..5945223 100644 --- a/docs/docs.tex +++ b/docs/docs.tex @@ -13,7 +13,7 @@ \vspace{4cm} \begin{center} - \includegraphics[width=0.5\linewidth]{../assets/logo.jpg} + \includegraphics[width=0.5\linewidth]{../assets/logo.jpg} \end{center} \newpage @@ -26,10 +26,26 @@ This set of \LaTeX files is designed to give you a good looking, pre-configured It has some configuration options already, but more are to come soon. If you have any suggestions as to what should be added, don't hesitate to open a support ticket at \url{https://support.janishutz.com?a=add} or contacting me via email to \texttt{development@janishutz.com}. -\begin{Large} - \shade{red}{Breaking Changes}: The timecomplexity commands have been updated to require math environment. You can use the following regex to fix them - \verb|:%s/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g| (execute first) and \verb|:%s/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g| -\end{Large} +\section{Breaking Changes} +Please note that the regex provided below are for NeoVim and you may need to replace \verb|\(\)| with \verb|()| +\subsection{Time complexity} +The timecomplexity commands have been updated to require math environment. You can use the following regex to fix them + +\verb|/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g| (execute first)\\ +and \verb|/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g| + +\subsection{Labels \& Environments} +The counter environments can now be referenced (see \ref{sec:counters}). +Due to the new requirements set out by that addition, it is now no longer possible to manually update the counters using +\verb|\setcounter|. +Use the below regex to replace all occurrences of \verb|\setcounter| with the new format. +Please note that this will overwrite \textit{all} occurrences of \verb|\setcounter| with the specific old format with \verb|\setLabelNumber|: + +\verb|/\\setcounter{\(.*\)s}/\\setLabelNumber{\1}/g| and \verb|/\\setcounter{all}/\\setLabelNumber{all}/g| + +and for the \verb|\stepcounter| as well + +\verb|/\\stepcounter{\(.*\)s}/\\stepLabelNumber{\1}| and \verb|/\\stepcounter{all}/\\stepLabelNumber{all}/g|. \section{Installation} diff --git a/docs/parts/reference/extras.tex b/docs/parts/reference/extras.tex index c10f231..923b429 100644 --- a/docs/parts/reference/extras.tex +++ b/docs/parts/reference/extras.tex @@ -17,9 +17,10 @@ Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossa \subsubsection{Minted} \textit{Included in \texttt{full}} -Be sure to enable \texttt{shell-escape} for your compiler! +Be sure to enable \texttt{-shell-escape} for your compiler +\textit{(Note: Some newer versions of LaTeX do no longer require this and it is better to keep it turned off for security reasons, if it works without)}! -When \texttt{minted} is available via these helpers, you will also have access to the \texttt{codesnippet} macro: +When \texttt{minted} is available via these helpers, you will also have access to the \texttt{code} environment: \begin{minted}{latex} \begin{code}{language} @@ -33,9 +34,9 @@ Example (in python): \begin{code}{python} def hello_world(): - print("hello world!") + print("hello world!") \end{code} -If you want to print code inline, use \verb|\inlinecode|\textit{\{string\}}, which redners to \inlinecode{code}. +If you want to print code inline, use \verb|\inlinecode|\textit{\{string\}}, which renders to \inlinecode{code}. \textit{Caveat: This is not using the \texttt{verbatim} environment due to various limitations of that environment and instead is simply using} \verb|\texttt{}|, so you cannot use this to print \LaTeX-commands diff --git a/docs/parts/reference/style/descriptors.tex b/docs/parts/reference/style/descriptors.tex index e692284..1a29468 100644 --- a/docs/parts/reference/style/descriptors.tex +++ b/docs/parts/reference/style/descriptors.tex @@ -66,18 +66,22 @@ See \ref{sec:counters} for a guide on how to change the current number. \label{sec:counters} \textit{Included in \texttt{most} and up} -\textit{Starting from the version of October 18, 2025, the counter numbers need to be $<$number$>$ - 1} +\textit{Starting from the version of October 18, 2025, you may no longer use \texttt{$\backslash$setcounter} directly} You may set the current number for the elements by setting their corresponding counter to the selected number. -You can do this using \verb|\setcounter|\{\textit{name of the counter}\}\{\textit{number}\}, where you replace \textit{name of the counter} with one of the following: -\texttt{definitions}, \texttt{lemmas}, \texttt{theorems}, \texttt{corollaries}, \texttt{propositions}, \texttt{facts}, \texttt{axioms}, \texttt{examples}, \texttt{remarks} +You can do this using \verb|\setLabelNumber|\{\textit{name of the environment}\}\{\textit{number}\}, +where you replace \textit{name of the environment} with one of the following: +\texttt{definition}, \texttt{lemma}, \texttt{theorem}, \texttt{corollary}, \texttt{proposition}, \texttt{fact}, +\texttt{formula}, \texttt{axiom}, \texttt{example}, \texttt{remark} -This only applies if you have set numberingConfig to $1$ (for all of them) and $2$ (only for \texttt{definitions}). -To change the combined numbering, set \texttt{all} to your desired number. +This only applies if you have set \texttt{numberingConfig} to $1$ (for all of them) and $2$ (only for \texttt{definitions}). +To change the combined numbering, use \verb|\setLabelNumber{all}| to your desired number. + +You may also use \verb|\stepLabelNumber|\{\textit{name of the environment}\} to step the counter by one. \subsubsection{Referencing counters} -\textit{Included in \texttt{most} and up} +\textit{Included in \texttt{most} and up, introduced on October 18, 2025} If you wish to reference a counter, you can do so by writing diff --git a/main/style/counters.tex b/main/style/counters.tex index 6e34838..9580741 100644 --- a/main/style/counters.tex +++ b/main/style/counters.tex @@ -46,8 +46,17 @@ % Set the current number of a label \newcommand{\setLabelNumber}[2]{ \setcounter{#1}{#2} + \addtocounter{#1}{-1} \setcounter{#1ss}{#2} + \addtocounter{#1ss}{-1} \setcounter{#1sss}{#2} + \addtocounter{#1sss}{-1} +} + +\newcommand{\stepLabelNumber}[1]{ + \stepcounter{#1} + \stepcounter{#1ss} + \stepcounter{#1sss} } \newcommand{\printcounter}[1]{%