remove category specific stuff from mathop package, integrate categories package into math package

Build branch v2.5.1 (50e2c7c) from kesslermaximilian/LatexPackages
This commit is contained in:
Maximilian Keßler 2022-01-11 20:39:11 +00:00
commit c7be525ebb
36 changed files with 4022 additions and 0 deletions

345
build_info.json Normal file
View file

@ -0,0 +1,345 @@
{
"build_time": "",
"source files": {
"version": "v2.5.1",
"commit": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"dirty": false
},
"pytex": {
"version": "v1.2.0-12-g75a2b13",
"commit": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
"tex_sources": [
{
"name": "mkessler-restate.sty",
"source file": "restate.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-enumerate.sty",
"source file": "enumerate.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-removed.sty",
"source file": "removed.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-refproof.sty",
"source file": "refproof.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-bibliography.sty",
"source file": "bibliography.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-gag.sty",
"source file": "gag.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-figures.sty",
"source file": "figures.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-exsheet.sty",
"source file": "exsheet.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-lang-input.sty",
"source file": "lang-input.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-lectures.sty",
"source file": "lectures.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathalias.sty",
"source file": "mathalias.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathfixes.sty",
"source file": "mathfixes.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-unicodechar.sty",
"source file": "unicodechar.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathop.sty",
"source file": "mathop.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathfig.sty",
"source file": "mathfig.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathsymb.sty",
"source file": "mathsymb.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-faktor.sty",
"source file": "faktor.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-mathfont.sty",
"source file": "mathfont.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-math.sty",
"source file": "math.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-todo.sty",
"source file": "todo.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-counters.sty",
"source file": "counters.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-findpackage.sty",
"source file": "findpackage.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-thmstyle.sty",
"source file": "thmstyle.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-fancythm.sty",
"source file": "fancythm.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-incfig.sty",
"source file": "incfig.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-hypersetup.sty",
"source file": "hypersetup.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-vocab.sty",
"source file": "vocab.pysty",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-script.cls",
"source file": "script.pycls",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-sheet.cls",
"source file": "sheet.pycls",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "translator-proof-dictionary-{language}.dict",
"source file": "proof.pydict",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "translator-mathematical-categories-dictionary-{language}.dict",
"source file": "mathematical-categories.pydict",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-categories.sty",
"source file": "categories.pysty3",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
},
{
"name": "mkessler-symbindex.sty",
"source file": "symbindex.pysty3",
"build time": "2022/01/11 20:39",
"source version": "v2.5.1",
"source commit hash": "50e2c7c956a83ccea4ad88202467f787bc722cf7",
"pytex version": "v1.2.0-12-g75a2b13",
"pytex commit hash": "75a2b137ec3acdd611593b82802fcb14c73e3090",
"dirty": false
}
]
}

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-12-g75a2b13 (commit 75a2b13)
% Source code version: v2.5.1 (commit 50e2c7c)
%
% 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/11 - 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-12-g75a2b13 (commit 75a2b13)
% Source code version: v2.5.1 (commit 50e2c7c)
%
% 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/11 - 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-12-g75a2b13 (commit 75a2b13)
% Source code version: v2.5.1 (commit 50e2c7c)
%
% 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/11 - 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-12-g75a2b13 (commit 75a2b13)
% Source code version: v2.5.1 (commit 50e2c7c)
%
% 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/11 - 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-12-g75a2b13 (commit 75a2b13)
% Source code version: v2.5.1 (commit 50e2c7c)
%
% 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/11 - 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,181 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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.
%