2021-08-26 13:41:40 +02:00
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
|
\ProvidesPackage{mkessler-math}[2021/03/31 - Math package]
|
|
|
|
|
%%%%%%Provides the basic math packages used for my lecture-note write-ups
|
|
|
|
|
|
|
|
|
|
%The language to pass to babel
|
|
|
|
|
\newif\ifenglish\englishtrue
|
|
|
|
|
\DeclareOption{german}{\englishfalse}
|
|
|
|
|
\DeclareOption{english}{\englishtrue}
|
|
|
|
|
|
|
|
|
|
%If beamer shall be activated
|
|
|
|
|
\newif\ifbeamer\beamerfalse
|
|
|
|
|
\DeclareOption{beamer}{\beamertrue}
|
|
|
|
|
\DeclareOption{nobeamer}{\beamerfalse}
|
|
|
|
|
|
|
|
|
|
\DeclareOption*{\PackageWarning{mkessler-math}{Unknown '\CurrentOption'}}
|
|
|
|
|
\ProcessOptions\relax
|
|
|
|
|
|
|
|
|
|
\RequirePackage{newunicodechar}
|
2021-09-08 21:01:28 +02:00
|
|
|
|
\newunicodechar{α}{\ensuremath\alpha}
|
|
|
|
|
\newunicodechar{β}{\ensuremath\beta}
|
|
|
|
|
\newunicodechar{γ}{\ensuremath\gamma}
|
|
|
|
|
\newunicodechar{δ}{\ensuremath\delta}
|
|
|
|
|
\newunicodechar{ε}{\ensuremath\epsilon}
|
|
|
|
|
\newunicodechar{ζ}{\ensuremath\zeta}
|
|
|
|
|
\newunicodechar{η}{\ensuremath\eta}
|
|
|
|
|
\newunicodechar{θ}{\ensuremath\theta}
|
|
|
|
|
\newunicodechar{ι}{\ensuremath\iota}
|
|
|
|
|
\newunicodechar{κ}{\ensuremath\kappa}
|
|
|
|
|
\newunicodechar{λ}{\ensuremath\lambda}
|
|
|
|
|
\newunicodechar{μ}{\ensuremath\mu}
|
|
|
|
|
\newunicodechar{ν}{\ensuremath\nu}
|
|
|
|
|
\newunicodechar{ξ}{\ensuremath\xi}
|
|
|
|
|
\newunicodechar{π}{\ensuremath\pi}
|
|
|
|
|
\newunicodechar{ρ}{\ensuremath\rho}
|
|
|
|
|
\newunicodechar{σ}{\ensuremath\sigma}
|
|
|
|
|
\newunicodechar{τ}{\ensuremath\tau}
|
|
|
|
|
\newunicodechar{υ}{\ensuremath\upsilon}
|
|
|
|
|
\newunicodechar{φ}{\ensuremath\phi}
|
|
|
|
|
\newunicodechar{χ}{\ensuremath\chi}
|
|
|
|
|
\newunicodechar{ψ}{\ensuremath\psi}
|
|
|
|
|
\newunicodechar{ω}{\ensuremath\omega}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
|
|
|
|
\RequirePackage{etoolbox}
|
|
|
|
|
\RequirePackage{amsmath}
|
|
|
|
|
\RequirePackage{mathtools}
|
|
|
|
|
\RequirePackage{amsthm}
|
|
|
|
|
\RequirePackage{amssymb}
|
2021-09-08 18:57:39 +02:00
|
|
|
|
|
2021-08-26 13:41:40 +02:00
|
|
|
|
\RequirePackage{latexsym}
|
|
|
|
|
\RequirePackage{mathrsfs}
|
|
|
|
|
\ifbeamer\else
|
|
|
|
|
\RequirePackage[shortlabels]{enumitem}
|
|
|
|
|
\fi
|
|
|
|
|
|
2021-09-08 18:57:39 +02:00
|
|
|
|
\RequirePackage{pgfplots} % Plots
|
2021-08-26 13:41:40 +02:00
|
|
|
|
\pgfplotsset{compat=1.7}
|
|
|
|
|
|
2021-09-08 18:57:39 +02:00
|
|
|
|
\RequirePackage{tikz} % Plots / drawings
|
2021-08-26 13:41:40 +02:00
|
|
|
|
\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes}
|
2021-09-08 18:57:39 +02:00
|
|
|
|
|
|
|
|
|
\RequirePackage{tikz-cd} %Commutative diagrams
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
|
|
|
|
%%for small diagrams, similar to tikz-cd
|
|
|
|
|
\usepackage{xy} % for small diagrams, e.g. arrows
|
|
|
|
|
\xyoption{all}
|
|
|
|
|
|
2021-09-08 18:57:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-26 13:41:40 +02:00
|
|
|
|
%%Theorems needed in any case (fancy or not fancy theorems)
|
|
|
|
|
|
|
|
|
|
% Für Formeln
|
|
|
|
|
\RequirePackage{mathabx}
|
|
|
|
|
\RequirePackage{faktor}
|
|
|
|
|
\RequirePackage[mathscr]{eucal}
|
|
|
|
|
|
|
|
|
|
\RequirePackage{blindtext}
|
|
|
|
|
\RequirePackage{tabto}
|
|
|
|
|
\RequirePackage{lastpage} %\pageref{LastPage} for reference on the last page
|
|
|
|
|
|
|
|
|
|
% Für Tabulatoren
|
|
|
|
|
|
|
|
|
|
\RequirePackage{pdfpages} % PDF-Dateien einbinden
|
|
|
|
|
|
|
|
|
|
% Für Zeilenumbruch
|
|
|
|
|
\RequirePackage{microtype}
|
|
|
|
|
\RequirePackage{changepage}
|
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
\RequirePackage{esint}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
\RequirePackage{IEEEtrantools}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
\RequirePackage[ngerman,ruled,vlined]{algorithm2e}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
%%% Custom commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%%Load additional operators
|
|
|
|
|
\RequirePackage{mkessler-operators}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
|
|
|
|
%Short commands for \mathbb{}
|
|
|
|
|
\newcommand{\C}{\ensuremath{\mathbb{C}}}
|
|
|
|
|
\newcommand{\F}{\ensuremath{\mathbb{F}}}
|
|
|
|
|
\newcommand{\K}{\ensuremath{\mathbb{K}}}
|
|
|
|
|
\newcommand{\N}{\ensuremath{\mathbb{N}}}
|
|
|
|
|
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
|
|
|
|
|
\newcommand{\R}{\ensuremath{\mathbb{R}}}
|
|
|
|
|
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
|
|
|
|
|
|
|
|
|
|
%Paired Delimiters
|
|
|
|
|
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
|
|
|
|
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
|
|
|
|
|
|
|
|
|
|
%Norm and absolute value
|
|
|
|
|
%Make them scaling by default and have \abs*{} as the non-scaling version of the command
|
|
|
|
|
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
|
|
|
|
|
\makeatletter
|
|
|
|
|
\let\oldabs\abs
|
|
|
|
|
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
|
|
|
|
|
|
|
|
|
|
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
|
|
|
|
|
\let\oldnorm\norm
|
|
|
|
|
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
|
|
|
|
|
\makeatother
|
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
%%%Fixes of common misbehaviour
|
|
|
|
|
|
|
|
|
|
%Proper Degree command
|
2021-08-26 13:41:40 +02:00
|
|
|
|
\renewcommand{\degree}{^\circ}
|
|
|
|
|
|
2021-09-08 13:30:01 +02:00
|
|
|
|
% Always put limits under \limit
|
|
|
|
|
\let\oldlim\lim\def\lim{\oldlim\limits}
|
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
\newcommand{\emphasize}[1]{{\color{red} #1}}
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
2021-09-08 21:01:28 +02:00
|
|
|
|
%For setting counters of itemns in \enemerate
|
|
|
|
|
\makeatletter
|
|
|
|
|
\newcommand\setItemnumber[1]{\setcounter{enum\romannumeral\@enumdepth}{\numexpr#1-1\relax}}
|
|
|
|
|
\makeatother
|
2021-08-26 13:41:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|