From a5cff54b50f7b66a1319645f5dc06ccd45b4ca83 Mon Sep 17 00:00:00 2001 From: Never Gude Date: Mon, 11 May 2026 22:10:47 +0200 Subject: [PATCH] some tweaks --- tex/latex/ngutils/ngutils.sty | 90 +++++++++++++---------------------- 1 file changed, 32 insertions(+), 58 deletions(-) diff --git a/tex/latex/ngutils/ngutils.sty b/tex/latex/ngutils/ngutils.sty index 5c5aeb2..47cd6e5 100644 --- a/tex/latex/ngutils/ngutils.sty +++ b/tex/latex/ngutils/ngutils.sty @@ -7,7 +7,6 @@ \RequirePackage{booktabs} \RequirePackage{listings} - \lstnewenvironment{pseudocode}[1][] %defines the algorithm listing environment { \renewcommand{\lstlistingname}{Algorithmus} @@ -31,35 +30,42 @@ \newcommand{\seilpmi}{\ensuremath{\Longleftarrow}} -\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\PP{\ensuremath{\mathbb{P}}} +\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{\PP}{\ensuremath{\mathbb{P}}} -\newcommand\Oh{\ensuremath{\mathcal{O}}} -\newcommand\oh{\ensuremath{\scriptstyle{\mathcal{O}}}} -\newcommand\Eh{\ensuremath{\mathrm{E}}} -\newcommand\Var{\ensuremath{\mathrm{Var}}} +\newcommand{\Pe}{\ensuremath{\mathrm{P}}} +\newcommand{\NPe}{\ensuremath{\mathrm{NP}}} -\newcommand\parens[1]{\ensuremath{\left(#1\right)}} -\newcommand\brackets[1]{\ensuremath{\left[#1\right]}} -\newcommand\braces[1]{\ensuremath{\left\{#1\right\}}} -\newcommand\angled[1]{\ensuremath{\left\langle#1\right\rangle}} +\newcommand{\Oh}{\ensuremath{\mathcal{O}}} +\newcommand{\oh}{\ensuremath{\scriptstyle{\mathcal{O}}}} -\newcommand\tup[1]{\parens{#1}} -\newcommand\ivl[1]{\brackets{#1}} -\newcommand\set[1]{\braces{#1}} -\newcommand\arr[1]{\angled{#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{\Eh}{\ensuremath{\mathrm{E}}} +\newcommand{\Var}{\ensuremath{\mathrm{Var}}} +\newcommand{\pot}{\ensuremath{\mathcal{P}}} +\newcommand{\argmax}{\ensuremath{\mathrm{arg\,max}}} +\newcommand{\argmin}{\ensuremath{\mathrm{arg\,min}}} -\newcommand\alg[2]{{\normalfont\scshape#1}{\normalfont(#2)}} -\newcommand\algt[1]{{\normalfont\scshape#1}} -\newcommand\com[1]{{\normalfont\itshape/\!\!/ #1}} +\newcommand{\parens}[1]{\ensuremath{\left(#1\right)}} +\newcommand{\brackets}[1]{\ensuremath{\left[#1\right]}} +\newcommand{\braces}[1]{\ensuremath{\left\{#1\right\}}} +\newcommand{\angled}[1]{\ensuremath{\left\langle#1\right\rangle}} + +\newcommand{\tup}[1]{\parens{#1}} +\newcommand{\ivl}[1]{\brackets{#1}} +\newcommand{\set}[1]{\braces{#1}} +\newcommand{\arr}[1]{\angled{#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}[2]{{\normalfont\scshape#1}{\normalfont(#2)}} +\newcommand{\algt}[1]{{\normalfont\scshape#1}} +\newcommand{\com}[1]{{\normalfont\itshape/\!\!/ #1}} \newenvironment{algorithmic}[1][1em]{ \begin{minipage}[t]{\dimexpr\linewidth} @@ -71,38 +77,6 @@ \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} -% } - -% \makeatletter -% \newcounter{algorithm}% the counter -% \renewcommand*\thealgorithm{\arabic{algorithm}}% the default format for the counter -% \newcommand*\fps@algorithm{tbp}% default floating options -% \newcommand*\ftype@algorithm{4}% float type number, needs to be a power of 2; % \ftype@figure=1, \ftype@table=2 -% \newcommand*\ext@algorithm{loa}% extension of file for the list of schemes -% \newcommand*\fnum@algorithm{\algorithmname\nobreakspace\thealgorithm}% used in caption -% \newcommand*\algorithmname{Algorithmus}% the name -% \newcommand*\listalgorithmname{Algorithmenverzeichnis}% the name of the list -% \newenvironment{algorithm}{\@float{algorithm}}{\end@float}% the environment -% \newenvironment{algorithm*}{\@dblfloat{algorithm}}{\end@dblfloat}% the starred % version for twocolumn documents -% \newcommand*\listofalgorithms{% the list of schemes -% \section*{\listalgorithmname} -% \@mkboth -% {\MakeUppercase\listalgorithmname} -% {\MakeUppercase\listalgorithmname} -% \@starttoc{\ext@algorithm} } -% \let\l@algorithm\l@figure % layout of list is the same as for figures -% \makeatother -% \newlength{\theoremskip} \setlength{\theoremskip}{6em}