Initial commit

This commit is contained in:
Never Gude 2026-01-13 20:22:11 +01:00
parent 085aa0a49a
commit e653c3389a
2 changed files with 116 additions and 0 deletions

View file

@ -0,0 +1,66 @@
% vim: set filetype:tex
% Identification %
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ngexrcs}[2021/12/21 ADS Exercise class]
% Handle options %
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
% More declarations %
\LoadClass{scrartcl}
\KOMAoptions{mpinclude=true}
\recalctypearea
\RequirePackage{ngutils}
\RequirePackage{enumitem}
\setlist{leftmargin=*}
% define fonts
\RequirePackage{fontspec}
%\RequirePackage{tgpagella}
%\RequirePackage{tgheros}
%\RequirePackage{euler-math}
\RequirePackage[math-style=upright]{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}
\setmathfont{Euler Math}
\setlength{\marginparwidth}{1.5\marginparwidth}
\setlength{\fboxrule}{\heavyrulewidth}
%
\renewcommand\theenumi{\@alph\c@enumi}
\renewcommand\theenumii{\@arabic\c@enumii}
%\renewcommand\theenumiii{\@roman\c@enumiii}
%\renewcommand\theenumiv{\@Alph\c@enumiv}
\renewcommand\labelenumi{\theenumi)}
\renewcommand\labelenumii{\theenumii.}
%\renewcommand\labelenumiii{\theenumiii.}
%\renewcommand\labelenumiv{\theenumiv.}
% Use sansfont for all title elements
\addtokomafont{titlehead}{\sffamily}
\addtokomafont{subject}{\normalfont \sffamily \itshape}
\addtokomafont{title}{\sffamily}
\addtokomafont{subtitle}{\sffamily}
\addtokomafont{author}{\sffamily}
\addtokomafont{date}{\sffamily}
\addtokomafont{publishers}{\sffamily}
% Use serif font for headings
\addtokomafont{disposition}{\rmfamily}
% Let sections be formated as in: Aufgabe 1 -- Section title
\renewcommand*{\sectionformat}{Aufgabe \thesection\autodot\enskip--\enskip}
% Let points of an exercise be printed as in: [__ / 2]
\newkomafont{points}{\sffamily}
\newcommand\points[2][\quad]{\marginline{\framebox{{\usekomafont{points}#1 \textbf{/} #2}}}}

View file

@ -0,0 +1,50 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ngutils}[2025/12/24 Never's LaTeX utils]
\RequirePackage[ngerman]{babel}
\RequirePackage{hyperref}
\RequirePackage{graphicx}
\RequirePackage{tabularx}
\RequirePackage{booktabs}
\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\tup[1]{\ensuremath{\left(#1\right)}}
\newcommand\set[1]{\ensuremath{\{#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\arr[1]{\ensuremath{\langle#1\rangle}}
\newcommand\alg[1]{\normalfont \scshape #1}
\newcommand\com[1]{\normalfont \itshape /\!\!/ #1}
\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}
}