Get working

This commit is contained in:
2026-02-19 19:49:59 +01:00
parent b7b365dd36
commit 35bd979c98
10 changed files with 500 additions and 515 deletions

View File

@@ -23,15 +23,15 @@ def generate_labels():
reset_func += f" \\setcounter{{{label}section}}{{0}}\n"
data += f"\\newcounter{{{label}subsection}}[subsection]\n"
data += f"\\renewcommand{{\\the{label}subsection}}{{\\thesection.\\thesubsection.\\arabic{{{label}subsection}}}}\n"
data += f"\\renewcommand{{\\the{label}subsection}}{{\\thesubsection.\\arabic{{{label}subsection}}}}\n"
reset_func += f" \\setcounter{{{label}subsection}}{{0}}\n"
data += f"\\newcounter{{{label}subsubsection}}[subsubsection]\n"
data += f"\\renewcommand{{\\the{label}subsubsection}}{{\\thesection.\\thesubsection.\\thesubsubsection.\\arabic{{{label}subsubsection}}}}\n"
data += f"\\renewcommand{{\\the{label}subsubsection}}{{\\thesubsubsection.\\arabic{{{label}subsubsection}}}}\n"
reset_func += f" \\setcounter{{{label}subsubsection}}{{0}}\n"
data += f"\\newcounter{{{label}paragraph}}[paragraph]\n"
data += f"\\renewcommand{{\\the{label}paragraph}}{{\\thesection.\\thesubsection.\\thesubsubsection.\\theparagraph.\\arabic{{{label}paragraph}}}}\n"
data += f"\\renewcommand{{\\the{label}paragraph}}{{\\theparagraph.\\arabic{{{label}paragraph}}}}\n"
reset_func += f" \\setcounter{{{label}paragraph}}{{0}}\n"
# Generate tcolorboxes
@@ -52,7 +52,8 @@ def generate_labels():
}};
}}, #1
}}\n\n"""
# TODO: If needed, add aliases for \short{definition} as e.g \shortdefinition
data += f"\\newcommand{{\\inline{label}}}[1][NONAME]{{\\inline[#1]{{{label}}}}}"
data += f"\\newcommand{{\\short{label}}}[1][NONAME]{{\\short[#1]{{{label}}}}}"
reset_func += "\n \\setcounter{table}{0}\n"
reset_func += " \\setcounter{figure}{0}\n"