From 231fab44172fbd4d812f56aa317952b739492ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 9 Sep 2021 21:47:21 +0200 Subject: [PATCH] move math package into subdirectory --- math/mkessler-math.sty | 5 +- mkessler-math.sty | 115 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 mkessler-math.sty diff --git a/math/mkessler-math.sty b/math/mkessler-math.sty index b4a4c7e..9081bd8 100644 --- a/math/mkessler-math.sty +++ b/math/mkessler-math.sty @@ -1,6 +1,9 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mkessler-math}[2021/03/31 - Math package] -%%%%%%Provides the basic math packages used for my lecture-note write-ups +%%%%%%Collects the basic math packages used for my lecture-note write-ups + +%% This just imports all the packages I use for writing up mathematics + \newif\if@mkessler@math@english\@mkessler@math@englishtrue \DeclareOption{german}{\@mkessler@math@englishfalse} diff --git a/mkessler-math.sty b/mkessler-math.sty new file mode 100644 index 0000000..3ed52f8 --- /dev/null +++ b/mkessler-math.sty @@ -0,0 +1,115 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mkessler-math}[2021/03/31 - Math package] +%%%%%%Provides the basic math packages used for my lecture-note write-ups + +\newif\if@mkessler@math@english\@mkessler@math@englishtrue +\DeclareOption{german}{\@mkessler@math@englishfalse} +\DeclareOption{ngerman}{\@mkessler@math@englishfalse} +\DeclareOption{english}{\@mkessler@math@englishtrue} + +\DeclareOption*{\PackageWarning{mkessler-math}{Unknown '\CurrentOption'}} +\ProcessOptions\relax + +\RequirePackage{newunicodechar} + \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} + +\RequirePackage{amsmath} +\RequirePackage{mathtools} +\RequirePackage{amsthm} +\RequirePackage{amssymb} + +\RequirePackage{latexsym} +\RequirePackage{mathrsfs} + +\RequirePackage{pgfplots} % Plots +\pgfplotsset{compat=1.7} + +\RequirePackage{tikz} % Plots / drawings +\usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes} + +\RequirePackage{tikz-cd} %Commutative diagrams + + +%%for small diagrams, similar to tikz-cd +\usepackage[all]{xy} % for small diagrams, e.g. arrows +%%% In older versions, you found +% \usepackage{xy} +% \xyoption{all} +% here, but this messes with the catcode of the @ sign (which no package should do!) +% so that further parts in this package would get broken + +% Für Formeln +\RequirePackage{mathabx} +\RequirePackage{faktor} +\RequirePackage[mathscr]{eucal} % \mathscr for another calligraphic alphabet +\RequirePackage{esint} + +\RequirePackage{IEEEtrantools} + + +\RequirePackage[ngerman,ruled,vlined]{algorithm2e} + + +%%% Custom commands + +%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} +\let\oldabs\abs +\def\abs{\@ifstar{\oldabs}{\oldabs*}} + +\DeclarePairedDelimiter\norm{\lVert}{\rVert} +\let\oldnorm\norm +\def\norm{\@ifstar{\oldnorm}{\oldnorm*}} + +%%%Fixes of common misbehaviour + +%Proper Degree command +\renewcommand{\degree}{^\circ} + +% Always put limits under \limit +\let\oldlim\lim\def\lim{\oldlim\limits} + +\if@mkessler@math@english + \RequirePackage[english]{mkessler-operators} +\else + \RequirePackage[german]{mkessler-operators} +\fi + + +