104 lines
2.5 KiB
TeX
104 lines
2.5 KiB
TeX
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{ngutils}[2025/12/24 Never's LaTeX utils]
|
|
|
|
\RequirePackage[ngerman]{babel}
|
|
\RequirePackage{graphicx}
|
|
\RequirePackage{tabularx}
|
|
\RequirePackage{booktabs}
|
|
|
|
\newcommand\Eh{\ensuremath{\mathrm{E}}}
|
|
\newcommand\Var{\ensuremath{\mathrm{Var}}}
|
|
|
|
\newcommand\NN{\ensuremath{\mathbb{N}}}
|
|
\newcommand\ZZ{\ensuremath{\mathbb{Z}}}
|
|
\newcommand\QQ{\ensuremath{\mathbb{Q}}}
|
|
\newcommand\RR{\ensuremath{\mathbb{R}}}
|
|
\newcommand\CC{\ensuremath{\mathbb{C}}}
|
|
|
|
\newcommand\Oh{\ensuremath{\mathcal{O}}}
|
|
\newcommand\oh{\ensuremath{\scriptstyle{\mathcal{O}}}}
|
|
|
|
\newcommand\parens[1]{\ensuremath{\left(#1\right)}}
|
|
\newcommand\brackets[1]{\ensuremath{\left[#1\right]}}
|
|
\newcommand\braces[1]{\ensuremath{\left\{#1\right\}}}
|
|
\newcommand\angles[1]{\ensuremath{\langle#1\rangle}}
|
|
|
|
\newcommand\tup[1]{\parens{#1}}
|
|
\newcommand\ivl[1]{\brackets{#1}}
|
|
\newcommand\set[1]{\braces{#1}}
|
|
\newcommand\arr[1]{\angles{#1}}
|
|
\newcommand\abs[1]{\ensuremath{\lvert#1\rvert}}
|
|
\newcommand\norm[1]{\ensuremath{\lVert#1\rVert}}
|
|
\newcommand\ceil[1]{\ensuremath{\lceil#1\rceil}}
|
|
\newcommand\floor[1]{\ensuremath{\lfloor#1\rfloor}}
|
|
|
|
\newcommand\alg[1]{\normalfont\scshape#1\normalfont}
|
|
\newcommand\com[1]{\normalfont\itshape/\!\!/ #1\normalfont}
|
|
|
|
\newenvironment{algorithmic}[1][1em]{
|
|
\begin{minipage}[t]{\dimexpr\linewidth}
|
|
\bfseries
|
|
\begin{tabbing}
|
|
\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\kill
|
|
}{%
|
|
\end{tabbing}
|
|
\end{minipage}
|
|
}
|
|
|
|
\newenvironment{algorithm}[1][1em]{
|
|
\begin{center}
|
|
\begin{minipage}[t]{\dimexpr\linewidth}
|
|
\bfseries
|
|
\begin{tabbing}
|
|
\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\kill
|
|
}{%
|
|
\end{tabbing}
|
|
\end{minipage}
|
|
\end{center}
|
|
}
|
|
|
|
\newlength{\theoremskip}
|
|
\setlength{\theoremskip}{6em}
|
|
|
|
\newcommand{\theoremfont}{\normalfont\bfseries}
|
|
\newcommand{\definitionfont}{\normalfont\bfseries}
|
|
|
|
\newenvironment{theoremic}[2][\theoremfont]{
|
|
{#1 #2}
|
|
\hfill
|
|
\begin{minipage}[t]{\the\dimexpr\linewidth-\theoremskip\relax}
|
|
}{
|
|
\end{minipage}
|
|
}
|
|
|
|
\newenvironment{theorem}{
|
|
\begin{theoremic}{Satz.}
|
|
}{
|
|
\end{theoremic}
|
|
}
|
|
|
|
\newenvironment{lemma}{
|
|
\begin{theoremic}{Lemma.}
|
|
}{
|
|
\end{theoremic}
|
|
}
|
|
|
|
\newenvironment{proof}{
|
|
\begin{theoremic}{Beweis.}
|
|
}{
|
|
\end{theoremic}
|
|
}
|
|
|
|
\newenvironment{definition}{
|
|
\begin{theoremic}[\definitionfont]{Definition.}
|
|
}{
|
|
\end{theoremic}
|
|
}
|
|
|
|
\newenvironment{example}{
|
|
\begin{theoremic}[\definitionfont]{Beispiel.}
|
|
}{
|
|
\end{theoremic}
|
|
}
|
|
|
|
|