Store to move back to normal tex files
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -301,3 +301,4 @@ TSWLatexianTemp*
|
|||||||
# Uncomment the next line to have this generated file ignored.
|
# Uncomment the next line to have this generated file ignored.
|
||||||
#*Notes.bib
|
#*Notes.bib
|
||||||
|
|
||||||
|
__pycache__
|
||||||
|
|||||||
58
build.sh
58
build.sh
@@ -1,58 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "
|
|
||||||
▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
|
|
||||||
█ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
|
|
||||||
█ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
|
|
||||||
█ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
|
|
||||||
█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
|
|
||||||
█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
|
|
||||||
█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
|
|
||||||
|
|
||||||
==> Building <==
|
|
||||||
|
|
||||||
"
|
|
||||||
|
|
||||||
mkdir dist/
|
|
||||||
cat ./janishutz-helpers.sty >./dist/janishutz-helpers-minimal.sty
|
|
||||||
|
|
||||||
# Build minimal scope
|
|
||||||
echo "" >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
cat ./config/config.tex >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
cat ./main/core.tex >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
cat ./main/style/style.tex >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
cat ./main/style/common.tex >>./dist/janishutz-helpers-minimal.sty
|
|
||||||
|
|
||||||
# Build recommended
|
|
||||||
cat ./dist/janishutz-helpers-minimal.sty >./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/math.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/cs.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/index.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/style/counters.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/style/cs.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/style/math.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./main/style/language.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./extra/bib.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
cat ./extra/glossary.tex >>./dist/janishutz-helpers-recommended.sty
|
|
||||||
|
|
||||||
# Build full
|
|
||||||
cat ./dist/janishutz-helpers-recommended.sty >./dist/janishutz-helpers-full.sty
|
|
||||||
echo "" >>./dist/janishutz-helpers-full.sty
|
|
||||||
cat ./extra/minted.tex >>./dist/janishutz-helpers-full.sty
|
|
||||||
|
|
||||||
# Copy letter
|
|
||||||
cp ./scopes/letter.tex ./dist/janishutz-helpers-letters.sty
|
|
||||||
|
|
||||||
echo "==> Done"
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import os
|
||||||
|
from typing import List
|
||||||
|
import labels
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
version = "1.0.0"
|
||||||
|
|
||||||
|
print("""
|
||||||
|
▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
|
||||||
|
█ █ █ █ █ █ █▄█ █ █ █ █ █ █ █ █ █ █ ▄ █ █ █
|
||||||
|
█ █ █ ▄ █▄ ▄█ ▄▄▄█ █ █ █▄█ █ ▄▄▄█ █ █ ▄ █ ▄▄▄█ █ █ █ █ ▄▄▄▄▄█
|
||||||
|
█ █ █ █▄█ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄█ █ █▄▄▄█ █▄▄█▄█ █▄▄▄▄▄
|
||||||
|
█ █▄▄▄█ █ █ █ █ ▄▄▄██ █ █ ▄ █ ▄▄▄█ █▄▄▄█ ▄▄▄█ ▄▄▄█ ▄▄ █▄▄▄▄▄ █
|
||||||
|
█ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █
|
||||||
|
█▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
|
||||||
|
|
||||||
|
|
||||||
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
def load_all_files_of_array(dirname: str, files: List[str]):
|
||||||
|
data = ""
|
||||||
|
for filename in files:
|
||||||
|
with open(dirname + "/" + filename, "r") as file:
|
||||||
|
data += file.read() + "\n\n"
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
output = load_all_files_of_array("../src/", ["header.sty"])
|
||||||
|
output += f"\\ProvidesPackage{{janishutz-helpers}}[{datetime.datetime.now().date().isoformat()} v{version}]\n\n"
|
||||||
|
output += load_all_files_of_array("../src/", ["core.sty"])
|
||||||
|
output += load_all_files_of_array("../src/config/", os.listdir("../src/config/"))
|
||||||
|
output += load_all_files_of_array("../src/core/", ["translation.sty"])
|
||||||
|
output += load_all_files_of_array("../src/", ["opts.sty", "style.sty"])
|
||||||
|
# output += load_all_files_of_array("../src/core/", os.listdir("../src/core/"))
|
||||||
|
# output += load_all_files_of_array("../src/style/", os.listdir("../src/style/"))
|
||||||
|
|
||||||
|
# l = labels.generate_labels()
|
||||||
|
# output += l[0] + "\n\n"
|
||||||
|
# output += l[1]
|
||||||
|
|
||||||
|
with open("../janishutz-helpers.sty", "w") as file:
|
||||||
|
file.write(output)
|
||||||
|
|
||||||
|
|
||||||
|
print("==> Built successfully. Output to project-root/janishutz-helpers.sty\n")
|
||||||
|
print("==> ")
|
||||||
|
|||||||
61
build/labels.py
Normal file
61
build/labels.py
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Auto-generate labels and version numbers
|
||||||
|
def generate_labels():
|
||||||
|
data = ""
|
||||||
|
reset_func = "\\newcommand{\\newsectionNoPB}{"
|
||||||
|
|
||||||
|
for label in [
|
||||||
|
"definition",
|
||||||
|
"example",
|
||||||
|
"theorem",
|
||||||
|
"lemma",
|
||||||
|
"corollary",
|
||||||
|
"proposition",
|
||||||
|
"fact",
|
||||||
|
"formula",
|
||||||
|
"remark",
|
||||||
|
"combine",
|
||||||
|
]:
|
||||||
|
data += f"\\newcounter{{{label}none}}\n"
|
||||||
|
reset_func += f"\n \\setcounter{{{label}none}}{{0}}\n"
|
||||||
|
|
||||||
|
data += f"\\newcounter{{{label}section}}[section]\n"
|
||||||
|
data += f"\\renewcommand{{\\the{label}section}}{{\\thesection.\\arabic{{{label}section}}}}\n"
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
reset_func += f" \\setcounter{{{label}paragraph}}{{0}}\n"
|
||||||
|
|
||||||
|
# Generate tcolorboxes
|
||||||
|
if label != "combine":
|
||||||
|
data += f"""\\newtcolorbox{{{label}}}[2][]{{
|
||||||
|
mainboxstyle,
|
||||||
|
colback={label}color!5!white,
|
||||||
|
colframe={label}color!75!black,
|
||||||
|
colbacktitle={label}color!75!black,
|
||||||
|
title={{\\large #2}},
|
||||||
|
overlay={{
|
||||||
|
\\node[overlaystyle,
|
||||||
|
draw={label}color!75!black,
|
||||||
|
fill={label}color!75!black
|
||||||
|
] at (frame.north east)
|
||||||
|
{{
|
||||||
|
\\large \\tr{{\\{label}NamingEN}}{{\\{label}NamingDE}}\\printLabel{{{label}}}
|
||||||
|
}};
|
||||||
|
}}, #1
|
||||||
|
}}\n\n"""
|
||||||
|
# TODO: If needed, add aliases for \short{definition} as e.g \shortdefinition
|
||||||
|
|
||||||
|
reset_func += "\n \\setcounter{table}{0}\n"
|
||||||
|
reset_func += " \\setcounter{figure}{0}\n"
|
||||||
|
reset_func += "}\n"
|
||||||
|
|
||||||
|
return data, reset_func
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
% ___ ___
|
|
||||||
% ( _ \ / ___)_
|
|
||||||
% | ( (_) _ ___ | (__ (_) __
|
|
||||||
% | | _ / _ \/ _ \ __)| |/ _ \
|
|
||||||
% | (_( ) (_) ) ( ) | | | | (_) |
|
|
||||||
% (____/ \___/(_) (_)_) (_)\__ |
|
|
||||||
% ( )_) |
|
|
||||||
% \___/
|
|
||||||
|
|
||||||
% To be loaded *after* main/core.tex
|
|
||||||
|
|
||||||
% Configure your author name here
|
|
||||||
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
|
|
||||||
\newcommand{\authorHeaders}{Janis Hutz}
|
|
||||||
|
|
||||||
% Configure your address here
|
|
||||||
\newcommand{\name}{Janis Hutz}
|
|
||||||
\newcommand{\street}{Street}
|
|
||||||
\newcommand{\city}{City}
|
|
||||||
\newcommand{\countrycode}{CH}
|
|
||||||
|
|
||||||
|
|
||||||
% Configure definition, lemma, theorem, etc numbering behaviour. 1 = Individual, 2 = Combined (apart from Definition), 3 = Combined
|
|
||||||
\setcounter{numberingConfig}{1}
|
|
||||||
|
|
||||||
% Configure if for definitions, lemmas, etc, numbering should be (0) = <section>.<number> or (1) = <section>.<subsection>.<number> or (2) = <section>.<subsection>.<subsubsection>.<number>
|
|
||||||
\setcounter{numberSubsections}{0}
|
|
||||||
|
|
||||||
% Set the default language.
|
|
||||||
\setLang{en}
|
|
||||||
|
|
||||||
% Set the default command for theorem translation
|
|
||||||
\newcommand{\theoremde}{Satz}
|
|
||||||
|
|
||||||
|
|
||||||
% ----- %
|
|
||||||
% STYLE %
|
|
||||||
% ----- %
|
|
||||||
|
|
||||||
% The colour-saturation of the short / inline descriptors (default = 40)
|
|
||||||
\setcounter{descriptorShadeStrength}{40}
|
|
||||||
|
|
||||||
% The colour-saturation of the shade command (default = 20)
|
|
||||||
\setcounter{shadeStrength}{20}
|
|
||||||
BIN
docs/docs.pdf
BIN
docs/docs.pdf
Binary file not shown.
@@ -1,11 +1,8 @@
|
|||||||
\documentclass{article}
|
\documentclass{article}
|
||||||
|
|
||||||
\newcommand{\dir}{~/projects/latex}
|
\usepackage{janishutz-helpers}
|
||||||
\input{\dir/include.tex}
|
|
||||||
\load{full}
|
|
||||||
|
|
||||||
\setup{Docs - \LaTeX \hspace{0mm} helpers}
|
\setup{Docs - \LaTeX \hspace{0mm} helpers}
|
||||||
\setLang{en}
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\startDocument
|
\startDocument
|
||||||
|
|||||||
22
install.sh
Executable file
22
install.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd build/
|
||||||
|
python build.py
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
loc="s"
|
||||||
|
read -p "Local (l) or system (s) installation? (Defaults to system) " loc
|
||||||
|
|
||||||
|
if [[ "$loc" == "l" ]]; then
|
||||||
|
if [[ -z "${TEXMFHOME+x}" ]]; then
|
||||||
|
export TEXMFHOME=~/texmf/
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $TEXMFHOME/tex/latex/janishutz-helpers
|
||||||
|
cp ./janishutz-helpers.sty $TEXMFHOME/tex/latex/janishutz-helpers/
|
||||||
|
else
|
||||||
|
sudo mkdir -p /usr/share/texmf/tex/latex/janishutz-helpers
|
||||||
|
sudo cp ./janishutz-helpers.sty /usr/share/texmf/tex/latex/janishutz-helpers/
|
||||||
|
echo "Updating file database"
|
||||||
|
sudo texhash
|
||||||
|
fi
|
||||||
353
janishutz-helpers.sty
Normal file
353
janishutz-helpers.sty
Normal file
@@ -0,0 +1,353 @@
|
|||||||
|
%%
|
||||||
|
%% Copyright (C) 2026 Janis Hutz
|
||||||
|
%%
|
||||||
|
%% This file may be distributed and/or modified under the
|
||||||
|
%% conditions of the LaTeX Project Public License, either
|
||||||
|
%% version 1.3 of this license or (at your option) any later
|
||||||
|
%% version. The latest version of this license is in:
|
||||||
|
%% http://www.latex-project.org/lppl.txt
|
||||||
|
%% and version 1.3c or later is part of all distributions of
|
||||||
|
%% LaTeX version 2008-05-04 or later.
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
|
||||||
|
|
||||||
|
\ProvidesPackage{janishutz-helpers}[2026-02-19 v1.0.0]
|
||||||
|
|
||||||
|
% Package imports
|
||||||
|
\RequirePackage[table, dvipsnames]{xcolor}
|
||||||
|
\RequirePackage{amsmath}
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\RequirePackage{subcaption}
|
||||||
|
\RequirePackage[export]{adjustbox}
|
||||||
|
\RequirePackage[most]{tcolorbox}
|
||||||
|
\RequirePackage{cancel}
|
||||||
|
\RequirePackage{dsfont}
|
||||||
|
\RequirePackage{amssymb}
|
||||||
|
\RequirePackage{mathrsfs}
|
||||||
|
\RequirePackage{lipsum}
|
||||||
|
\RequirePackage{ulem}
|
||||||
|
\RequirePackage{soul}
|
||||||
|
\RequirePackage{parskip}
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\RequirePackage{lastpage}
|
||||||
|
\RequirePackage{tocloft}
|
||||||
|
\RequirePackage{wasysym}
|
||||||
|
\RequirePackage{wrapfig}
|
||||||
|
\RequirePackage{multicol}
|
||||||
|
\RequirePackage{ifthen}
|
||||||
|
\RequirePackage[hidelinks]{hyperref}
|
||||||
|
\RequirePackage{enumitem}
|
||||||
|
\RequirePackage{gensymb}
|
||||||
|
\RequirePackage{pifont}
|
||||||
|
\RequirePackage{xstring}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
|
||||||
|
\newcounter{descriptorShadeStrength}
|
||||||
|
\newcounter{shadeStrength}
|
||||||
|
\newcommand{\currentLanguage}{en}
|
||||||
|
|
||||||
|
\setcounter{secnumdepth}{4}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ General config │
|
||||||
|
% └ ┘
|
||||||
|
% Configure your author name here
|
||||||
|
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
|
||||||
|
\newcommand{\authorHeaders}{Janis Hutz}
|
||||||
|
|
||||||
|
% Configure your address here
|
||||||
|
\newcommand{\name}{Janis Hutz}
|
||||||
|
\newcommand{\street}{Street}
|
||||||
|
\newcommand{\city}{City}
|
||||||
|
\newcommand{\countrycode}{CH}
|
||||||
|
|
||||||
|
% Set the default language
|
||||||
|
\renewcommand{\currentLanguage}{en}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Rendering │
|
||||||
|
% └ ┘
|
||||||
|
% Short descriptors are generated from the naming defined in naming.sty
|
||||||
|
% You may here configure how they are generated. #1 is the full name.
|
||||||
|
\newcommand{\shortDescriptorNameTemplate}[1]{\StrBefore[1]{#1}}
|
||||||
|
|
||||||
|
% Decide if the numbering should show a space preceding it.
|
||||||
|
% \newcommand{\useSpaceBeforeNumbering}{true}
|
||||||
|
% TODO: Remove above if works without
|
||||||
|
|
||||||
|
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
|
||||||
|
% - #1 is the name of the descriptor
|
||||||
|
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
|
||||||
|
% - #3 is the name passed (non-empty asserted)
|
||||||
|
\newcommand{\shortDescriptorTemplate}[4]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2} \textit{(#3)}\ }
|
||||||
|
\newcommand{\inlineDescriptorTemplate}[4]{\bg{#1color}{#1#2}: \textit{(#3)}\ }
|
||||||
|
|
||||||
|
% These are used if no name is provided and argument #4 from above is the missing argument
|
||||||
|
\newcommand{\anonymousShortDescriptorTemplate}[3]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2}\ }
|
||||||
|
\newcommand{\anonymousInlineDescriptorTemplate}[3]{\bg{#3color}{#1#2}\ }
|
||||||
|
|
||||||
|
% background command config (draws a small box around the content)
|
||||||
|
\newcommand{\backgroundPadding}{2pt}
|
||||||
|
\newcommand{\backgroundRounding}{0.1pt}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Colours │
|
||||||
|
% └ ┘
|
||||||
|
% The colour-saturation of the short / inline descriptors (default = 40)
|
||||||
|
\setcounter{descriptorShadeStrength}{40}
|
||||||
|
|
||||||
|
% The colour-saturation of the shade command (default = 20)
|
||||||
|
\setcounter{shadeStrength}{20}
|
||||||
|
|
||||||
|
% You may also use \definecolor{<name>}{rgb}{r, g, b} to define a fully custom color
|
||||||
|
% see https://www.overleaf.com/learn/latex/Using_colors_in_LaTeX#Creating_your_own_colors for more information
|
||||||
|
\colorlet{definitioncolor}{blue}
|
||||||
|
\colorlet{theoremcolor}{ForestGreen}
|
||||||
|
\colorlet{lemmacolor}{Aquamarine}
|
||||||
|
\colorlet{corollarycolor}{teal}
|
||||||
|
\colorlet{axiomcolor}{JungleGreen}
|
||||||
|
\colorlet{factcolor}{SeaGreen}
|
||||||
|
\colorlet{propositioncolor}{Cyan}
|
||||||
|
\colorlet{examplecolor}{gray}
|
||||||
|
\colorlet{formulacolor}{red}
|
||||||
|
\colorlet{remarkcolor}{green}
|
||||||
|
\colorlet{proofcolor}{magenta}
|
||||||
|
\colorlet{intuitioncolor}{Emerald}
|
||||||
|
\colorlet{termcolor}{orange}
|
||||||
|
\colorlet{notationcolor}{Peach}
|
||||||
|
\colorlet{taskcolor}{gray}
|
||||||
|
\colorlet{usagecolor}{LimeGreen}
|
||||||
|
\colorlet{recallcolor}{yellow}
|
||||||
|
\colorlet{propertiescolor}{purple}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Numbering │
|
||||||
|
% └ ┘
|
||||||
|
% Set a preset, can be combined, separate or off.
|
||||||
|
% If set to custom, all type specific commands need to be set below.
|
||||||
|
\newcommand{\numberingpreset}{combined}
|
||||||
|
|
||||||
|
% Specify how elements are to be numbered. Can be (X is the current number of the element):
|
||||||
|
% - none (X)
|
||||||
|
% - section (section.X)
|
||||||
|
% - subsection (section.subsection.X)
|
||||||
|
% - subsubsection (section.subsection.subsubsection.X)
|
||||||
|
% - paragraph (section.subsection.subsubsection.paragraph.X)
|
||||||
|
\newcommand{\subsectionnumbering}{subsection}
|
||||||
|
|
||||||
|
|
||||||
|
% Set for a specific type. Can each be combined, separate, default or off:
|
||||||
|
% If set to anything but 'default', it will override the overarching style
|
||||||
|
% set by \numberingpreset
|
||||||
|
\newcommand{\definitionnumbering}{default}
|
||||||
|
\newcommand{\theoremnumbering}{default}
|
||||||
|
\newcommand{\lemmanumbering}{default}
|
||||||
|
\newcommand{\corollarynumbering}{default}
|
||||||
|
\newcommand{\axiomnumbering}{default}
|
||||||
|
\newcommand{\factnumbering}{default}
|
||||||
|
\newcommand{\propositionnumbering}{default}
|
||||||
|
\newcommand{\examplenumbering}{default}
|
||||||
|
\newcommand{\formulanumbering}{default}
|
||||||
|
\newcommand{\remarknumbering}{default}
|
||||||
|
\newcommand{\proofnumbering}{default}
|
||||||
|
\newcommand{\intuitionnumbering}{default}
|
||||||
|
\newcommand{\termnumbering}{default}
|
||||||
|
\newcommand{\notationnumbering}{default}
|
||||||
|
\newcommand{\tasknumbering}{default}
|
||||||
|
\newcommand{\usagenumbering}{default}
|
||||||
|
\newcommand{\recallnumbering}{default}
|
||||||
|
\newcommand{\propertiesnumbering}{default}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Naming │
|
||||||
|
% └ ┘
|
||||||
|
% Here you may specify how each descriptor is named
|
||||||
|
\newcommand{\definitionNamingEN}{Definition}
|
||||||
|
\newcommand{\theoremNamingEN}{Theorem}
|
||||||
|
\newcommand{\lemmaNamingEN}{Lemma}
|
||||||
|
\newcommand{\corollaryNamingEN}{Corollary}
|
||||||
|
\newcommand{\axiomNamingEN}{Axiom}
|
||||||
|
\newcommand{\factNamingEN}{Fact}
|
||||||
|
\newcommand{\propositionNamingEN}{Proposition}
|
||||||
|
\newcommand{\exampleNamingEN}{Example}
|
||||||
|
\newcommand{\formulaNamingEN}{Formula}
|
||||||
|
\newcommand{\remarkNamingEN}{Remark}
|
||||||
|
\newcommand{\proofNamingEN}{Proof}
|
||||||
|
\newcommand{\intuitionNamingEN}{Intuition}
|
||||||
|
\newcommand{\termNamingEN}{Term}
|
||||||
|
\newcommand{\notationNamingEN}{Notation}
|
||||||
|
\newcommand{\taskNamingEN}{Task}
|
||||||
|
\newcommand{\usageNamingEN}{Usage}
|
||||||
|
\newcommand{\recallNamingEN}{Recall}
|
||||||
|
\newcommand{\propertiesNamingEN}{Properties}
|
||||||
|
|
||||||
|
\newcommand{\definitionNamingDE}{Definition}
|
||||||
|
\newcommand{\theoremNamingDE}{Theorem}
|
||||||
|
\newcommand{\lemmaNamingDE}{Lemma}
|
||||||
|
\newcommand{\corollaryNamingDE}{Korollar}
|
||||||
|
\newcommand{\axiomNamingDE}{Axiom}
|
||||||
|
\newcommand{\factNamingDE}{Fakt}
|
||||||
|
\newcommand{\propositionNamingDE}{Satz}
|
||||||
|
\newcommand{\exampleNamingDE}{Beispiel}
|
||||||
|
\newcommand{\formulaNamingDE}{Formel}
|
||||||
|
\newcommand{\remarkNamingDE}{Bemerkung}
|
||||||
|
\newcommand{\proofNamingDE}{Beweis}
|
||||||
|
\newcommand{\intuitionNamingDE}{Intuition}
|
||||||
|
\newcommand{\termNamingDE}{Begriff}
|
||||||
|
\newcommand{\notationNamingDE}{Notation}
|
||||||
|
\newcommand{\taskNamingDE}{Aufgabe}
|
||||||
|
\newcommand{\usageNamingDE}{Nutzung}
|
||||||
|
\newcommand{\recallNamingDE}{Repetition}
|
||||||
|
\newcommand{\propertiesNamingDE}{Eigenschaften}
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Translation │
|
||||||
|
% └ ┘
|
||||||
|
\newcommand{\translate}[2]{%
|
||||||
|
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}
|
||||||
|
}
|
||||||
|
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||||
|
|
||||||
|
% Translation aids (commonly used)
|
||||||
|
\newcommand{\trif}{\translate{if }{falls }}
|
||||||
|
\newcommand{\trIf}{\translate{If }{Falls }}
|
||||||
|
\newcommand{\trLet}{\translate{Let }{Sei }}
|
||||||
|
\newcommand{\trLets}{\translate{Let }{Seien }}
|
||||||
|
\newcommand{\trFor}{\translate{For }{Für }}
|
||||||
|
\newcommand{\trfor}{\translate{for }{für }}
|
||||||
|
\newcommand{\trand}{\translate{and }{und }}
|
||||||
|
\newcommand{\tror}{\translate{or }{oder }}
|
||||||
|
\newcommand{\trst}{\translate{s.t. }{s.d. }}
|
||||||
|
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
|
||||||
|
\newcommand{\trwith}{\translate{with }{mit }}
|
||||||
|
|
||||||
|
|
||||||
|
\DeclareOption{de}{
|
||||||
|
\RequirePackage[ngerman]{babel}
|
||||||
|
\renewcommand{\currentLanguage}{de}
|
||||||
|
}
|
||||||
|
\ProcessOptions
|
||||||
|
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ STYLE: Globals │
|
||||||
|
% └ ┘
|
||||||
|
% Global style configs for tcolorbox (to reduce bloat)
|
||||||
|
% \AtBeginDocument{
|
||||||
|
% \tcbset{
|
||||||
|
% mainboxstyle/.style={
|
||||||
|
% arc=3mm,
|
||||||
|
% colback=red!5!white,
|
||||||
|
% colframe=red!75!black,
|
||||||
|
% colbacktitle=red!75!black,
|
||||||
|
% fonttitle=\bfseries,
|
||||||
|
% enhanced,
|
||||||
|
% attach boxed title to top left={yshift=-2mm,xshift=5mm},
|
||||||
|
% breakable,
|
||||||
|
% top=0.4cm,
|
||||||
|
% }
|
||||||
|
% }
|
||||||
|
% \tikzset{
|
||||||
|
% overlaystyle/.style={
|
||||||
|
% draw=red!75!black,
|
||||||
|
% thick,
|
||||||
|
% fill=red!75!black,
|
||||||
|
% left,
|
||||||
|
% anchor=east,
|
||||||
|
% text=white,
|
||||||
|
% rounded corners=1mm,
|
||||||
|
% font=\bfseries,
|
||||||
|
% xshift=-5mm,
|
||||||
|
% yshift=1mm,
|
||||||
|
% inner xsep=3mm,
|
||||||
|
% inner ysep=1.5mm
|
||||||
|
% }
|
||||||
|
% }
|
||||||
|
% }
|
||||||
|
|
||||||
|
% ── Fonts ───────────────────────────────────────────────────────────
|
||||||
|
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
|
||||||
|
\newcommand{\setFontType}[1]{
|
||||||
|
\ifthenelse{\equal{#1}{mono}}{
|
||||||
|
\renewcommand{\familydefault}{\ttdefault}
|
||||||
|
}{
|
||||||
|
\ifthenelse{\equal{#1}{serif}}{
|
||||||
|
\renewcommand{\familydefault}{\rmdefault}
|
||||||
|
}{
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
% ── Small common style elements ─────────────────────────────────────
|
||||||
|
% Spacing (vertical)
|
||||||
|
% TODO: Rework
|
||||||
|
\newcommand{\hrmvspace}{\vspace{-0.25pc}}
|
||||||
|
\newcommand{\rmvspace}{\vspace{-0.5pc}}
|
||||||
|
\newcommand{\mrmvspace}{\vspace{-0.75pc}}
|
||||||
|
\newcommand{\drmvspace}{\vspace{-1pc}}
|
||||||
|
\newcommand{\dhrmvspace}{\vspace{-1.25pc}}
|
||||||
|
\newcommand{\dnrmvspace}{\vspace{-1.5pc}}
|
||||||
|
\newcommand{\dmrmvspace}{\vspace{-1.75pc}}
|
||||||
|
\newcommand{\ddrmvspace}{\vspace{-2pc}}
|
||||||
|
|
||||||
|
% Spacing (horizontal)
|
||||||
|
\newcommand{\smallhspace}{\hspace{2mm}}
|
||||||
|
\newcommand{\mediumhspace}{\hspace{5mm}}
|
||||||
|
\newcommand{\largehspace}{\hspace{1cm}}
|
||||||
|
|
||||||
|
% other elements
|
||||||
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
|
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
|
||||||
|
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
|
||||||
|
\renewcommand{\quote}[1]{``\textit{#1}''}
|
||||||
|
|
||||||
|
% Add a color shade (similar to \fhlc, but nicer boxes)
|
||||||
|
\newcommand{\background}[3]{%
|
||||||
|
\tcbox[on line,
|
||||||
|
boxsep=\backgroundPadding,
|
||||||
|
arc=\backgroundRounding,
|
||||||
|
left=0pt,
|
||||||
|
right=0pt,
|
||||||
|
top=0pt,
|
||||||
|
bottom=0pt,
|
||||||
|
frame empty,
|
||||||
|
colback=#1!#2!white,
|
||||||
|
highlight math style={enhanced}
|
||||||
|
] {\textbf{#3}}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Abstraction of background, where the brightness is set to 20%
|
||||||
|
\newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}}
|
||||||
|
|
||||||
|
% This command is used for the short and inline descriptors
|
||||||
|
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
|
||||||
|
|
||||||
|
% Print a table of contents as a tcolorbox
|
||||||
|
\newcommand{\printtoc}[1]{
|
||||||
|
\renewcommand{\cfttoctitlefont}{}
|
||||||
|
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
|
||||||
|
\renewcommand{\contentsname}{}
|
||||||
|
\begin{tcolorbox}[
|
||||||
|
colback=black!5!white,
|
||||||
|
colbacktitle=#1!75!black,
|
||||||
|
coltitle=black,
|
||||||
|
enhanced,
|
||||||
|
attach boxed title to top center={yshift=-2mm},
|
||||||
|
title={\Large \tr{Contents}{Inhaltsverzeichnis}},
|
||||||
|
fonttitle=\bfseries,
|
||||||
|
breakable
|
||||||
|
]
|
||||||
|
\hspace{1cm}
|
||||||
|
\tableofcontents
|
||||||
|
\end{tcolorbox}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
\newcommand{\countrycode}{CH}
|
\newcommand{\countrycode}{CH}
|
||||||
|
|
||||||
% Set the default language
|
% Set the default language
|
||||||
\newcommand{\currentLanguage}{en}
|
\renewcommand{\currentLanguage}{en}
|
||||||
|
|
||||||
|
|
||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
@@ -23,19 +23,19 @@
|
|||||||
\newcommand{\shortDescriptorNameTemplate}[1]{\StrBefore[1]{#1}}
|
\newcommand{\shortDescriptorNameTemplate}[1]{\StrBefore[1]{#1}}
|
||||||
|
|
||||||
% Decide if the numbering should show a space preceding it.
|
% Decide if the numbering should show a space preceding it.
|
||||||
\newcommand{\useSpaceBeforeNumbering}{true}
|
% \newcommand{\useSpaceBeforeNumbering}{true}
|
||||||
|
% TODO: Remove above if works without
|
||||||
|
|
||||||
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
|
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
|
||||||
% - #1 is the name of the descriptor (or the shortened version, as configured)
|
% - #1 is the name of the descriptor
|
||||||
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
|
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
|
||||||
% - #3 is the corresponding color
|
% - #3 is the name passed (non-empty asserted)
|
||||||
% - #4 is the name passed (non-empty)
|
\newcommand{\shortDescriptorTemplate}[4]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2} \textit{(#3)}\ }
|
||||||
\newcommand{\shortDescriptorTemplate}[4]{\bg{#3}{#1#2} \textit{(#4)}}
|
\newcommand{\inlineDescriptorTemplate}[4]{\bg{#1color}{#1#2}: \textit{(#3)}\ }
|
||||||
\newcommand{\inlineDescriptorTemplate}[4]{\bg{#3}{#1#2} \textit{(#4)}}
|
|
||||||
|
|
||||||
% These are used if no name is provided and argument #4 from above is the missing argument
|
% These are used if no name is provided and argument #4 from above is the missing argument
|
||||||
\newcommand{\anonymousShortDescriptorTemplate}[3]{\bg{#3}{#1#2}}
|
\newcommand{\anonymousShortDescriptorTemplate}[3]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2}\ }
|
||||||
\newcommand{\anonymousInlineDescriptorTemplate}[3]{\bg{#3}{#1#2}}
|
\newcommand{\anonymousInlineDescriptorTemplate}[3]{\bg{#3color}{#1#2}\ }
|
||||||
|
|
||||||
% background command config (draws a small box around the content)
|
% background command config (draws a small box around the content)
|
||||||
\newcommand{\backgroundPadding}{2pt}
|
\newcommand{\backgroundPadding}{2pt}
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
% │ Colours │
|
% │ Colours │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
|
% The colour-saturation of the short / inline descriptors (default = 40)
|
||||||
|
\setcounter{descriptorShadeStrength}{40}
|
||||||
|
|
||||||
|
% The colour-saturation of the shade command (default = 20)
|
||||||
|
\setcounter{shadeStrength}{20}
|
||||||
|
|
||||||
% You may also use \definecolor{<name>}{rgb}{r, g, b} to define a fully custom color
|
% You may also use \definecolor{<name>}{rgb}{r, g, b} to define a fully custom color
|
||||||
% see https://www.overleaf.com/learn/latex/Using_colors_in_LaTeX#Creating_your_own_colors for more information
|
% see https://www.overleaf.com/learn/latex/Using_colors_in_LaTeX#Creating_your_own_colors for more information
|
||||||
\colorlet{definitioncolor}{blue}
|
\colorlet{definitioncolor}{blue}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
% │ Numbering │
|
% │ Numbering │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
% Set a preset, can be combined, separate, custom or off.
|
% Set a preset, can be combined, separate or off.
|
||||||
% If set to custom, all type specific commands need to be set below.
|
% If set to custom, all type specific commands need to be set below.
|
||||||
\newcommand{\numberingpreset}{combined}
|
\newcommand{\numberingpreset}{combined}
|
||||||
|
|
||||||
|
|||||||
@@ -25,5 +25,10 @@
|
|||||||
\RequirePackage{gensymb}
|
\RequirePackage{gensymb}
|
||||||
\RequirePackage{pifont}
|
\RequirePackage{pifont}
|
||||||
\RequirePackage{xstring}
|
\RequirePackage{xstring}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
|
||||||
|
\newcounter{descriptorShadeStrength}
|
||||||
|
\newcounter{shadeStrength}
|
||||||
|
\newcommand{\currentLanguage}{en}
|
||||||
|
|
||||||
\setcounter{secnumdepth}{4}
|
\setcounter{secnumdepth}{4}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
\newcommand{\Indent}{\hspace{\algorithmicindent}}
|
\newcommand{\Indent}{\hspace{\algorithmicindent}}
|
||||||
|
|
||||||
\newcommand{\tc}[]{\tco{#1}}
|
\newcommand{\tc}[1]{\tco{#1}}
|
||||||
\newcommand{\tct}[1]{\Theta\left(#1\right)}
|
\newcommand{\tct}[1]{\Theta\left(#1\right)}
|
||||||
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
|
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
|
||||||
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
|
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
% │ Translation │
|
% │ Translation │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
|
\newcommand{\translate}[2]{%
|
||||||
|
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}
|
||||||
|
}
|
||||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||||
|
|
||||||
% Translation aids (commonly used)
|
% Translation aids (commonly used)
|
||||||
@@ -10,7 +10,3 @@
|
|||||||
%% LaTeX version 2008-05-04 or later.
|
%% LaTeX version 2008-05-04 or later.
|
||||||
|
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesPackage{janishutz-helpers}[2026-02-10 v1.0.0]
|
|
||||||
|
|
||||||
\newcounter{descriptorShadeStrength}
|
|
||||||
\newcounter{shadeStrength}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
\RequirePackage[ngerman]{babel}
|
|
||||||
\renewcommand{\currentLanguage}{de}
|
|
||||||
5
src/opts.sty
Normal file
5
src/opts.sty
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
\DeclareOption{de}{
|
||||||
|
\RequirePackage[ngerman]{babel}
|
||||||
|
\renewcommand{\currentLanguage}{de}
|
||||||
|
}
|
||||||
|
\ProcessOptions
|
||||||
@@ -2,37 +2,37 @@
|
|||||||
% │ STYLE: Globals │
|
% │ STYLE: Globals │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
% Global style configs for tcolorbox (to reduce bloat)
|
% Global style configs for tcolorbox (to reduce bloat)
|
||||||
\AtBeginDocument{
|
% \AtBeginDocument{
|
||||||
\tcbset{
|
% \tcbset{
|
||||||
mainboxstyle/.style={
|
% mainboxstyle/.style={
|
||||||
arc=3mm,
|
% arc=3mm,
|
||||||
colback=red!5!white,
|
% colback=red!5!white,
|
||||||
colframe=red!75!black,
|
% colframe=red!75!black,
|
||||||
colbacktitle=red!75!black,
|
% colbacktitle=red!75!black,
|
||||||
fonttitle=\bfseries,
|
% fonttitle=\bfseries,
|
||||||
enhanced,
|
% enhanced,
|
||||||
attach boxed title to top left={yshift=-2mm,xshift=5mm},
|
% attach boxed title to top left={yshift=-2mm,xshift=5mm},
|
||||||
breakable,
|
% breakable,
|
||||||
top=0.4cm,
|
% top=0.4cm,
|
||||||
}
|
% }
|
||||||
}
|
% }
|
||||||
\tikzset{
|
% \tikzset{
|
||||||
overlaystyle/.style={
|
% overlaystyle/.style={
|
||||||
draw=red!75!black,
|
% draw=red!75!black,
|
||||||
thick,
|
% thick,
|
||||||
fill=red!75!black,
|
% fill=red!75!black,
|
||||||
left,
|
% left,
|
||||||
anchor=east,
|
% anchor=east,
|
||||||
text=white,
|
% text=white,
|
||||||
rounded corners=1mm,
|
% rounded corners=1mm,
|
||||||
font=\bfseries,
|
% font=\bfseries,
|
||||||
xshift=-5mm,
|
% xshift=-5mm,
|
||||||
yshift=1mm,
|
% yshift=1mm,
|
||||||
inner xsep=3mm,
|
% inner xsep=3mm,
|
||||||
inner ysep=1.5mm
|
% inner ysep=1.5mm
|
||||||
}
|
% }
|
||||||
}
|
% }
|
||||||
}
|
% }
|
||||||
|
|
||||||
% ── Fonts ───────────────────────────────────────────────────────────
|
% ── Fonts ───────────────────────────────────────────────────────────
|
||||||
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
|
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
|
||||||
@@ -72,7 +72,8 @@
|
|||||||
\renewcommand{\quote}[1]{``\textit{#1}''}
|
\renewcommand{\quote}[1]{``\textit{#1}''}
|
||||||
|
|
||||||
% Add a color shade (similar to \fhlc, but nicer boxes)
|
% Add a color shade (similar to \fhlc, but nicer boxes)
|
||||||
\newcommand{\background}[3]{\tcbox[on line,
|
\newcommand{\background}[3]{%
|
||||||
|
\tcbox[on line,
|
||||||
boxsep=\backgroundPadding,
|
boxsep=\backgroundPadding,
|
||||||
arc=\backgroundRounding,
|
arc=\backgroundRounding,
|
||||||
left=0pt,
|
left=0pt,
|
||||||
@@ -82,26 +83,8 @@
|
|||||||
frame empty,
|
frame empty,
|
||||||
colback=#1!#2!white,
|
colback=#1!#2!white,
|
||||||
highlight math style={enhanced}
|
highlight math style={enhanced}
|
||||||
] {\textbf{#3}}}
|
] {\textbf{#3}}%
|
||||||
|
}
|
||||||
% Abstraction of background, where the brightness is set to 20%
|
|
||||||
\newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}}
|
|
||||||
|
|
||||||
% This command is used for the short and inline descriptors
|
|
||||||
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
|
|
||||||
|
|
||||||
% Add a color shade (similar to \fhlc, but nicer boxes)
|
|
||||||
\newcommand{\background}[3]{\tcbox[on line,
|
|
||||||
boxsep=\backgroundPadding,
|
|
||||||
arc=\backgroundRounding,
|
|
||||||
left=0pt,
|
|
||||||
right=0pt,
|
|
||||||
top=0pt,
|
|
||||||
bottom=0pt,
|
|
||||||
frame empty,
|
|
||||||
colback=#1!#2!white,
|
|
||||||
highlight math style={enhanced}
|
|
||||||
] {\textbf{#3}}}
|
|
||||||
|
|
||||||
% Abstraction of background, where the brightness is set to 20%
|
% Abstraction of background, where the brightness is set to 20%
|
||||||
\newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}}
|
\newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}}
|
||||||
@@ -114,8 +97,16 @@
|
|||||||
\renewcommand{\cfttoctitlefont}{}
|
\renewcommand{\cfttoctitlefont}{}
|
||||||
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
|
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
|
||||||
\renewcommand{\contentsname}{}
|
\renewcommand{\contentsname}{}
|
||||||
\begin{tcolorbox}[colback=black!5!white,colbacktitle=#1!75!black,coltitle=black,enhanced,attach boxed title to top center={yshift=-2mm},
|
\begin{tcolorbox}[
|
||||||
title={\Large \ifnum\value{lang}<2{Contents}\else {Inhaltsverzeichnis}\fi},fonttitle=\bfseries,breakable]
|
colback=black!5!white,
|
||||||
|
colbacktitle=#1!75!black,
|
||||||
|
coltitle=black,
|
||||||
|
enhanced,
|
||||||
|
attach boxed title to top center={yshift=-2mm},
|
||||||
|
title={\Large \tr{Contents}{Inhaltsverzeichnis}},
|
||||||
|
fonttitle=\bfseries,
|
||||||
|
breakable
|
||||||
|
]
|
||||||
\hspace{1cm}
|
\hspace{1cm}
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
\end{tcolorbox}
|
\end{tcolorbox}
|
||||||
|
|||||||
100
src/style/counters.sty
Normal file
100
src/style/counters.sty
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
% ── Label generator ─────────────────────────────────────────────────
|
||||||
|
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
|
||||||
|
\newcommand{\printCounter}[1]{\csname the#1\endcsname}
|
||||||
|
|
||||||
|
\newcommand{\printLabel}[1]{%
|
||||||
|
\ifcsdef{#1numbering}{% Extra config present
|
||||||
|
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{
|
||||||
|
\printCounter{#1\subsectionnumbering}%
|
||||||
|
}{
|
||||||
|
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{
|
||||||
|
\printCounter{#1\subsectionnumbering}%
|
||||||
|
}{
|
||||||
|
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{
|
||||||
|
\printCounter{combined\subsectionnumbering}%
|
||||||
|
}{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}{%
|
||||||
|
\labelPrintBackendRoutine{#1}%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\newcommand{\labelPrintBackendRoutine}[1]{
|
||||||
|
\ifthenelse{\equal{\numberingpreset}{combined}}{
|
||||||
|
\printCounter{combined\subsectionnumbering}%
|
||||||
|
}{
|
||||||
|
\ifthenelse{\equal{\numberingpreset}{separate}}{
|
||||||
|
\printCounter{#1\subsectionnumbering}%
|
||||||
|
}{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Inline environments (inline)
|
||||||
|
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
|
||||||
|
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
|
||||||
|
|
||||||
|
\newcommand{\inline}[2][__NONAME__]{%
|
||||||
|
\ifthenelse{\equal{__NONAME__}{#1}}{%
|
||||||
|
\anonymousInlineDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||||
|
}{%
|
||||||
|
\inlineDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\short}[2][__NONAME__]{%
|
||||||
|
\ifthenelse{\equal{__NONAME__}{#1}}{%
|
||||||
|
\anonymousShortDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||||
|
}{%
|
||||||
|
\shortDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
% ── Set the current number of a label ───────────────────────────────
|
||||||
|
\newcommand{\setLabelNumber}[2]{%
|
||||||
|
\setcounter{#1none}{#2}%
|
||||||
|
\addtocounter{#1none}{-1}%
|
||||||
|
\setcounter{#1section}{#2}%
|
||||||
|
\addtocounter{#1section}{-1}%
|
||||||
|
\setcounter{#1subsection}{#2}%
|
||||||
|
\addtocounter{#1subsection}{-1}%
|
||||||
|
\setcounter{#1subsubsection}{#2}%
|
||||||
|
\addtocounter{#1subsubsection}{-1}%
|
||||||
|
\setcounter{#1paragraph}{#2}%
|
||||||
|
\addtocounter{#1paragraph}{-1}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\stepLabelNumber}[1]{%
|
||||||
|
\stepcounter{#1none}%
|
||||||
|
\stepcounter{#1section}%
|
||||||
|
\stepcounter{#1subsection}%
|
||||||
|
\stepcounter{#1subsubsection}%
|
||||||
|
\stepcounter{#1paragraph}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% ┌ ┐
|
||||||
|
% │ Counter numbering │
|
||||||
|
% └ ┘
|
||||||
|
% TODO: Update
|
||||||
|
\newcommand{\preTableAndFigHook}[1]{%
|
||||||
|
\ifnum\value{numberingConfig}>1%
|
||||||
|
\ifnum\value{numberSubsections}=1%
|
||||||
|
\stepcounter{allss}%
|
||||||
|
\else
|
||||||
|
\ifnum\value{numberSubsections}=2%
|
||||||
|
\stepcounter{allsss}%
|
||||||
|
\else%
|
||||||
|
\stepcounter{all}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\renewcommand{\thetable}{\arabic{table}}
|
||||||
|
\renewcommand{\thefigure}{\arabic{figure}}
|
||||||
|
}
|
||||||
|
\AtBeginEnvironment{table}{\preTableAndFigHook{table}}
|
||||||
|
\AtBeginEnvironment{figure}{\preTableAndFigHook{figure}}
|
||||||
|
|
||||||
|
|
||||||
|
\newcommand{\newsection}{
|
||||||
|
\newpage
|
||||||
|
\newsectionNoPB
|
||||||
|
}
|
||||||
@@ -1,396 +0,0 @@
|
|||||||
\RequirePackage{etoolbox}
|
|
||||||
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
|
|
||||||
\newcounter{lemma}[section]
|
|
||||||
\newcounter{definition}[section]
|
|
||||||
\newcounter{corollary}[section]
|
|
||||||
\newcounter{theorem}[section]
|
|
||||||
\newcounter{axiom}[section]
|
|
||||||
\newcounter{example}[section]
|
|
||||||
\newcounter{fact}[section]
|
|
||||||
\newcounter{proposition}[section]
|
|
||||||
\newcounter{formula}[section]
|
|
||||||
\newcounter{remark}[section]
|
|
||||||
\newcounter{all}[section]
|
|
||||||
|
|
||||||
\newcounter{lemmass}[subsection]
|
|
||||||
\newcounter{definitionss}[subsection]
|
|
||||||
\newcounter{corollaryss}[subsection]
|
|
||||||
\newcounter{theoremss}[subsection]
|
|
||||||
\newcounter{axiomss}[subsection]
|
|
||||||
\newcounter{exampless}[subsection]
|
|
||||||
\newcounter{factss}[subsection]
|
|
||||||
\newcounter{propositionss}[subsection]
|
|
||||||
\newcounter{formulass}[subsection]
|
|
||||||
\newcounter{remarkss}[subsection]
|
|
||||||
\newcounter{allss}[subsection]
|
|
||||||
|
|
||||||
\newcounter{lemmasss}[subsubsection]
|
|
||||||
\newcounter{definitionsss}[subsubsection]
|
|
||||||
\newcounter{corollarysss}[subsubsection]
|
|
||||||
\newcounter{theoremsss}[subsubsection]
|
|
||||||
\newcounter{axiomsss}[subsubsection]
|
|
||||||
\newcounter{examplesss}[subsubsection]
|
|
||||||
\newcounter{factsss}[subsubsection]
|
|
||||||
\newcounter{propositionsss}[subsubsection]
|
|
||||||
\newcounter{formulasss}[subsubsection]
|
|
||||||
\newcounter{remarksss}[subsubsection]
|
|
||||||
\newcounter{allsss}[subsubsection]
|
|
||||||
|
|
||||||
% ── 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]{%
|
|
||||||
\csname the#1\endcsname
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\suffix}{ss}
|
|
||||||
\newcommand{\sectionNumbering}{\thesection}
|
|
||||||
|
|
||||||
% ┌ ┐
|
|
||||||
% │ Counter numbering │
|
|
||||||
% └ ┘
|
|
||||||
\newcommand{\preTableAndFigHook}[1]{%
|
|
||||||
\ifnum\value{numberingConfig}>1%
|
|
||||||
\ifnum\value{numberSubsections}=1%
|
|
||||||
\stepcounter{allss}%
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2%
|
|
||||||
\stepcounter{allsss}%
|
|
||||||
\else%
|
|
||||||
\stepcounter{all}%
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\AtBeginEnvironment{table}{\preTableAndFigHook{table}}
|
|
||||||
\AtBeginEnvironment{figure}{\preTableAndFigHook{figure}}
|
|
||||||
|
|
||||||
\newcommand{\applyTableAndFigureNumbering}{
|
|
||||||
% Tables & Figures
|
|
||||||
\ifnum\value{numberingConfig}=0
|
|
||||||
\renewcommand{\thetable}{\arabic{table}}
|
|
||||||
\renewcommand{\thefigure}{\arabic{figure}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberingConfig}=1
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{table}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=1
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{allss}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2
|
|
||||||
\renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}}
|
|
||||||
\else
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{all}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{all}}
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\setSubsectionNumbering}[1]{
|
|
||||||
\setcounter{numberSubsections}{#1}
|
|
||||||
\applySubsectionNumbering
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\applySubsectionNumbering}{
|
|
||||||
\ifnum\value{numberSubsections}=1
|
|
||||||
\renewcommand{\sectionNumbering}{\thesubsection}
|
|
||||||
\renewcommand{\suffix}{ss}
|
|
||||||
\typeout{Numbering as section.subsection.number}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2
|
|
||||||
\renewcommand{\sectionNumbering}{\thesubsubsection}
|
|
||||||
\renewcommand{\suffix}{sss}
|
|
||||||
\typeout{Numbering as section.subsection.subsubsection.number}
|
|
||||||
\else
|
|
||||||
\renewcommand{\sectionNumbering}{\thesection}
|
|
||||||
\renewcommand{\suffix}{}
|
|
||||||
\typeout{Numbering as section.number}
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\applyTableAndFigureNumbering
|
|
||||||
|
|
||||||
\renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}}
|
|
||||||
\renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}}
|
|
||||||
\renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}}
|
|
||||||
\renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}}
|
|
||||||
\renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}}
|
|
||||||
\renewcommand{\theexample}{\sectionNumbering.\arabic{example}}
|
|
||||||
\renewcommand{\thefact}{\sectionNumbering.\arabic{fact}}
|
|
||||||
\renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}}
|
|
||||||
\renewcommand{\theformula}{\sectionNumbering.\arabic{formula}}
|
|
||||||
\renewcommand{\theremark}{\sectionNumbering.\arabic{remark}}
|
|
||||||
\renewcommand{\theall}{\sectionNumbering.\arabic{all}}
|
|
||||||
|
|
||||||
\renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}}
|
|
||||||
\renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}}
|
|
||||||
\renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}}
|
|
||||||
\renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}}
|
|
||||||
\renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}}
|
|
||||||
\renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}}
|
|
||||||
\renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}}
|
|
||||||
\renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}}
|
|
||||||
\renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}}
|
|
||||||
\renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}}
|
|
||||||
\renewcommand{\theallss}{\sectionNumbering.\arabic{allss}}
|
|
||||||
|
|
||||||
\renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}}
|
|
||||||
\renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}}
|
|
||||||
\renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}}
|
|
||||||
\renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}}
|
|
||||||
\renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}}
|
|
||||||
\renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}}
|
|
||||||
\renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}}
|
|
||||||
\renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}}
|
|
||||||
\renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}}
|
|
||||||
\renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}}
|
|
||||||
\renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}}
|
|
||||||
}
|
|
||||||
\applySubsectionNumbering
|
|
||||||
|
|
||||||
% ── Label generation ────────────────────────────────────────────────
|
|
||||||
\newcommand{\labelSectionGeneration}{%
|
|
||||||
\ifnum\value{numberSubsections}=1
|
|
||||||
\arabic{section}-\arabic{subsection}%
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2
|
|
||||||
\arabic{section}-\arabic{subsection}-\arabic{subsubsection}%
|
|
||||||
\else
|
|
||||||
\arabic{section}%
|
|
||||||
\fi
|
|
||||||
\fi}
|
|
||||||
|
|
||||||
\newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}}
|
|
||||||
\newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2}
|
|
||||||
|
|
||||||
% ┌ ┐
|
|
||||||
% │ Number the counters appropriately │
|
|
||||||
% └ ┘
|
|
||||||
\newcommand{\usenumberArabic}[1]{%
|
|
||||||
\ifnum\value{numberingConfig}=1
|
|
||||||
\labelIt{#1}
|
|
||||||
\printcounter{#1\suffix}%
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberingConfig}=2
|
|
||||||
\ifthenelse{\equal{#1}{definitions}}{%
|
|
||||||
\labelIt{definition}
|
|
||||||
\printcounter{definition\suffix}%
|
|
||||||
}{%
|
|
||||||
\labelIt{all}
|
|
||||||
\printcounter{all\suffix}%
|
|
||||||
}%
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberingConfig}=3
|
|
||||||
\labelIt{all}
|
|
||||||
\printcounter{all\suffix}%
|
|
||||||
\else
|
|
||||||
\relax%
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi}
|
|
||||||
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ┌ ┐
|
|
||||||
% │ 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}
|
|
||||||
\ifthenelse{\equal{#1}{0}}{}{
|
|
||||||
\setcounter{numberingConfigStore}{#1}
|
|
||||||
}
|
|
||||||
\applyTableAndFigureNumbering
|
|
||||||
}
|
|
||||||
|
|
||||||
% Enable / disable numbering
|
|
||||||
\newcommand{\numberingOff}{
|
|
||||||
\setcounter{numberingConfig}{0}
|
|
||||||
\applyTableAndFigureNumbering
|
|
||||||
}
|
|
||||||
\newcommand{\numberingOn}{
|
|
||||||
\setcounter{numberingConfig}{\value{numberingConfigStore}}
|
|
||||||
\applyTableAndFigureNumbering
|
|
||||||
}
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Reset definition, lemma, etc counters, add a │
|
|
||||||
% │ new page │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
\newcommand{\newsection}{
|
|
||||||
\newpage
|
|
||||||
\newsectionNoPB
|
|
||||||
}
|
|
||||||
|
|
||||||
% ── Reset definitions, lemma, etc counters, do not add new page ─────
|
|
||||||
\newcommand{\newsectionNoPB}{
|
|
||||||
\setcounter{lemma}{0}
|
|
||||||
\setcounter{definition}{0}
|
|
||||||
\setcounter{corollary}{0}
|
|
||||||
\setcounter{theorem}{0}
|
|
||||||
\setcounter{axiom}{0}
|
|
||||||
\setcounter{example}{0}
|
|
||||||
\setcounter{fact}{0}
|
|
||||||
\setcounter{proposition}{0}
|
|
||||||
\setcounter{formula}{0}
|
|
||||||
\setcounter{remark}{0}
|
|
||||||
\setcounter{all}{0}
|
|
||||||
|
|
||||||
\setcounter{lemmass}{0}
|
|
||||||
\setcounter{definitionss}{0}
|
|
||||||
\setcounter{corollaryss}{0}
|
|
||||||
\setcounter{theoremss}{0}
|
|
||||||
\setcounter{axiomss}{0}
|
|
||||||
\setcounter{exampless}{0}
|
|
||||||
\setcounter{factss}{0}
|
|
||||||
\setcounter{propositionss}{0}
|
|
||||||
\setcounter{formulass}{0}
|
|
||||||
\setcounter{remarkss}{0}
|
|
||||||
\setcounter{allss}{0}
|
|
||||||
|
|
||||||
\setcounter{lemmasss}{0}
|
|
||||||
\setcounter{definitionsss}{0}
|
|
||||||
\setcounter{corollarysss}{0}
|
|
||||||
\setcounter{theoremsss}{0}
|
|
||||||
\setcounter{axiomsss}{0}
|
|
||||||
\setcounter{examplesss}{0}
|
|
||||||
\setcounter{factsss}{0}
|
|
||||||
\setcounter{propositionsss}{0}
|
|
||||||
\setcounter{formulasss}{0}
|
|
||||||
\setcounter{remarksss}{0}
|
|
||||||
\setcounter{allsss}{0}
|
|
||||||
|
|
||||||
% Tables & Figures
|
|
||||||
\setcounter{table}{0}
|
|
||||||
\setcounter{figure}{0}
|
|
||||||
}
|
|
||||||
\newsectionNoPB % Initializes
|
|
||||||
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Tcolorboxes │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
% Definitions
|
|
||||||
\newtcolorbox{definition}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large Definition\usenumberArabic{definition}};},#1}
|
|
||||||
|
|
||||||
% Theorems
|
|
||||||
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1}
|
|
||||||
|
|
||||||
% Lemmas
|
|
||||||
\newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1}
|
|
||||||
|
|
||||||
% Corollaries
|
|
||||||
\newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1}
|
|
||||||
|
|
||||||
% Axioms
|
|
||||||
\newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1}
|
|
||||||
|
|
||||||
% Facts
|
|
||||||
\newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1}
|
|
||||||
|
|
||||||
% Propositions
|
|
||||||
\newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1}
|
|
||||||
|
|
||||||
% Examples
|
|
||||||
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1}
|
|
||||||
|
|
||||||
% Formula
|
|
||||||
\newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1}
|
|
||||||
|
|
||||||
% Remark
|
|
||||||
\newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1}
|
|
||||||
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Inline environments │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
|
|
||||||
% Inline environments (inline)
|
|
||||||
\newcommand{\inlineex}{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:}}
|
|
||||||
\newcommand{\inlinedef}{\bg{blue}{Definition\usenumberArabic{definition}:}}
|
|
||||||
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:}}
|
|
||||||
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:}}
|
|
||||||
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:}}
|
|
||||||
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:}}
|
|
||||||
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:}}
|
|
||||||
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:}}
|
|
||||||
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition\usenumberArabic{proposition}:}}
|
|
||||||
\newcommand{\inlineremark}{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:}}
|
|
||||||
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
|
|
||||||
|
|
||||||
% Enhanced inline environments
|
|
||||||
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancydef}[1]{\bg{blue}{Definition\usenumberArabic{definition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition\usenumberArabic{proposition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyremark}[1]{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
|
|
||||||
|
|
||||||
% short environments (abbreviated)
|
|
||||||
\newcommand{\shortex}{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:}}
|
|
||||||
\newcommand{\shortdef}{\bg{blue}{D\usenumberArabic{definition}:}}
|
|
||||||
\newcommand{\short}{\bg{red}{F\usenumberArabic{formula}:}}
|
|
||||||
\newcommand{\shortlemma}{\bg{Aquamarine}{L\usenumberArabic{lemma}:}}
|
|
||||||
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:}}
|
|
||||||
\newcommand{\shortaxiom}{\bg{JungleGreen}{A\usenumberArabic{axiom}:}}
|
|
||||||
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:}}
|
|
||||||
\newcommand{\shortfact}{\bg{SeaGreen}{F\usenumberArabic{fact}:}}
|
|
||||||
\newcommand{\shortproposition}{\bg{Cyan}{P\usenumberArabic{proposition}:}}
|
|
||||||
\newcommand{\shortremark}{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:}}
|
|
||||||
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
|
|
||||||
|
|
||||||
% Enhanced short environments (abbreviated)
|
|
||||||
\newcommand{\compactex}[1]{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L\usenumberArabic{lemma}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A\usenumberArabic{axiom}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactproposition}[1]{\bg{Cyan}{P\usenumberArabic{proposition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactremark}[1]{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
|
|
||||||
@@ -1,189 +0,0 @@
|
|||||||
\RequirePackage{etoolbox}
|
|
||||||
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
|
|
||||||
\newcounter{lemmanone}
|
|
||||||
\newcounter{definitionnone}
|
|
||||||
\newcounter{corollarynone}
|
|
||||||
\newcounter{theoremnone}
|
|
||||||
\newcounter{axiomnone}
|
|
||||||
\newcounter{examplenone}
|
|
||||||
\newcounter{factnone}
|
|
||||||
\newcounter{propositionnone}
|
|
||||||
\newcounter{formulanone}
|
|
||||||
\newcounter{remarknone}
|
|
||||||
\newcounter{allnone}
|
|
||||||
|
|
||||||
\newcounter{lemmasection}[section]
|
|
||||||
\newcounter{definitionsection}[section]
|
|
||||||
\newcounter{corollarysection}[section]
|
|
||||||
\newcounter{theoremsection}[section]
|
|
||||||
\newcounter{axiomsection}[section]
|
|
||||||
\newcounter{examplesection}[section]
|
|
||||||
\newcounter{factsection}[section]
|
|
||||||
\newcounter{propositionsection}[section]
|
|
||||||
\newcounter{formulasection}[section]
|
|
||||||
\newcounter{remarksection}[section]
|
|
||||||
\newcounter{allsection}[section]
|
|
||||||
|
|
||||||
\newcounter{lemmasubsection}[subsection]
|
|
||||||
\newcounter{definitionsubsection}[subsection]
|
|
||||||
\newcounter{corollarysubsection}[subsection]
|
|
||||||
\newcounter{theoremsubsection}[subsection]
|
|
||||||
\newcounter{axiomsubsection}[subsection]
|
|
||||||
\newcounter{examplesubsection}[subsection]
|
|
||||||
\newcounter{factsubsection}[subsection]
|
|
||||||
\newcounter{propositionsubsection}[subsection]
|
|
||||||
\newcounter{formulasubsection}[subsection]
|
|
||||||
\newcounter{remarksubsection}[subsection]
|
|
||||||
\newcounter{allsubsection}[subsection]
|
|
||||||
|
|
||||||
\newcounter{lemmasubsubsection}[subsubsection]
|
|
||||||
\newcounter{definitionsubsubsection}[subsubsection]
|
|
||||||
\newcounter{corollarysubsubsection}[subsubsection]
|
|
||||||
\newcounter{theoremsubsubsection}[subsubsection]
|
|
||||||
\newcounter{axiomsubsubsection}[subsubsection]
|
|
||||||
\newcounter{examplesubsubsection}[subsubsection]
|
|
||||||
\newcounter{factsubsubsection}[subsubsection]
|
|
||||||
\newcounter{propositionsubsubsection}[subsubsection]
|
|
||||||
\newcounter{formulasubsubsection}[subsubsection]
|
|
||||||
\newcounter{remarksubsubsection}[subsubsection]
|
|
||||||
\newcounter{allsubsubsection}[subsubsection]
|
|
||||||
|
|
||||||
\newcounter{lemmaparagraph}[paragraph]
|
|
||||||
\newcounter{definitionparagraph}[paragraph]
|
|
||||||
\newcounter{corollaryparagraph}[paragraph]
|
|
||||||
\newcounter{theoremparagraph}[paragraph]
|
|
||||||
\newcounter{axiomparagraph}[paragraph]
|
|
||||||
\newcounter{exampleparagraph}[paragraph]
|
|
||||||
\newcounter{factparagraph}[paragraph]
|
|
||||||
\newcounter{propositionparagraph}[paragraph]
|
|
||||||
\newcounter{formulaparagraph}[paragraph]
|
|
||||||
\newcounter{remarkparagraph}[paragraph]
|
|
||||||
\newcounter{allparagraph}[paragraph]
|
|
||||||
|
|
||||||
% ── Set the current number of a label ───────────────────────────────
|
|
||||||
\newcommand{\setLabelNumber}[2]{%
|
|
||||||
\setcounter{#1none}{#2}%
|
|
||||||
\addtocounter{#1none}{-1}%
|
|
||||||
\setcounter{#1section}{#2}%
|
|
||||||
\addtocounter{#1section}{-1}%
|
|
||||||
\setcounter{#1subsection}{#2}%
|
|
||||||
\addtocounter{#1subsection}{-1}%
|
|
||||||
\setcounter{#1subsubsection}{#2}%
|
|
||||||
\addtocounter{#1subsubsection}{-1}%
|
|
||||||
\setcounter{#1paragraph}{#2}%
|
|
||||||
\addtocounter{#1paragraph}{-1}%
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\stepLabelNumber}[1]{%
|
|
||||||
\stepcounter{#1none}%
|
|
||||||
\stepcounter{#1section}%
|
|
||||||
\stepcounter{#1subsection}%
|
|
||||||
\stepcounter{#1subsubsection}%
|
|
||||||
\stepcounter{#1paragraph}%
|
|
||||||
}
|
|
||||||
|
|
||||||
% ┌ ┐
|
|
||||||
% │ Counter numbering │
|
|
||||||
% └ ┘
|
|
||||||
\newcommand{\preTableAndFigHook}[1]{%
|
|
||||||
\ifnum\value{numberingConfig}>1%
|
|
||||||
\ifnum\value{numberSubsections}=1%
|
|
||||||
\stepcounter{allss}%
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2%
|
|
||||||
\stepcounter{allsss}%
|
|
||||||
\else%
|
|
||||||
\stepcounter{all}%
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\AtBeginEnvironment{table}{\preTableAndFigHook{table}}
|
|
||||||
\AtBeginEnvironment{figure}{\preTableAndFigHook{figure}}
|
|
||||||
|
|
||||||
\newcommand{\applyTableAndFigureNumbering}{
|
|
||||||
% Tables & Figures
|
|
||||||
\ifnum\value{numberingConfig}=0
|
|
||||||
\renewcommand{\thetable}{\arabic{table}}
|
|
||||||
\renewcommand{\thefigure}{\arabic{figure}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberingConfig}=1
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{table}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=1
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{allss}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2
|
|
||||||
\renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}}
|
|
||||||
\else
|
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{all}}
|
|
||||||
\renewcommand{\thefigure}{\sectionNumbering.\arabic{all}}
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\setSubsectionNumbering}[1]{
|
|
||||||
\setcounter{numberSubsections}{#1}
|
|
||||||
\applySubsectionNumbering
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\applySubsectionNumbering}{
|
|
||||||
\ifnum\value{numberSubsections}=1
|
|
||||||
\renewcommand{\sectionNumbering}{\thesubsection}
|
|
||||||
\renewcommand{\suffix}{ss}
|
|
||||||
\typeout{Numbering as section.subsection.number}
|
|
||||||
\else
|
|
||||||
\ifnum\value{numberSubsections}=2
|
|
||||||
\renewcommand{\sectionNumbering}{\thesubsubsection}
|
|
||||||
\renewcommand{\suffix}{sss}
|
|
||||||
\typeout{Numbering as section.subsection.subsubsection.number}
|
|
||||||
\else
|
|
||||||
\renewcommand{\sectionNumbering}{\thesection}
|
|
||||||
\renewcommand{\suffix}{}
|
|
||||||
\typeout{Numbering as section.number}
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
\applyTableAndFigureNumbering
|
|
||||||
|
|
||||||
\renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}}
|
|
||||||
\renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}}
|
|
||||||
\renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}}
|
|
||||||
\renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}}
|
|
||||||
\renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}}
|
|
||||||
\renewcommand{\theexample}{\sectionNumbering.\arabic{example}}
|
|
||||||
\renewcommand{\thefact}{\sectionNumbering.\arabic{fact}}
|
|
||||||
\renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}}
|
|
||||||
\renewcommand{\theformula}{\sectionNumbering.\arabic{formula}}
|
|
||||||
\renewcommand{\theremark}{\sectionNumbering.\arabic{remark}}
|
|
||||||
\renewcommand{\theall}{\sectionNumbering.\arabic{all}}
|
|
||||||
|
|
||||||
\renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}}
|
|
||||||
\renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}}
|
|
||||||
\renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}}
|
|
||||||
\renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}}
|
|
||||||
\renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}}
|
|
||||||
\renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}}
|
|
||||||
\renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}}
|
|
||||||
\renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}}
|
|
||||||
\renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}}
|
|
||||||
\renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}}
|
|
||||||
\renewcommand{\theallss}{\sectionNumbering.\arabic{allss}}
|
|
||||||
|
|
||||||
\renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}}
|
|
||||||
\renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}}
|
|
||||||
\renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}}
|
|
||||||
\renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}}
|
|
||||||
\renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}}
|
|
||||||
\renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}}
|
|
||||||
\renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}}
|
|
||||||
\renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}}
|
|
||||||
\renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}}
|
|
||||||
\renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}}
|
|
||||||
\renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}}
|
|
||||||
}
|
|
||||||
\applySubsectionNumbering
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
\newcommand{\printNumberingConfigForDescriptor}[2]{\csname #1numbering\endcsname}
|
|
||||||
|
|
||||||
\newcommand{\printLabelWithNumbering}[1]{%
|
|
||||||
\ifthenelse{\equal{\subsectionnumbering}{none}}{%
|
|
||||||
#1%
|
|
||||||
}{%
|
|
||||||
\ifthenelse{\equal{\subsectionnumbering}{section}}{%
|
|
||||||
\thesection.#1%
|
|
||||||
}{%
|
|
||||||
\ifthenelse{\equal{\subsectionnumbering}{subsection}}{%
|
|
||||||
\thesection.\thesubsection.#1%
|
|
||||||
}{%
|
|
||||||
\ifthenelse{\equal{\subsectionnumbering}{subsubsection}}{%
|
|
||||||
\thesection.\thesubsection.\thesubsubsection#1%
|
|
||||||
}{%
|
|
||||||
\ifthenelse{\equal{\subsectionnumbering}{paragraph}}{%
|
|
||||||
\thesection.\thesubsection.\thesubsubsection.\theparagraph#1%
|
|
||||||
}{%
|
|
||||||
\PackageError{Subsection numbering configuration invalid. Can be one of [none, section, subsection, subsubsection, paragraph], but you passed #1}
|
|
||||||
subsectionnumbering error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\printVersionNumber}[1]{%
|
|
||||||
\ifthenelse{\equal{\numberingpreset}{combined}}{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\printCounter}[1]{\csname the#1\endcsname}
|
|
||||||
\newcommand{\renderLabel}[1]{}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Reset definition, lemma, etc counters, add a │
|
|
||||||
% │ new page │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
\newcommand{\newsection}{
|
|
||||||
\newpage
|
|
||||||
\newsectionNoPB
|
|
||||||
}
|
|
||||||
|
|
||||||
% ── Reset definitions, lemma, etc counters, do not add new page ─────
|
|
||||||
\newcommand{\newsectionNoPB}{
|
|
||||||
\setcounter{lemma}{0}
|
|
||||||
\setcounter{definition}{0}
|
|
||||||
\setcounter{corollary}{0}
|
|
||||||
\setcounter{theorem}{0}
|
|
||||||
\setcounter{axiom}{0}
|
|
||||||
\setcounter{example}{0}
|
|
||||||
\setcounter{fact}{0}
|
|
||||||
\setcounter{proposition}{0}
|
|
||||||
\setcounter{formula}{0}
|
|
||||||
\setcounter{remark}{0}
|
|
||||||
\setcounter{all}{0}
|
|
||||||
|
|
||||||
\setcounter{lemmass}{0}
|
|
||||||
\setcounter{definitionss}{0}
|
|
||||||
\setcounter{corollaryss}{0}
|
|
||||||
\setcounter{theoremss}{0}
|
|
||||||
\setcounter{axiomss}{0}
|
|
||||||
\setcounter{exampless}{0}
|
|
||||||
\setcounter{factss}{0}
|
|
||||||
\setcounter{propositionss}{0}
|
|
||||||
\setcounter{formulass}{0}
|
|
||||||
\setcounter{remarkss}{0}
|
|
||||||
\setcounter{allss}{0}
|
|
||||||
|
|
||||||
\setcounter{lemmasss}{0}
|
|
||||||
\setcounter{definitionsss}{0}
|
|
||||||
\setcounter{corollarysss}{0}
|
|
||||||
\setcounter{theoremsss}{0}
|
|
||||||
\setcounter{axiomsss}{0}
|
|
||||||
\setcounter{examplesss}{0}
|
|
||||||
\setcounter{factsss}{0}
|
|
||||||
\setcounter{propositionsss}{0}
|
|
||||||
\setcounter{formulasss}{0}
|
|
||||||
\setcounter{remarksss}{0}
|
|
||||||
\setcounter{allsss}{0}
|
|
||||||
|
|
||||||
% Tables & Figures
|
|
||||||
\setcounter{table}{0}
|
|
||||||
\setcounter{figure}{0}
|
|
||||||
}
|
|
||||||
\newsectionNoPB % Initializes
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Tcolorboxes │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
% Definitions
|
|
||||||
\newtcolorbox{definition}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large Definition\usenumberArabic{definition}};},#1}
|
|
||||||
|
|
||||||
% Theorems
|
|
||||||
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1}
|
|
||||||
|
|
||||||
% Lemmas
|
|
||||||
\newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1}
|
|
||||||
|
|
||||||
% Corollaries
|
|
||||||
\newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1}
|
|
||||||
|
|
||||||
% Axioms
|
|
||||||
\newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1}
|
|
||||||
|
|
||||||
% Facts
|
|
||||||
\newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1}
|
|
||||||
|
|
||||||
% Propositions
|
|
||||||
\newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1}
|
|
||||||
|
|
||||||
% Examples
|
|
||||||
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1}
|
|
||||||
|
|
||||||
% Formula
|
|
||||||
\newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1}
|
|
||||||
|
|
||||||
% Remark
|
|
||||||
\newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2},
|
|
||||||
overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1}
|
|
||||||
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Inline environments │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
|
|
||||||
% Inline environments (inline)
|
|
||||||
\newcommand{\inlineex}{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:}}
|
|
||||||
\newcommand{\inlinedef}{\bg{blue}{Definition\usenumberArabic{definition}:}}
|
|
||||||
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:}}
|
|
||||||
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:}}
|
|
||||||
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:}}
|
|
||||||
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:}}
|
|
||||||
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:}}
|
|
||||||
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:}}
|
|
||||||
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition\usenumberArabic{proposition}:}}
|
|
||||||
\newcommand{\inlineremark}{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:}}
|
|
||||||
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
|
|
||||||
|
|
||||||
% Enhanced inline environments
|
|
||||||
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{example}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancydef}[1]{\bg{blue}{Definition\usenumberArabic{definition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formula}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma\usenumberArabic{lemma}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorem}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom\usenumberArabic{axiom}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollary}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{fact}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition\usenumberArabic{proposition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyremark}[1]{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remark}:} \textit{(#1)}}
|
|
||||||
\newcommand{\fancyproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
|
|
||||||
|
|
||||||
% short environments (abbreviated)
|
|
||||||
\newcommand{\shortex}{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:}}
|
|
||||||
\newcommand{\shortdef}{\bg{blue}{D\usenumberArabic{definition}:}}
|
|
||||||
\newcommand{\short}{\bg{red}{F\usenumberArabic{formula}:}}
|
|
||||||
\newcommand{\shortlemma}{\bg{Aquamarine}{L\usenumberArabic{lemma}:}}
|
|
||||||
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:}}
|
|
||||||
\newcommand{\shortaxiom}{\bg{JungleGreen}{A\usenumberArabic{axiom}:}}
|
|
||||||
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:}}
|
|
||||||
\newcommand{\shortfact}{\bg{SeaGreen}{F\usenumberArabic{fact}:}}
|
|
||||||
\newcommand{\shortproposition}{\bg{Cyan}{P\usenumberArabic{proposition}:}}
|
|
||||||
\newcommand{\shortremark}{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:}}
|
|
||||||
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
|
|
||||||
|
|
||||||
% Enhanced short environments (abbreviated)
|
|
||||||
\newcommand{\compactex}[1]{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{example}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L\usenumberArabic{lemma}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A\usenumberArabic{axiom}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactproposition}[1]{\bg{Cyan}{P\usenumberArabic{proposition}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactremark}[1]{\bg{green}{\tr{R}{B}\usenumberArabic{remark}:} \textit{(#1)}}
|
|
||||||
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
|
|
||||||
12
uninstall.sh
Normal file
12
uninstall.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [[ -z "${TEXMFHOME+x}" ]]; then
|
||||||
|
export TEXMFHOME=~/texmf/
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Removing helper files"
|
||||||
|
rm -rf $TEXMFHOME/tex/latex/janishutz-helpers
|
||||||
|
sudo rm -rf /usr/share/texmf/tex/latex/janishutz-helpers/
|
||||||
|
|
||||||
|
echo "Updating file database"
|
||||||
|
sudo texhash
|
||||||
Reference in New Issue
Block a user