Compare commits

...

No commits in common. "master" and "v2.5.2-build" have entirely different histories.

37 changed files with 3830 additions and 8 deletions

View file

@ -1,8 +0,0 @@
# LatexPackagesBuild
Ready to use builds of my LaTeX packages.
These are mirrored builds of the main [latex-packages](https://git.abstractnonsen.se/latex/latex-packages) repository.
Branches named `${BRANCH}` in the main repository will be built and made available here as `${BRANCH}-build`. So feel free to clone these branches here to easily update your packages when the main package repo updates - without having to build the packages yourself!
For further information about these packages, visit the LatexPackages repository.

View file

@ -0,0 +1,313 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'fancythm.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-fancythm}[2022/01/15 - Theorem-Environment Package]
%Provides fancy theorem-like-environments used in the write-ups of my lecture notes
\RequirePackage{xkeyval}
\newif\ifmkessler@fancythm@showstars\mkessler@fancythm@showstarstrue
\newif\ifmkessler@fancythm@showdaggers\mkessler@fancythm@showdaggerstrue
\newif\ifmkessler@fancythm@includestars\mkessler@fancythm@includestarstrue
\newif\ifmkessler@fancythm@includeoral\mkessler@fancythm@includeoraltrue
\newif\ifmkessler@fancythm@markoral\mkessler@fancythm@markoraltrue
\newif\ifmkessler@fancythm@lecturenumbers\mkessler@fancythm@lecturenumberstrue
\newif\ifmkessler@fancythm@numbersmallenvironmentswiththeorem\mkessler@fancythm@numbersmallenvironmentswiththeoremfalse
\newif\ifmkessler@fancythm@numbersmallenvironments\mkessler@fancythm@numbersmallenvironmentsfalse
\newif\ifmkessler@fancythm@defaulttheorems\mkessler@fancythm@defaulttheoremstrue
\define@choicekey*{mkessler-fancythm}{mkessler@fancythm@numbersmallenvironments}[\val\nr]{no,section,theorem}{%
\ifcase\nr\relax
\mkessler@fancythm@numbersmallenvironmentsfalse
\or
\mkessler@fancythm@numbersmallenvironmentstrue
%numbering small environments within sections is forbidden whilst using lecturenumbes
\ifmkessler@fancythm@lecturenumbers
\mkessler@fancythm@numbersmallenvironmentswiththeoremtrue
\else
\mkessler@fancythm@numbersmallenvironmentswiththeoremfalse
\fi
\or
\mkessler@fancythm@numbersmallenvironmentstrue
\mkessler@fancythm@numbersmallenvironmentswiththeoremtrue
\fi
}
\define@choicekey*{mkessler-fancythm}{mkessler@fancythm@lecturenumbers}[\val\nr]{true,false}{%
\ifcase\nr\relax
\mkessler@fancythm@lecturenumberstrue
\else
\mkessler@fancythm@lecturenumbersfalse
\fi
}
\define@choicekey*{mkessler-fancythm}{mkessler@fancythm@defaulttheorems}[\val\nr]{true,false}{%
\ifcase\nr\relax
\mkessler@fancythm@defaulttheoremstrue
\else
\mkessler@fancythm@defaulttheoremsfalse
\fi
}
\define@choicekey*{mkessler-fancythm}{mkessler@fancythm@showdaggers}[\val\nr]{true,false}{%
\ifcase\nr\relax
\mkessler@fancythm@showdaggerstrue
\else
\mkessler@fancythm@showdaggersfalse
\fi
}
\define@choicekey*{mkessler-fancythm}{ownenvironments}[\val\nr]{on, natural, off}{%
\ifcase\nr\relax
\mkessler@fancythm@includestarstrue
\mkessler@fancythm@showstarstrue
\or
\mkessler@fancythm@includestarstrue
\mkessler@fancythm@showstarsfalse
\or
\mkessler@fancythm@includestarsfalse
\mkessler@fancythm@showstarsfalse
\fi
}
\define@choicekey*{mkessler-fancythm}{oralremarks}[\val\nr]{on,natural,off}{%
\ifcase\nr\relax
\mkessler@fancythm@includeoraltrue
\mkessler@fancythm@markoraltrue
\or
\mkessler@fancythm@includeoraltrue
\mkessler@fancythm@markoraltrue
\or
\mkessler@fancythm@includeoralfalse
\fi
}
%%%%% Option section
\newif\ifmkessler@fancythm@english\mkessler@fancythm@englishtrue
\DeclareOptionX{german}{\mkessler@fancythm@englishfalse}
\DeclareOptionX{ngerman}{\mkessler@fancythm@englishfalse}
\DeclareOptionX{english}{\mkessler@fancythm@englishtrue}
\DeclareOptionX{showdaggers}{\setkeys{mkessler-fancythm}{mkessler@fancythm@showdaggers=#1}}
\DeclareOptionX{ownenvironments}{\setkeys{mkessler-fancythm}{ownenvironments=#1}}
\DeclareOptionX{oralremarks}{\setkeys{mkessler-fancythm}{oralremarks=#1}}
\DeclareOptionX{lecturenumbers}{\setkeys{mkessler-fancythm}{mkessler@fancythm@lecturenumbers=#1}}
\DeclareOptionX{numbersmallenvironments}{\setkeys{mkessler-fancythm}{mkessler@fancythm@numbersmallenvironments=#1}}
\DeclareOptionX{defaulttheorems}{\setkeys{mkessler-fancythm}{mkessler@fancythm@defaulttheorems=#1}}
\DeclareOptionX*{\PackageWarning{mkessler-fancythm}{Unknown '\CurrentOption'}}
\ProcessOptionsX*\relax
%%%%%%%% Implementation section
%Required Packages and setup
\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{mdframed}
\RequirePackage{thmtools}
\RequirePackage[skins]{tcolorbox}
\RequirePackage{mfirstuc}
\RequirePackage{xifthen}
\RequirePackage{xparse}
\tcbuselibrary{breakable}
% Dummy counters
\declaretheorem[numberwithin=section]{mkessler@fancythm@dummy}
\declaretheorem[numberwithin=mkessler@fancythm@dummy]{mkessler@fancythm@smalldummy}
%%%%% Main part, i.e. providing macros for defining new theorems
%%Environments that are numbered by default have 3 versions:
% - the standard one, for numbering
% - one asterisk, to exclude them from numbering (because they were not numbered in the lecture) -> they will be numbered if 'truenmubers' option is set
% - two asterisks, for marking them as self-added, so they will not be numbered, but will receive a visual asterisk. -> They will be numbered if 'truenumbers' option is set
\NewDocumentCommand{\declarebigtheorem}{O{} O{} m m O{}}{
%First, store the name of the theorem in \theoremname
\ifmkessler@fancythm@english
\ifthenelse{\isempty{#2}}{\def\theoremname{#4}}{\def\theoremname{#2}}
\else
\ifthenelse{\isempty{#1}}{\def\theoremname{#4}}{\def\theoremname{#1}}
\fi
%Define the mane version of the theorem
\ifthenelse{\isempty{#5}}{\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling = mkessler@fancythm@dummy]{#4}}{}
%Define the versions theorem*, theorem**, dtheorem
\ifmkessler@fancythm@lecturenumbers
\ifmkessler@fancythm@numbersmallenvironments
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling=mkessler@fancythm@smalldummy]{#4*}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, sibling=mkessler@fancythm@smalldummy]{#4**}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, sibling=mkessler@fancythm@smalldummy]{d#4}
\else
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, numbered=no]{#4*}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, numbered = no]{#4**}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, numbered = no]{d#4}
\fi
\else
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}, sibling=mkessler@fancythm@dummy]{#4*}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, sibling=mkessler@fancythm@dummy]{#4**}
\declaretheorem[style = #3, name = \makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, sibling=mkessler@fancythm@dummy]{d#4}
\fi
\ifmkessler@fancythm@includestars\else\renewenvironment{#4**}{\comment}{\endcomment}\fi
}
\NewDocumentCommand{\declaresmalltheorem}{O{} O{} m m}{
%Get the name of the theorem and store it in \theoremname
\ifmkessler@fancythm@english
\ifthenelse{\isempty{#2}}{\def\theoremname{#4}}{\def\theoremname{#2}}
\else
\ifthenelse{\isempty{#1}}{\def\theoremname{#4}}{\def\theoremname{#1}}
\fi
\ifmkessler@fancythm@numbersmallenvironments
\ifmkessler@fancythm@numbersmallenvironmentswiththeorem
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling = mkessler@fancythm@smalldummy]{#4}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, sibling=mkessler@fancythm@smalldummy]{#4*}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, sibling=mkessler@fancythm@smalldummy]{d#4}
\else
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling=mkessler@fancythm@dummy]{#4}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, sibling=mkessler@fancythm@dummy]{#4*}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, sibling=mkessler@fancythm@dummy]{d#4}
\fi
\else
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, numbered = no]{#4}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showstars *\else\fi, numbered = no]{#4*}
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}\ifmkessler@fancythm@showdaggers $^{\dagger}$\else\fi, numbered = no]{d#4}
\fi
\declaretheorem[style=#3,name=\makefirstuc{\expandafter\theoremname}, sibling=mkessler@fancythm@dummy]{n#4}
\ifmkessler@fancythm@includestars\else\renewenvironment{#4*}{\comment}{\endcomment}\fi
}
%%%% If requested, now define some default theoremstyles
\ifmkessler@fancythm@defaulttheorems
\RequirePackage[default styles]{mkessler-thmstyle} % Easy setup of mdframed styles
\declarebigtheorem[Satz][Theorem]{thmredmarginandfill}{theorem} \ifmkessler@fancythm@english\else\AtBeginDocument{\def\theoremautorefname{Satz}}\fi
\declarebigtheorem{thmredmarginandfill}{proposition}
\declarebigtheorem[Korollar]{thmredmarginandfill}{corollary}
\declarebigtheorem{thmorangemarginandfill}{lemma}
\declarebigtheorem[Lemma und Definition][Lemma and Definition]{thmorangemarginbluefill}{lemmadef}
\declarebigtheorem{thmbluemarginandfill}{definition}
\declarebigtheorem[Satz und Definition][Theorem and Definition]{thmredmarginbluefill}{theoremdef}
\declarebigtheorem[Proposition und Definition][Proposition and Definition]{thmredmarginbluefill}{propositiondef}
\declarebigtheorem{thmvioletmarginandfill}{notation}
\declarebigtheorem[zuSatz][Addition to Theorem]{thmredmarginandfill}{additiontheorem}
%%%Environments that are not numbered by default (notation, question, example, remark etc) have two forms:
% - normal form: won't be numbered unless 'mkessler@fancythm@numbersmallenvironments' is set
% - having an asterisk: will be displayed with an asterisk, will be numbered if 'numbersmallenvironments' is set
%Notation
\declaresmalltheorem[Notationsmissbrauch][Abuse of Notation]{thmvioletmargin}{abuse}
\declaresmalltheorem[Beispiel]{thmgreenmargin}{example}
\declaresmalltheorem[Bemerkung]{thmyellowmargin}{remark}
\declaresmalltheorem[Lob]{thmgoldmargin}{praise}
\declaresmalltheorem[Trivial Nonsense][Trivial Nonsense]{thmyellowmargin}{trivial}
\declaresmalltheorem[Frage]{thmblackmarginandfill}{question}
\declaresmalltheorem[Organisatorisches][Organisational stuff]{thmblackmargin}{orga}
\declaresmalltheorem[Fakt]{thmredmargin}{fact}
%%%% Specially treated stuff
\declaresmalltheorem[\ifmkessler@fancythm@markoral Mündliche Anmerkung\else Bemerkung\fi][\ifmkessler@fancythm@markoral Oral remark\else remark\fi]{thmyellowmargin}{oral}
% Option to remove oral remarks when needed
\ifmkessler@fancythm@includeoral\else
\renewenvironment{oral}{\comment}{\endcomment}
\renewenvironment{oral*}{\comment}{\endcomment}
\renewenvironment{doral}{\comment}{\endcomment}
\fi
%%%%%%%% Other mdframed style boxes
\newtcolorbox{recap}{before skip = 0.5cm, after skip = 0.5cm, enhanced, sharp corners = all, colback = white, colframe = gray, toprule=0pt, bottomrule=0pt, leftrule=0pt,rightrule=0pt, overlay = {
\draw[gray, line width = 2pt] (frame.north west) -- ++(0.5cm, 0pt);
\draw[gray, line width=2pt] (frame.south east) -- ++(-0.5cm, 0pt);
\draw[gray, line width=2pt] (frame.north west) -- ++ (0pt, -0.5cm);
\draw[gray, line width=2pt] (frame.south east) -- ++(0pt, 0.5cm);
}}
\newenvironment{moral}{%
\begin{mdframed}[linecolor=green!70!black]%
\bfseries\color{green!50!black}}%
{\end{mdframed}}
\newenvironment{antimoral}{%
\begin{mdframed}[linecolor=red!70!black]%
\bfseries\color{red!50!black}}%
{\end{mdframed}}
%%%%%%%%%%%% Non-mdframed theorems
\theoremstyle{plain}
\newtheorem{variant}{\ifmkessler@fancythm@english Variant\else Variante\fi}
\newtheorem{assumption}{\ifmkessler@fancythm@english Assumption\else Annahme\fi}
\theoremstyle{definition}
\newtheorem*{note}{\ifmkessler@fancythm@english Note\else Anmerkung\fi}
\newtheorem*{warning}{\color{red}\ifmkessler@fancythm@english Warning \else Warnung\fi}
\newtheorem*{goal}{\ifmkessler@fancythm@english Goal \else Ziel\fi}
\newtheorem*{strategy}{\ifmkessler@fancythm@english Proof Strategy \else Beweisstrategie\fi}
\newtheorem*{goal*}{\ifmkessler@fancythm@english Goal* \else Ziel*\fi}
\newtheorem*{problem}{Problem}
\newtheorem*{info}{Information}
\newtheorem*{answer}{\ifmkessler@fancythm@english Answer\else Antwort\fi}
\newtheorem{observe}[theorem]{\ifmkessler@fancythm@english Observe\else Beobachte\fi}
\newtheorem*{property}{\ifmkessler@fancythm@english Property\else Eigenschaft\fi}
\newtheorem*{intuition}{Intuition}
\newtheorem*{recall}{\ifmkessler@fancythm@english Recall\else Erinnerung\fi}
\newtheorem*{idea}{\ifmkessler@fancythm@english Idea\else Idee\fi}
\newtheorem{exercise}{\ifmkessler@fancythm@english Exercise\else Aufgabe\fi}[section]
\newtheorem{reminder}{\ifmkessler@fancythm@english Reminder\else Erinnerung\fi}
\fi % end of default theorems

View file

@ -0,0 +1,137 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'thmstyle.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-thmstyle}[2022/01/15 - Mdframed Styles used for fancythm package]
%%%%% This provides easy-to-use styles, especially for use with the
\RequirePackage{xkeyval}
% A simple option wether to define some default styles
\newif\ifmkessler@thmstyle@defaultstyles\mkessler@thmstyle@defaultstylesfalse
\DeclareOptionX{defaultstyles}{\mkessler@thmstyle@defaultstylestrue}
\DeclareOptionX*{\PackageWarning{mkessler-thmstyle}{Unknown '\CurrentOption'}}
\ProcessOptionsX*\relax
\RequirePackage{amsthm}
\RequirePackage{thmtools}
\RequirePackage{mdframed}
\RequirePackage{xcolor}
\RequirePackage{xparse}
\definecolor{gold}{RGB}{218,165,32}
\mdfsetup{skipabove=8pt,skipbelow=\topskip}
\NewDocumentCommand{\declarefancymdfstyle}{O{} m O{} }{
\if\relax\detokenize{#1}\relax
\mdfdefinestyle{\if\relax\detokenize{#3}\relax md#2margin\else #3\fi}{%
linecolor=#2,
linewidth = 2pt,
leftmargin = 0cm,
rightmargin=0cm,
rightline=false,
topline=false,
bottomline=false
}
\else
\mdfdefinestyle{\if\relax\detokenize{#3}\relax md#2marginand#1fill\else #3\fi}{%
linecolor=#2,
linewidth = 2pt,
leftmargin = 0cm,
rightmargin=0cm,
backgroundcolor=#1,
rightline=false,
topline=false,
bottomline=false
}
\fi
}
\NewDocumentCommand{\declarefancythmstyle}{O{} m O{} }{
\declarefancymdfstyle[#1]{#2}
\if\relax\detokenize{#3}\relax
\if\relax\detokenize{#1}\relax
\declaretheoremstyle[
mdframed={style=
\if\relax\detokenize{#1}\relax md#2margin\else md#2marginand#1fill\fi
},
postheadspace={0.3em},
notefont=\mdseries
]{thm#2margin}
\else
\declaretheoremstyle[
mdframed={style=
\if\relax\detokenize{#1}\relax md#2margin\else md#2marginand#1fill\fi
},
postheadspace={0.3em},
notefont=\mdseries
]{thm#2marginand#1fill}
\fi
\else
\declaretheoremstyle[
mdframed={style=
\if\relax\detokenize{#1}\relax md#2margin\else md#2marginand#1fill\fi
},
postheadspace={0.3em},
notefont=\mdseries
]{#3}
\fi
}
\ifmkessler@thmstyle@defaultstyles
\declarefancythmstyle[red!8]{red}[thmredmarginandfill]
\declarefancythmstyle[orange!10]{orange}[thmorangemarginandfill]
\declarefancythmstyle[blue!7]{blue}[thmbluemarginandfill]
\declarefancythmstyle{green!70!black}[thmgreenmargin]
\declarefancythmstyle{gold}[thmgoldmargin]
\declarefancythmstyle{yellow!80!orange}[thmyellowmargin]
\declarefancythmstyle{gray}[thmgraymargin]
\declarefancythmstyle[violet!7]{violet}[thmvioletmarginandfill]
\declarefancythmstyle{violet}[thmvioletmargin]
\declarefancythmstyle[blue!7]{red}[thmredmarginbluefill]
\declarefancythmstyle{red}[thmredmargin]
\declarefancythmstyle[blue!7]{orange}[thmorangemarginbluefill]
\declarefancythmstyle[violet!20!gray!20]{black}[thmblackmarginandfill]
\declarefancythmstyle{black}[thmblackmargin]
\fi

View file

@ -0,0 +1,123 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the Software), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This class has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'sheet.pycls'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the class again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX class is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the class can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mkessler-sheet}[2022/01/15 - Write up university exercise sheets]
% This is meant as a layouting class for easily writing up exercise sheets.
% Use \course \sheetnumber and \author to set metadata of the document
% Use option [largename] if the author(s) is/are too long and collide in the fancy header
% Use option [german|ngerman|english] to control language appearance
\RequirePackage{scrbase}
\newif\ifmkessler@sheet@english\mkessler@sheet@englishtrue
\DeclareOption{german}{\mkessler@sheet@englishfalse}
\DeclareOption{ngerman}{\mkessler@sheet@englishfalse}
\DeclareOption{english}{\mkessler@sheet@englishtrue}
\newif\ifmkessler@sheet@largename\mkessler@sheet@largenamefalse
\DeclareOption{large-name}{\mkessler@sheet@largenametrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
\LoadClass{scrartcl}
\KOMAoption{fontsize}{12pt}
\KOMAoption{parskip}{half-}
\KOMAoption{DIV}{12}
\KOMAoption{headings}{normal}
\RequirePackage{scrlayer-scrpage}
\KOMAoption{headsepline}{:}
\def\@course{\ClassError{mkessler-sheet}{No \noexpand\course given}{Use \noexpand\course{<coursename>} to set the course.}}%
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
\def\@sheetnumber{\ClassError{mkessler-sheet}{No \noexpand\sheetnumber given}{Use \noexpand\sheetnumber{<num>} to set the current sheetnumber.}}%
\DeclareRobustCommand*{\sheetnumber}[1]{\gdef\@sheetnumber{\ifmkessler@sheet@english Sheet #1 \else Übungsblatt #1\fi}}
\renewcommand*{\@date}{\today}
\renewcommand*{\maketitle}{
\thispagestyle{plain}
{\makebox[0pt][l]{\usekomafont{myauthor}\@author}\hfill\makebox[0pt][r]{\usekomafont{date}\@date}\par}
\vspace{0.5em}
{\centering\usekomafont{title}\@course\par}
{\centering\usekomafont{subtitle}\@sheetnumber \par}
\vspace{2em}
\hrule
\addvspace{2em}
}
\setkomafont{title}{\LARGE\bfseries}
\setkomafont{subtitle}{}
\newkomafont{myauthor}{}
\setkomafont{date}{}
\newkomafont{headtitle}{\itshape}
\setkomafont{pageheadfoot}{\footnotesize}
\setkomafont{descriptionlabel}{\bfseries}
\setkomafont{pagenumber}{\normalsize}
\pagestyle{scrheadings}
\ihead[]{\ifmkessler@sheet@largename \usekomafont{myauthor}\@author \\ \@course\;- \@sheetnumber\else \usekomafont{myauthor}\@author\fi }
\chead[]{\ifmkessler@sheet@largename \else \usekomafont{subtitle}\@course\;- \@sheetnumber\fi}
\ohead[]{\usekomafont{date}\@date}
% Page layout
\setlength{\parindent}{0pt}
\RequirePackage[a4paper, left=2cm, right=2cm, top=3cm, bottom=3cm, head=15.0pt, headsep=10pt]{geometry}
\setlength{\skip\footins}{15pt}
\setlength{\abovecaptionskip}{0cm}
\setlength{\belowcaptionskip}{0cm}
%Für Zeilenabstand 1,5
\RequirePackage[onehalfspacing]{setspace}
\RequirePackage[super]{nth}
\newcommand\nr[1]{
\section*{\ifmkessler@sheet@english\nth{#1} exercise\else #1. Aufgabe\fi}
\setcounter{equation}{0}
}

View file

@ -0,0 +1,154 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'lectures.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-lectures}[2022/01/15 - Package for managing different lectures within a document]
% The core of the lecture command this package provides has been taken from the preamble in
% https://github.com/gillescastel/university-setup
% which is licensed under
%MIT License
%Copyright (c) 2019 Gilles Castel
%Permission is hereby granted, free of charge, to any person obtaining a copy
%of this software and associated documentation files (the "Software"), to deal
%in the Software without restriction, including without limitation the rights
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
%copies of the Software, and to permit persons to whom the Software is
%furnished to do so, subject to the following conditions:
%
%The above copyright notice and this permission notice shall be included in all
%copies or substantial portions of the Software.
%
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%SOFTWARE.
% This package extends the lecture command to make a summary of lectures at the beginning of a document, and has thus modified this command.
\RequirePackage{xkeyval}
\newif\ifmkessler@lectures@english\mkessler@lectures@englishtrue
\DeclareOptionX{german}{\mkessler@lectures@englishfalse}
\DeclareOptionX{ngerman}{\mkessler@lectures@englishfalse}
\DeclareOptionX{english}{\mkessler@lectures@englishtrue}
\newif\ifmkessler@lectures@fancyhead\mkessler@lectures@fancyheadfalse
\DeclareOptionX{fancyhead}{\mkessler@lectures@fancyheadtrue}
\DeclareOptionX*{\PackageWarning{mkessler-lectures}{Unknown '\CurrentOption'}}
\ProcessOptionsX*\relax
%Tocloft package for making a list of lectures
\RequirePackage{tocloft}
%Store name of the summary in a command to use it multiple times
\newcommand\mkessler@lectures@listlecturename{\ifmkessler@lectures@english Summary of lectures\else Übersicht der Vorlesungen\fi}
\newlistof{lecture}{lec}{\mkessler@lectures@listlecturename} % Declare new list of lectures
%Settings how to print the summary
\renewcommand{\cftdot}{}
\renewcommand\cftlecturefont{\normalfont\bfseries}
\renewcommand\cftlecturepagefont{\normalfont\bfseries}
\renewcommand\cftlectitlefont{\Large\bfseries}
\renewcommand\cftbeforelectureskip{1em}
%Command to parse the date
\RequirePackage{xifthen}
\def\testdateparts#1{\dateparts#1\relax}
\def\dateparts#1 #2 #3 #4 #5\relax{
\marginpar{\small\textsf{\mbox{#1 #2 #3 #5}}}
}
%Define the main lecture command to start a new lecture
\def\mkessler@lectures@lectureprefix{\ifmkessler@lectures@english Lecture\else Vorlesung\fi}
\def\@lecture{}%
\RequirePackage{xparse}
% \lecture[keywords]{date}[number]{title}[margin note]
\NewDocumentCommand{\lecture}{ O{} m O{} m O{}}{
\ifthenelse{\isempty{#3}}{\refstepcounter{lecture}}{\setcounter{lecture}{#3}}
%Store lecture name in the macro \@lecture
\ifthenelse{\isempty{#4}}{%
\def\@lecture{\mkessler@lectures@lectureprefix\, \thelecture}%
}{%
\def\@lecture{\mkessler@lectures@lectureprefix\, \thelecture: #4}%
}%
\marginpar{\small\textsf{\parbox{10em}{\mkessler@lectures@lectureprefix\, \thelecture \\#2}}}
%Add lecture as an entry to the lectures file
\addcontentsline{lec}{lecture}{\mkessler@lectures@lectureprefix\,\thelecture\,(#2)}
%If key words are provided, add the key words of the lecture below the entry
\ifthenelse{\isempty{#1}}{}{\addtocontents{lec}{\smallskip\hspace{1.5em}\protect\parbox{\dimexpr\textwidth-\@pnumwidth - 2em}{#1}}}
}
%Provide a command to show the summary of lectures
\DeclareRobustCommand*{\summaryoflectures}{
\phantomsection
\addcontentsline{toc}{section}{\mkessler@lectures@listlecturename}
\thispagestyle{plain}
\listoflecture
}
\ifmkessler@lectures@fancyhead
\RequirePackage{fancyhdr}
\pagestyle{fancy}
% LE: left even
% RO: right odd
% CE, CO: center even, center odd
\fancyhead[RO,LE]{\@lecture} % Right odd, Left even
\fancyhead[RE,LO]{} % Right even, Left odd
%%No fancy headers in the appendix (as there is no lecture)
\let\mkessler@lectures@stored@appendix\appendix
\renewcommand\appendix{
\mkessler@lectures@stored@appendix
\fancyhead[RO,LE]{}
\renewcommand{\headrulewidth}{0pt}
}
\fi

View file

@ -0,0 +1,211 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the Software), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This class has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'script.pycls'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the class again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX class is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the class can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mkessler-script}[2022/01/15 - Write up lecture notes as script]
\RequirePackage{xkeyval}
\newif\ifmkessler@script@english\mkessler@script@englishtrue
\DeclareOptionX{german}{\mkessler@script@englishfalse}
\DeclareOptionX{ngerman}{\mkessler@script@englishfalse}
\DeclareOptionX{english}{\mkessler@script@englishtrue}
\newif\ifmkessler@script@showversion\mkessler@script@showversiontrue
\DeclareOptionX{show version}{\mkessler@script@showversiontrue}
\DeclareOptionX{hideversion}{\mkessler@script@showversionfalse}
\newif\ifmkessler@script@fancyfoot\mkessler@script@fancyfootfalse
\DeclareOptionX{fancyfoot}{\mkessler@script@fancyfoottrue}
\newif\ifmkessler@script@gitversion\mkessler@script@gitversionfalse
\DeclareOptionX{git}{\mkessler@script@gitversiontrue}
\DeclareOptionX*{\ClassWarning{mkessler-script}{Unknown '\CurrentOption'}}
\ProcessOptionsX*\relax
\RequirePackage{xifthen}
%%%%Define command to set metainformation of document
%Set the course
\def\@course{\ClassError{mkessler-script}{No \noexpand\course given}{See documentation for details}}%
\DeclareRobustCommand*{\course}[1]{\gdef\@course{#1}}
\def\@lecturer{\ClassError{mkessler-script}{No \noexpand\lecturer given}{See documentation for details}}%
\def\@lecturertitle{}
\DeclareRobustCommand*{\lecturer}[2][]{
\gdef\@lecturer{#2}
\gdef\@lecturertitle{\ifmkessler@script@english Lecturer\else\ifthenelse{\isempty{#1}}{Dozent}{Dozentin}\fi}{}
}
%Set the assistant
\newif\ifmkessler@script@printassistant\mkessler@script@printassistantfalse
\def\@assistant{}%
\def\@assistantitle{}
\DeclareRobustCommand*{\assistant}[2][]{
\mkessler@script@printassistanttrue
\gdef\@assistant{#2}
\gdef\@assistanttitle{\ifmkessler@script@english Assistant\else\ifthenelse{\isempty{#1}}{Assistent}{Assistentin}\fi}
}
%%%%Load base class article
\LoadClass{article}
\ifmkessler@script@showversion
\ifmkessler@script@gitversion
\RequirePackage[dirty={ (local changes have been made!)}]{gitinfo2}
\fi
\fi
%%%%Title
%Define layout of title using course, lecturer, assistant and author, and optionally the current time
\RequirePackage{xparse}
\RequirePackage{datetime}
\renewcommand\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@course \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@lecturertitle \\
{\sc \@lecturer} \\
\end{tabular}\par
\ifmkessler@script@printassistant
\vskip 1em%
\begin{tabular}[t]{c}%
\@assistanttitle \\
{\sc \@assistant} \\
\end{tabular}\par
\fi
\vskip 1em%
\begin{tabular}[t]{c}%
\ifmkessler@script@english Notes\else Mitschrift\fi \\
{\sc \@author} \\
\end{tabular}
\par}%
\ifmkessler@script@showversion
\vskip 3em%
\begin{tabular}[t]{c}%
{\small Version} \\
\ifmkessler@script@gitversion
git: \gitFirstTagDescribe\\
\ifmkessler@script@english compiled\else kompiliert\fi:
\fi\today\,\currenttime \\
\end{tabular}\par
\fi
\vskip 4em%
\end{center}%
\par
\vskip 1.5em
}
%%%The following is based on the repository
% https://github.com/gillescastel/university-setup
% but has been modified for own purposes. The original content is distributed under the following license:
%MIT License
%Copyright (c) 2019 Gilles Castel
%Permission is hereby granted, free of charge, to any person obtaining a copy
%of this software and associated documentation files (the "Software"), to deal
%in the Software without restriction, including without limitation the rights
%to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
%copies of the Software, and to permit persons to whom the Software is
%furnished to do so, subject to the following conditions:
%
%The above copyright notice and this permission notice shall be included in all
%copies or substantial portions of the Software.
%
%THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
%IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
%FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
%AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
%LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
%OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
%SOFTWARE.
%%%% These are the fancy headers
\ifmkessler@script@fancyfoot
\RequirePackage{fancyhdr}
\pagestyle{fancy}
% LE: left even
% RO: right odd
% CE, CO: center even, center odd
\fancyhead[RO,LE]{} % Right odd, Left even
\fancyhead[RE,LO]{} % Right even, Left odd
\fancyfoot[RO,LE]{\thepage} % Right odd, Left even
\fancyfoot[RE,LO]{} % Right even, Left odd
\fancyfoot[C]{\leftmark} % Center
\makeatother
\fi
% Fix some stuff
% %http://tex.stackexchange.com/questions/76273/multiple-pdfs-with-page-group-included-in-a-single-page-warning
\pdfsuppresswarningpagegroup=1
% Fix some spacing
% http://tex.stackexchange.com/questions/22119/how-can-i-change-the-spacing-before-theorems-with-amsthm
\def\thm@space@setup{%
\thm@preskip=\parskip \thm@postskip=0pt
}
% Don't indent paragraphs, leave some space between them
\RequirePackage{parskip}
% Hide page number when page is empty
\RequirePackage{emptypage}

View file

@ -0,0 +1,186 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'categories.pysty3'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesExplPackage{mkessler-categories}{2022/01/15}{2.5.2}{Definitions of categories with automatic indexing}
%% Wrapper commands specific for defining categories
\RequirePackage{mkessler-symbindex}
\RequirePackage{translator}
\RequirePackage{amsmath}
\usedictionary{translator-mathematical-categories-dictionary}
\NewDocumentCommand{\category}{ m }
{
\operatorname{\textbf{#1}}
}
\NewDocumentCommand{\DeclareCategory}{ O{} m }
{
\DeclareSymbol[group = categories, #1]{#2}
}
\NewDocumentCommand{\DeclareSimpleCategory}{ o m o}
{
\IfValueTF{#1}
{
\IfValueTF{#3}
{
\DeclareCategory[operator = \category, description = #3, #1]{#2}
}
{
\DeclareCategory[operator = \category, #1]{#2}
}
}
{
\IfValueTF{#3}
{
\DeclareCategory[operator = \category, description = #3]{#2}
}
{
\DeclareCategory[operator = \category]{#2}
}
}
}
\makeindex
[
name = categories,
title = \translate{Index~of~categories}
]
%%%% Categories
\DeclareSimpleCategory
{ Top }
[
\translate{Top~(Category~description)}
]
\DeclareSimpleCategory
{ hTop }
[
\translate{hTop~(Category~description)}
]
\DeclareSimpleCategory
{ Set }
[
\translate{Set~(Category~description)}
]
\DeclareSimpleCategory
{ CHaus }
[
\translate{CHaus~(Category~description)}
]
\DeclareSimpleCategory
{ Grp }
[
\translate{Grp~(Category~description)}
]
\DeclareSimpleCategory
{ Ab }
[
\translate{Ab~(Category~description)}
]
\DeclareSimpleCategory
{ CRing }
[
\translate{CRing~(Category~description)}
]
\DeclareSimpleCategory
{ Ring }
[
\translate{Ring~(Category~description)}
]
\DeclareSimpleCategory
[
defaultargs = _k
]
{ Vect }
[
\translate{Vect~(Category~description)}
]
\DeclareSimpleCategory
{ Cat }
[
\translate{Cat~(Category~description)}
]
\DeclareSimpleCategory
[
defaultargs = _R
]
{ Mod }
[
\translate{Mod~(Category~description)}
]
\DeclareSimpleCategory
[
defaultargs = _k
]
{ Alg }
[
\translate{Alg~(Category~description)}
]
\DeclareSimpleCategory
{ Field }
[
\translate{Field~(Category~description)}
]
\DeclareSimpleCategory
[
defaultargs = _k
]
{ AffVar }
[
\translate{AffVar~(Category~description)}
]
\DeclareSimpleCategory
{ Sch }
[
\translate{Sch~(Category~description)}
]
\DeclareSimpleCategory
{ GrAb }
[
\translate{GrAb~(Category~description)}
]

86
math/mkessler-faktor.sty Normal file
View file

@ -0,0 +1,86 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'faktor.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-faktor}[2022/01/15 - Faktor package that also handles cofaktors]
% Extension the faktor package for
% - cofaktor command that provides A \ B notation
% - scaling the / in the middle
% - fine positioning of enumerator / denominator
% This is essentially taken from the stackexchange question found at
% https://tex.stackexchange.com/questions/27591/extending-the-faktor-package
% and answered by 'Werner' (https://tex.stackexchange.com/users/5764/werner)
%
% This package only packages the corresponding answer and provides an analoguous way of a \cofactor command
%Dependencies
\RequirePackage{xparse}
\RequirePackage{amssymb} % provides \diagup and \diagdown
\RequirePackage{ifthen} % ifthenelse syntax
\RequirePackage{mathtools}
\DeclareDocumentCommand{\faktor}{s O{0.5} m O{-0.5} m}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #3/#5
\setbox0=\hbox{\ensuremath{#3}}% Store numerator
\setbox1=\hbox{\ensuremath{\diagup}}% Store slash /
\setbox2=\hbox{\ensuremath{#5}}% Store denominator
\raisebox{#2\ht1}{\usebox0}% Numerator
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
{\diagup}% regular \faktor slash
{\rotatebox{-44}{\rule[#4\ht2]{0.4pt}{-#4\ht2+#2\ht0+\ht0}}}% tilted rule as a slash
\mkern-4mu%
\raisebox{#4\ht2}{\usebox2}% Denominator
}
\DeclareDocumentCommand{\cofaktor}{s m O{-0.5} m O{0.5}}{% \newfaktor[*][#2]{#3}[#4]{#5} -> #2\#4
\setbox0=\hbox{\ensuremath{#3}}% Store numerator
\setbox1=\hbox{\ensuremath{\diagdown}}% Store slash /
\setbox2=\hbox{\ensuremath{#5}}% Store denominator
\raisebox{#2\ht1}{\usebox0}% Numerator
\mkern-5mu\ifthenelse{\equal{#1}{\BooleanTrue}}% Slash /
{\diagdown}% regular \faktor slash
{\rotatebox{44}{\rule[-#4\ht2]{0.4pt}{#4\ht2-#2\ht0+\ht0}}}% tilted rule as a slash
\mkern-4mu%
\raisebox{#4\ht2}{\usebox2}% Denominator
}

88
math/mkessler-math.sty Normal file
View file

@ -0,0 +1,88 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'math.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)
%
% This LaTeX package is free software and distributed under the MIT License. You
% may use it freely for your purposes. The latest version of the package can be
% obtained via GitHub under
% https://github.com/kesslermaximilian/LatexPackages
% For further information see the url above.
% Reportings of bugs, suggestions and improvements are welcome, see the README
% at the Git repository for further information.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-math}[2022/01/15 - Main math package.]
% Collects the basic math packages used for my lecture-note write-ups
% This just imports all the packages I use for writing up mathematics
% Probably, you will just want to load them separately for more
% customization
\RequirePackage{xkeyval}
\newif\ifmkessler@math@english\mkessler@math@englishtrue
\DeclareOptionX{german}{\mkessler@math@englishfalse}
\DeclareOptionX{ngerman}{\mkessler@math@englishfalse}
\DeclareOptionX{english}{\mkessler@math@englishtrue}
\DeclareOptionX*{\PackageWarning{mkessler-math}{Unknown '\CurrentOption'}}
\ProcessOptionsX*\relax
%%%% Import the other custom math packages
\RequirePackage{mkessler-mathfont} % Load this first to ensure untouched fonts
\RequirePackage{amsmath}
\RequirePackage{mathtools}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{latexsym}
% Für Formeln
\RequirePackage{mathabx}
\RequirePackage{esint}
\RequirePackage{IEEEtrantools}
\RequirePackage[ngerman,ruled,vlined]{algorithm2e}
%%% Importing other custom packages
\RequirePackage{mkessler-faktor}
\RequirePackage{mkessler-mathsymb}
\RequirePackage[basic]{mkessler-mathalias}
% mkessler-mathfont has already been imported
\RequirePackage[\ifmkessler@math@english english\else german\fi]{mkessler-mathop}
\RequirePackage{mkessler-categories}
\RequirePackage{mkessler-mathfig}
\RequirePackage{mkessler-unicodechar}
\RequirePackage{mkessler-mathfixes} % Load this last since it renews behaviour

View file

@ -0,0 +1,89 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright © 2022 Maximilian Keßler
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the “Software”), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This package has been generated by PyTeX, available at
% https://github.com/kesslermaximilian/PyTeX
% and built from source file 'mathalias.pysty'.
% It is STRONGLY DISCOURAGED to edit this source file directly, since local
% changes will not be versioned by Git and overwritten by the next build. Always
% edit the source file and build the package again.
%
% Build details:
% PyTeX version: v1.2.0-26-g6048812 (commit 6048812)
% Source code version: v2.5.2 (commit fbc4fd5)