Fix translation for theorem

This commit is contained in:
2025-07-13 10:47:02 +02:00
parent e2414dd7e2
commit d1821ae509
4 changed files with 21 additions and 16 deletions

View File

@@ -29,6 +29,9 @@
% Set the default language.
\setLang{en}
% Set the default command for theorem translation
\newcommand{\theoremde}{Satz}
% ----- %
% STYLE %

Binary file not shown.

View File

@@ -19,6 +19,7 @@
\item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
\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. 1 = Separately, 2 = Combined (except for definition), 3 = Combined, 4 = Off
\item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
0 = $<$section$>$.$<$number$>$,\\

View File

@@ -5,6 +5,7 @@
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
\usepackage{xstring}
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemmas}
\newcounter{definitions}
@@ -55,7 +56,7 @@
% 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 Theorem \usenumberArabic{theorems}};},#1}
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde} \usenumberArabic{theorems}};},#1}
% Lemmas
\newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2},
@@ -75,7 +76,7 @@ overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (f
% 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 \translate{Proposition}{Satz} \usenumberArabic{propositions}};},#1}
overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition \usenumberArabic{propositions}};},#1}
% Examples
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2},
@@ -90,33 +91,33 @@ overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north
\newcommand{\inlinedef}{\bg{blue}{Definition \usenumberArabic{definitions}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:}}
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{Theorem \usenumberArabic{theorems}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:}}
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:}}
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:}}
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{\translate{Proposition}{Satz} \usenumberArabic{propositions}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition \usenumberArabic{propositions}:}}
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced inline environments
\newcommand{\compactexample}[1]{\bg{gray}{\translate{Example}{Beispiel} \usenumberArabic{examples}:} \textit{#1}}
\newcommand{\compactdefinition}[1]{\bg{blue}{Definition \usenumberArabic{definitions}:} \textit{#1}}
\newcommand{\compactformula}[1]{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:} \textit{#1}}
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:} \textit{#1}}
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{Theorem \usenumberArabic{theorems}:} \textit{#1}}
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:} \textit{#1}}
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:} \textit{#1}}
\newcommand{\compactfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:} \textit{#1}}
\newcommand{\compactproposition}[1]{\bg{Cyan}{\translate{Proposition}{Satz} \usenumberArabic{propositions}:} \textit{#1}}
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{#1}}}
\newcommand{\compactexample}[1]{\bg{gray}{\translate{Example}{Beispiel} \usenumberArabic{examples}:} \textit{(#1)}}
\newcommand{\compactdefinition}[1]{\bg{blue}{Definition \usenumberArabic{definitions}:} \textit{(#1)}}
\newcommand{\compactformula}[1]{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:} \textit{(#1)}}
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:} \textit{(#1)}}
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:} \textit{(#1)}}
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:} \textit{(#1)}}
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:} \textit{(#1)}}
\newcommand{\compactfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:} \textit{(#1)}}
\newcommand{\compactproposition}[1]{\bg{Cyan}{Proposition \usenumberArabic{propositions}:} \textit{(#1)}}
\newcommand{\compactproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
% short environments (abbreviated)
\newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}:}}
\newcommand{\shortdef}{\bg{blue}{D \usenumberArabic{definitions}:}}
\newcommand{\short}{\bg{red}{F \usenumberArabic{formulas}:}}
\newcommand{\shortlemma}{\bg{Aquamarine}{L \usenumberArabic{lemmas}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{T \usenumberArabic{theorems}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{1}{1}} \usenumberArabic{theorems}:}}
\newcommand{\shortaxiom}{\bg{JungleGreen}{A \usenumberArabic{axioms}:}}
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K} \usenumberArabic{corollaries}:}}
\newcommand{\shortfact}{\bg{SeaGreen}{F \usenumberArabic{facts}:}}
\newcommand{\shortproposition}{\bg{Cyan}{\translate{P}{S} \usenumberArabic{propositions}:}}
\newcommand{\shortproposition}{\bg{Cyan}{P \usenumberArabic{propositions}:}}
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}