\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-mathfixes}[2021-04-27 - Hacky math packages for some (custom) fixes]
%%%%%

% This just brings together some (possibly ugly) hacks that I use when writing math. Likely, you do not want to use this except when building around this package (like I did), or already have similar shortcuts

%Proper Degree command
\def\mkessler@mathfixes@degree{\ensuremath{^\circ}}
\AtBeginDocument{\let\degree\mkessler@mathfixes@degree}

% Always put limits under \limit
\let\oldlim\lim\def\lim{\oldlim\limits}

% Print equal sign under subset by default to not confuse people
% (I still write \subset, because this enables me remove this renewcommand and have the default \subset command evaluated instead
\let\mkessler@mathfixes@subseteq\subseteq
\let\mkessler@mathfixes@supseteq\supseteq
\AtBeginDocument{
    \let\subset\mkessler@mathfixes@subseteq
    \let\supset\mkessler@mathfixes@supseteq
}

%%Renew phi and epsilon to their proper versions, make the old ones available as 
% uglyphi and uglyepsilon

\let\mkessler@mathfixes@stored@phi\phi
\let\mkessler@mathfixes@stored@varphi\varphi
\AtBeginDocument{
    \let\phi\mkessler@mathfixes@stored@varphi
    \let\uglyphi\mkessler@mathfixes@stored@phi
}

\let\mkessler@mathfixes@stored@epsilon\epsilon
\let\mkessler@mathfixes@stored@varepsilon\varepsilon
\AtBeginDocument{
    \let\epsilon\mkessler@mathfixes@stored@varepsilon
    \let\uglyepsilon\mkessler@mathfixes@stored@epsilon
}
