add floor, ceil etc to math operators

This commit is contained in:
Maximilian Keßler 2021-09-09 21:46:01 +02:00
parent 32e5b8860a
commit 1808a78541

View file

@ -12,7 +12,7 @@
%%%%%Package dependencies %%%%%Package dependencies
\RequirePackage{amsmath} \RequirePackage{amsmath}
\RequirePackage{bbm} \RequirePackage{bbm}
\RequirePackage{mathtools}
%%%%Different types of operator wrappers: %%%%Different types of operator wrappers:
@ -161,6 +161,16 @@
\newcommand*{\cfun}{\ensuremath{\mathbbm{1}}} \newcommand*{\cfun}{\ensuremath{\mathbbm{1}}}
\newcommand*{\One}{\cfun} \newcommand*{\One}{\cfun}
%Possibly destructive commands %Paired Delimiters
\renewcommand\subset\subseteq \DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\renewcommand\supset\supseteq \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*}}