diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..6a6028205cc6d6876be8fd907f88a6908ce33392 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.PNG filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.JPG filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.JPEG filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.7z filter=lfs diff=lfs merge=lfs -text +*.docx filter=lfs diff=lfs merge=lfs -text +*.xlsx filter=lfs diff=lfs merge=lfs -text +*.pptx filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index ec7c43740b06118ab855aada6943dc3f6bf5ad13..d735530af29ac5534206db7ae8704efa0fe6ddf7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ - -.vscode/ .aux/ -build/ *.synctex.gz *.synctex(busy) -*.log \ No newline at end of file +*.log diff --git a/HsH-classes.dtx b/HsH-classes.dtx deleted file mode 100644 index 5001a6d84e451d921e1d9ef28191133b44efc723..0000000000000000000000000000000000000000 --- a/HsH-classes.dtx +++ /dev/null @@ -1,812 +0,0 @@ -% \iffalse meta-comment -% -% Copyright (C) 2020 by Jan Wille <mail@janwille.de> -% ------------------------------------------------------- -% -% This file may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in: -% -% http://www.latex-project.org/lppl.txt -% -% and version 1.3 or later is part of all distributions of LaTeX -% version 2021-01-01 or later. -% -% \fi -% -%<*article|report|standalone> -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} -\NeedsTeXFormat{LaTeX2e} -% -%<article>\newcommand{\myClassName}{HsH-article} -%<report>\newcommand{\myClassName}{HsH-report} -%<standalone>\newcommand{\myClassName}{HsH-standalone} -\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] - -%% commands for HsH-logo -\newcommand{\HsHlogoPath}{HSH-Logo.pdf} -\newcommand{\HsHlogoPage}{1} -\newcommand{\includeHsHlogohere}[1][5cm]{ - \IfFileExists{\HsHlogoPath}{}{ - \ClassError{\myClassName}{HsH-Logo.pdf not found!}{ - The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location - } - } - \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} -} -\newif\if@german% -%<article|report>\newif\if@todos\@todosfalse% - -%% document options ------------------------------------------------------------------------------- -\DeclareOption{german}{ - \@germantrue -} -\DeclareOption{ngerman}{ - \@germantrue -} -\DeclareOption{english}{ - \@germanfalse -} -\DeclareOption{f1}{ - \renewcommand{\HsHlogoPage}{2} -} -\DeclareOption{f2}{ - \renewcommand{\HsHlogoPage}{3} -} -\DeclareOption{f3}{ - \renewcommand{\HsHlogoPage}{4} -} -\DeclareOption{f4}{ - \renewcommand{\HsHlogoPage}{5} -} -\DeclareOption{f5}{ - \renewcommand{\HsHlogoPage}{6} -} -\DeclareOption{sans}{ - \renewcommand{\familydefault}{\sfdefault} -} -\DeclareOption{roman}{ - \renewcommand{\familydefault}{\rmdefault} -} -%<*article|report> -\DeclareOption{todos}{ - \@todostrue -} -%</article|report> -% -%% defere all other options to the base class -%<article>\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{scrartcl}} -%<report>\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{scrreprt}} -%<standalone>\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{standalone}} -% -%<article|report>\ExecuteOptions{fontsize=11pt,a4paper,ngerman,sans} % default options -%<standalone>\ExecuteOptions{margin=0.25cm,fontsize=11pt,a4paper,ngerman,sans} % default options -\ProcessOptions\relax -%% Load KOMA class -%<article>\LoadClass{scrartcl} -%<report>\LoadClass{scrreprt} -%<standalone>\LoadClass[multi=tikzpicture,multi=circuitikz]{standalone} -%<article|report>\KOMAoption{toc}{bibliography,listof} - -%% package loading and config --------------------------------------------------------------------- -% -% inputencoding, utf8 recomendet -\PassOptionsToPackage{utf8}{inputenc} -\RequirePackage{inputenc} -% -% outputencoding, T1 recomendet -\PassOptionsToPackage{T1}{fontenc} -\RequirePackage{fontenc} -% -% font -\RequirePackage{lmodern} -% -% required for importing images -\RequirePackage{graphicx} -% -% a lot of nice Math -\RequirePackage{amsmath} -% -%<*article|report> -% required for changing layout -\PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} -\if@todos -% new paperwidth is everything without the right marging plus new stuff for marginpar -% rightmargin = ((1-0,75<paperwidth>) - 0.08<bindingoffset>)/2 = 0.915 - \setlength{\marginparwidth}{6cm} - \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry} -\else - \PassOptionsToPackage{nomarginpar}{geometry} -\fi -\RequirePackage{geometry} -% -% language specific localisation -\if@german - \PassOptionsToPackage{ngerman}{babel} -\else - \PassOptionsToPackage{english}{babel} -\fi -\RequirePackage{babel} -% -% german dezimal numbers -\iflanguage{ngerman}{\RequirePackage{ziffer}}{}% -% -% required for header and footer -\PassOptionsToPackage{headsepline}{scrlayer-scrpage} -\RequirePackage{scrlayer-scrpage} -% compatability with listings -\RequirePackage{scrhack} -% -% references and lists are clikable -\PassOptionsToPackage{hidelinks}{hyperref} -\RequirePackage{hyperref} -% -% put anchors at the beginning of floats -\PassOptionsToPackage{hypcap=true}{caption} -\RequirePackage{caption} -% -% generat bookmarkes -\RequirePackage{bookmark} -% -% quotations -\PassOptionsToPackage{babel}{csquotes} -\iflanguage{ngerman}{\PassOptionsToPackage{german=quotes}{csquotes}}{}% -\RequirePackage{csquotes} -% this makes quotationmarks usable in text: -\MakeOuterQuote{"} -% -% Todonote package -% already changed the margins with geometry -\if@todos - \PassOptionsToPackage{svgnames}{xcolor} - \PassOptionsToPackage{ - textsize=small, - figwidth=.6\textwidth - }{todonotes} - \RequirePackage{todonotes} - \setlength{\marginparwidth}{5.2cm} -\else - \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2][]{} - \newcommand{\missingfigure}[2][]{} -\fi -% -% foreach loops -\RequirePackage{pgffor} -% -%</article|report> -% -%% options for not loaded packages ---------------------------------------------------------------- -%<article|report>\PassOptionsToPackage{backend=biber,style=alphabetic,sorting=nyt}{biblatex} -\PassOptionsToPackage{free-standing-units}{siunitx} -\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} - -% -%<*article|report> -%% title matters ---------------------------------------------------------------------------------- -% -% redefine title to accept a short tile (like chapter, etc..) -\newcommand*{\@shorttitle}{\@empty} -\renewcommand{\title}[2][]{ - \gdef\@title{#2} - \gdef\@shorttitle{#1} -} -\newcommand*{\@matrikelnr}{} -\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} -\newcommand*{\@professor}{} -\newcommand{\professor}[1]{\gdef\@professor{#1}} -\newcommand*{\@firstexaminer}{} -\newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} -\newcommand*{\@secondexaminer}{} -\newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} -\newcommand*{\@keywords}{} -\newcommand{\keywords}[1]{\gdef\@keywords{#1}} -\let\@author\@empty -\let\@keywords\@empty - -%</article|report> -% -%% typesetting indexes upright or standart -\def\subinrm#1{\sb{\mathrm{#1}}} -{\catcode`\_=13 \global\let_=\subinrm} -% the toggle for upright subscripts -\newcommand\upsubscripts{\catcode`\_=12 } -% the toggle for italic subscripts -\newcommand\normalsubscripts{\catcode`\_=8 } -% setting upright as default -\upsubscripts - -% -%<*article|report> -%% header and footer -% first clear the default styles -\clearpairofpagestyles -% than we set the pagenumber for the plain and normal style -\ofoot*{\pagemark} -% -% now we define our custom header style -\newpagestyle{HsHheadings}{ -% twosided left page header - { - \parbox[b]{\sls@headwidth}{ - \LaTeXraggedright - \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi - }% - } -% twosided right page header - { - \parbox[b]{\sls@headwidth}{ - \LaTeXraggedleft - \leftmark - }% - } -% onesided page header - { - \parbox[b]{.45\sls@headwidth}{ - \LaTeXraggedright - \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi - }% - \hfill - \parbox[b]{.45\sls@headwidth}{ - \LaTeXraggedleft - \headmark - }% - } - (\textwidth,.1pt) -}{ - {\pagemark} - {\hfill\pagemark} - {\hfill\pagemark} -} -\pagestyle{HsHheadings} -%<article>\automark{section} -%<report>\automark{chapter} -% Chaptertitles get same header/footer as everything: -%<report>\renewcommand*{\chapterpagestyle}{HsHheadings} - -%% floats -% positioning of floats -\renewcommand{\fps@figure}{h!t} -\renewcommand{\fps@table}{h!t} -% -% check if KOMA is used -\ifx\KOMAScriptVersion\undefined\else -% center all floats - \g@addto@macro\@floatboxreset\centering -% center all captions - \setcapwidth{0.8\textwidth} -\fi -% abbreviations for names: -\iflanguage{english}{ - \renewcaptionname{english}{\figurename}{Fig.} - \renewcaptionname{english}{\tablename}{Tab.} -}{}% -\iflanguage{ngerman}{ - \renewcaptionname{ngerman}{\figurename}{Abb.} - \renewcaptionname{ngerman}{\tablename}{Tab.} - \renewcaptionname{ngerman}{\abstractname}{Abstract} -}{}% - -%% styling for itemize -\renewcommand{\labelitemi}{$\bullet$} -\renewcommand{\labelitemii}{$\circ$} -\renewcommand{\labelitemiii}{$-$} -\renewcommand{\labelitemiv}{$\cdot$} - -%% do stuff -% indentation of new paragraphs -\setlength\parindent{0pt} -% all stuff is pushed to the top of the page ingenerall -\raggedbottom -% rulers when using draft disabled -\let\layercontentsmeasure\relax - -%<*report> -% these commands are only defined for the book class, but they also make sens for the report class: -%% define easy shorthands to switch pagenumbering -\newif\if@mainmatter\@mainmattertrue -\newcommand*\frontmatter{% - \if@twoside\cleardoubleoddpage\else\clearpage\fi - \@mainmatterfalse\pagenumbering{Roman}% -} -\newcommand*\mainmatter{% - \if@twoside\cleardoubleoddpage\else\clearpage\fi - \@mainmattertrue\pagenumbering{arabic}% -} -\newcommand*\backmatter{% - \if@openright\cleardoubleoddpage\else\clearpage\fi - \@mainmatterfalse\pagenumbering{roman}% -} - -%</report> -%% custom commands -% these two comand can convert decimal number into roman numerrals in etheir upper- or lowercase -\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} -\newcommand{\lowroman}[1]{\romannumeral#1\relax} - -%</article|report> -% -%% load config at beginning of document -\AtBeginDocument{ - \makeatletter -%<*!standalone> -% solve some common errors: - \@ifpackageloaded{biblatex}{ -% solves fontype warning in San-Serif - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{} - \@ifpackageloaded{subfigure}{ - \newcommand{\subfigureautorefname}{\figureautorefname} - }{} -%</!standalone> - \InputIfFileExists{config.tex}{ - \ClassInfo{\myClassName}{config.tex was found. Using it...} - }{ - \ClassInfo{\myClassName}{no config.tex!! I hope you configered it yourself.} - } - %% provide some usefull commands: -% Makro for vertical lines around absolute values - \providecommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} - \makeatother -} -% -%<*report> -%% nicer abstract --------------------------------------------------------------------------------- -\renewenvironment{abstract}{ - \quotation - \setlength\parindent{0pt} - \addchap{\abstractname} -}{% - \ifx\@keywords\@empty\else - \vskip 2em - \paragraph{% - \iflanguage{english}{Keywords}{}% - \iflanguage{ngerman}{Schlüsselwörter}{}% - } - \@keywords - \fi - \endquotation -} -%</report> -%<*article|report> -%% declaration of Authorship ---------------------------------------------------------------------- -% -\iflanguage{english}{ - \setlocalecaption{english}{authorshipdeclaration}{Declaration of Authorship} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{authorshipdeclaration}{Selbstst\"andigkeitserkl\"arung} -}{}% -% -% this boolean stores if this document is written by more than one author -\newif\if@oneAuthor \@oneAuthortrue -% -% this is the actuall command: -\newcommand{\declarationofauthorship}[1][b]{ - \let\@param#1 - \renewcommand{\thanks}{\sbox0} - \foreach \x [count=\i] in \@author{\ifnum\i>1\global\@oneAuthorfalse\fi} - \thispagestyle{plain} - \if\@param b\vspace*{\fill}\fi - {\rule{\textwidth}{0.1pt}} - \vskip 3em - {\centering\huge\bfseries\authorshipdeclarationname\par} - \vskip 3em - \iflanguage{english}{ - \if@oneAuthor I\else We\fi\space hereby certify that the work \if@oneAuthor I\else we\fi\space \if@oneAuthor am\else are\fi\space submitting - is entirely of \if@oneAuthor my\else our\fi own making except where otherwise indicated. \if@oneAuthor I\else We\fi\space - \if@oneAuthor am\else are\fi\space aware of regulations concerning plagiarism, including disciplinary actions that may result from it. Any use - of the works of any other author, in any form, is properly acknowledged at their point of use. \par - }{}% - \iflanguage{ngerman}{ - Hiermit best{\"a}tige\if@oneAuthor\else n\fi\space \if@oneAuthor ich\else wir\fi, dass die folgende Arbeit eigenst{\"a}ndig von - \if@oneAuthor mir\else uns\fi\space allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem - Arbeitsmaterial unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines Plagiats, inklusive - disziplinarischer Ma{\ss}nahmen, sind \if@oneAuthor mir\else uns\fi\space bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmen - als solche kenntlich gemacht. \par - }{}% - {\raggedleft - \foreach \x in \@author{ - \begin{tabular}[t]{r} - \\[3em] - \rule{4cm}{0.4pt}\\ - {\footnotesize\x} - \end{tabular} - } - \par} - \if\@param t\vspace*{\fill}\fi -} -% for backwards compatability: -\let\declarationAuthorship\declarationofauthorship - -% -%% reconfig Titlepage ----------------------------------------------------------------------------- -\iflanguage{english}{ - \setlocalecaption{english}{professor}{Professor} - \setlocalecaption{english}{firstexaminer}{First examiner} - \setlocalecaption{english}{secondexaminer}{Second examiner} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} - \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} - \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} -}{}% -\newtoks\@tabtoks -\newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} -\newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} -% %%\newcommand*\resettabtoks{\global\@tabtoks{}} -\newcommand*\printtabtoks{\the\@tabtoks} -\addtokomafont{publishers}{\normalsize} -% -%<article>\renewcommand\maketitle[1][c]{ -%<report>\renewcommand\maketitle[1][l]{ - \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax - \else - \def\and{% - \end{tabular} - \hskip 1em \@plus.17fil - \begin{tabular}[t]{c}% - } - \fi -%<*article> - \par - \ifx\@uppertitleback\@empty\else - \ClassWarning{\KOMAClassName}{% - non empty \string\uppertitleback\space ignored - by \string\maketitle\MessageBreak - in `titlepage=false' mode% - } - \fi - \ifx\@lowertitleback\@empty\else - \ClassWarning{\KOMAClassName}{% - non empty \string\lowertitleback\space ignored - by \string\maketitle\MessageBreak - in `titlepage=false' mode% - } - \fi -%</article> -%<report> \begin{titlepage} -%<article> \begingroup - \let\@param#1 - \ifx\@param\@empty - \ClassError{\myClassName}{\maketitle\space with empty option}{ - \maketitle[] has been called with an empty parameter, this doesn't work. Use \maketitle instead. - } - \fi -%<*report> - \if@titlepageiscoverpage - \edef\titlepage@restore{ - \noexpand\endgroup - \noexpand\global\noexpand\@colht\the\@colht - \noexpand\global\noexpand\@colroom\the\@colroom - \noexpand\global\vsize\the\vsize - \noexpand\global\noexpand\@titlepageiscoverpagefalse - \noexpand\let\noexpand\titlepage@restore\noexpand\relax - } - \begingroup - \topmargin=\dimexpr \coverpagetopmargin-1in\relax - \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax - \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax - \textwidth=\dimexpr - \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax - \textheight=\dimexpr - \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax - \headheight=0pt - \headsep=0pt - \footskip=\baselineskip - \@colht=\textheight - \@colroom=\textheight - \vsize=\textheight - \columnwidth=\textwidth - \hsize=\columnwidth - \linewidth=\hsize - \else - \let\titlepage@restore\relax - \fi - \let\footnotesize\small - \let\footnoterule\relax - \let\footnote\thanks -%</report> -%<article> \let\titlepage@restore\relax - \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% - \let\@oldmakefnmark\@makefnmark - \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% -%<article> \next@tdpage - \ifx\@extratitle\@empty -%<article> \ifx\@frontispiece\@empty\else \mbox{}\fi -%<*report> - \ifx\@frontispiece\@empty\else - \if@twoside\mbox{}\next@tpage\fi - \noindent\@frontispiece\next@tdpage - \fi -%</report> - \else -%<article> \@makeextratitle -%<*report> - \noindent\@extratitle - \ifx\@frontispiece\@empty - \else - \next@tpage - \noindent\@frontispiece - \fi - \next@tdpage -%</report> - \fi -%<*article> - \ifx\@frontispiece\@empty - \ifx\@extratitle\@empty\else\next@tdpage\fi - \else - \next@tpage - \@makefrontispiece - \next@tdpage - \fi - \global\@topnum=\z@ -%</article> - \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative - \vspace*{1cm} - \begin{minipage}[t]{\textwidth}% - \ifx\@titlehead\@empty \else - \usekomafont{titlehead}{\@titlehead}% - \fi - \hfill -% image with referrencepoint in lower left corner: - \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{\includeHsHlogohere} - \end{minipage} - \raisebox{10pt}{\rule{\textwidth}{0.5pt}} - \null -%<article> \vskip 2em -%<report> \vfill - \begingroup - \if\@param c\centering\fi - \if\@param r\raggedleft\fi - \ifx\@subject\@empty\else - {\usekomafont{subject}{\@subject\par}} -%<article> \vskip 1.5em -%<report> \vskip 3em - \fi - {\usekomafont{title}{\huge\@title\par}} -%<article> \vskip .5em -%<report> \vskip 1em - {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi} -%<article|report> \vskip 4em - {\ifx\@matrikelnr\@empty - \if\@author\@empty\else\usekomafont{author}{ - \parbox{\dimexpr\linewidth}{ - \if\@param c\centering\fi - \if\@param r\raggedleft\fi - \@author - } - }\fi - \else - \if\@author\@empty\else - % sneeky comma needed after \@matrikelnr to deal with single item lists - \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} - \usekomafont{author}{ - \def\arraystretch{1.2} - \if\@param l\begin{tabular}{@{}l l}\printtabtoks\end{tabular}\fi - \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi - \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi - }% - \fi - \fi} -%<article> \vskip 1em -%<report> \vskip 1.5em - {\usekomafont{date}{\@date\par}} -%<article> \vskip 1em -%<report> \vskip \z@ \@plus3fill - \usekomafont{publishers}{ - \def\arraystretch{1.2} - \if\@param l\begin{tabular}{@{}l l}\fi - \if\@param c\begin{tabular}{l l}\fi - \if\@param r\begin{tabular}{r r@{}}\fi - \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi - \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi - \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi - \end{tabular} - } -%<*article> - \ifx\@dedication\@empty\else - \vskip 2em - {\usekomafont{dedication}{\@dedication \par}}% - \fi -%</article> - \par - \endgroup -%<article> \vskip 2em -%<report> \vskip 3em -%<article> \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi - \@thanks\global\let\@thanks\@empty -%<*report> - \vfill\null - \if@twoside - \@tempswatrue - \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax - \else - \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty - \@tempswafalse - \fi\fi - \fi - \if@tempswa - \next@tpage - \begin{minipage}[t]{\textwidth} - \@uppertitleback - \end{minipage}\par - \vfill - \begin{minipage}[b]{\textwidth} - \@lowertitleback - \end{minipage}\par - \@thanks\global\let\@thanks\@empty - \fi - \else - \ifx\@uppertitleback\@empty\else - \ClassWarning{\KOMAClassName}{% - non empty \string\uppertitleback\space ignored - by \string\maketitle\MessageBreak - in `twoside=false' mode% - } - \fi - \ifx\@lowertitleback\@empty\else - \ClassWarning{\KOMAClassName}{% - non empty \string\lowertitleback\space ignored - by \string\maketitle\MessageBreak - in `twoside=false' mode% - } - \fi - \fi - \ifx\@dedication\@empty - \else - \next@tdpage\null\vfill - {\centering\usekomafont{dedication}{\@dedication \par}}% - \vskip \z@ \@plus3fill - \@thanks\global\let\@thanks\@empty - \cleardoubleemptypage - \fi - \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi -%</report> -%<article> \endgroup -%<report> \end{titlepage} - \setcounter{footnote}{0} - \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax - \let\thanks\relax - \let\maketitle\relax - \let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\@subtitle\@empty - \global\let\@extratitle\@empty - \global\let\@frontispiece\@empty - \global\let\@titlehead\@empty - \global\let\@subject\@empty - \global\let\@publishers\@empty - \global\let\@uppertitleback\@empty - \global\let\@lowertitleback\@empty - \global\let\@dedication\@empty - \global\let\@matrikelnr\@empty - \global\let\@prof\@empty - \global\let\author\relax - \global\let\title\relax - \global\let\extratitle\relax - \global\let\titlehead\relax - \global\let\subject\relax - \global\let\publishers\relax - \global\let\uppertitleback\relax - \global\let\lowertitleback\relax - \global\let\dedication\relax - \global\let\date\relax - \global\let\matrikelnr\relax - \global\let\professor\relax - \fi - \global\let\and\relax -} -%</article|report> -%</article|report|standalone> -% -% Config file ------------------------------------------------------------------------------------- -%<*config> -%% Meta Data for the PDF file -\@ifpackageloaded{hyperref}{ - \hypersetup{ - pdfinfo={ - Title={\@title}, - Author={\@author}, - Subject={\@subject}, - Keywords={\@keywords} - } - } -}{} -%% configs for optional packages: -\@ifpackageloaded{biblatex}{ - \ExecuteBibliographyOptions{ - bibwarn=true, - url=true, - isbn=false, - } -}{} -\@ifpackageloaded{todonotes}{ - \setuptodonotes{ - backgroundcolor=orange!60!white, - linecolor=orange, - bordercolor=white - } -}{} -\@ifpackageloaded{siunitx}{ - \iflanguage{ngerman}{ - \sisetup{output-decimal-marker={,}} % use comma as dezimal - }{}% - \sisetup{ - tight-spacing=true, - per-mode=symbol, - scientific-notation=engineering, - %exponent-to-prefix, % use this instead of sci-notatio - round-mode = places, % round numbers - round-precision = 3, % to 3 places - } -}{} -\@ifpackageloaded{listings}{ - \PassOptionsToPackage{svgnames}{xcolor} - \RequirePackage{xcolor} - \RequirePackage{lstautogobble} - \lstset{ - commentstyle=\color{gray}, - keywordstyle=\color{FireBrick}\bfseries, - stringstyle=\color{DodgerBlue}, - showstringspaces=false, - basicstyle=\ttfamily, - tabsize=4, - literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1, - escapeinside={(*@}{@*)}, - autogobble=true, - } -}{} -\@ifpackageloaded{enumitem}{ - \RequirePackage{amssymb} - \newlist{checklist}{itemize}{2} - \setlist[checklist]{label=$\square$} -}{} -\@ifpackageloaded{csvsimple}{ - \csvstyle{every csv}{separator=semicolon} % global seperator for csv files -}{} -\@ifpackageloaded{circuitikz}{ - \ctikzset{ - font=\footnotesize, - bipole annotation style/.style={font=\tiny ,inner sep=1pt}, - } -}{} -\@ifpackageloaded{pgfplots}{ - \usepgfplotslibrary{fillbetween} % mark areas under or between graphs - \usetikzlibrary{patterns} % for using pattern in plots - \iflanguage{ngerman}{ - \pgfplotsset{/pgf/number format/use comma} - }{}% - \pgfplotsset{ - compat=1.16, - /pgf/number format/read comma as period, - every tick label/.append style={font=\tiny}, - every axis legend/.append style={font=\footnotesize}, - MyPlots/.style = { % Style for all plots - width=.6\textwidth, - grid=major, - grid style={dashed,gray!50}, - legend pos=outer north east, - FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 - FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 - FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 - FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 - FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 - errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken - error mark options={mark size=1pt,rotate=90}}, - } - } -}{} -\@ifpackageloaded{pgfplotstable}{ - \pgfplotstableset{ - col sep=semicolon, % global seperator for csv files - } -}{} -%</config> -% -% \Finale -\endinput diff --git a/HsH-classes.ins b/HsH-classes.ins deleted file mode 100644 index 64a0dd7b977983f439fc868575a5bedd5ce58a74..0000000000000000000000000000000000000000 --- a/HsH-classes.ins +++ /dev/null @@ -1,64 +0,0 @@ -%% -%% Copyright (C) 2021 by Jan Wille <mail@janwille.de> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3 of this license -%% or (at your option) any later version. The latest version of this -%% license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3 or later is part of all distributions of LaTeX version -%% 2005/12/01 or later. -%% - -\input docstrip.tex -\keepsilent -\askforoverwritefalse - -\preamble - -This is a generated file. - -Copyright (C) 2021 by Jan Wille <mail@janwille.de> - -This file may be distributed and/or modified under the conditions of -the LaTeX Project Public License, either version 1.3 of this license -or (at your option) any later version. The latest version of this -license is in: - - http://www.latex-project.org/lppl.txt - -and version 1.3 or later is part of all distributions of LaTeX version -2021/01/01 or later. - -\endpreamble - -%\BaseDirectory{.} \UseTDS - -\usedir{tex/latex/HsH-Classes} -\generate{ - \file{HsH-article.cls}{\from{HsH-classes.dtx}{article}} - \file{HsH-report.cls}{\from{HsH-classes.dtx}{report}} - \file{HsH-standalone.cls}{\from{HsH-classes.dtx}{standalone}} - \nopreamble\nopostamble - \file{config.tex}{\from{HsH-classes.dtx}{config}} -} - -\obeyspaces -\Msg{*************************************************************} -\Msg{* *} -\Msg{* To finish the installation you have to move the following *} -\Msg{* file into a directory searched by TeX: *} -\Msg{* *} -\Msg{* HsH-logo.pdf *} -\Msg{* HsH-article.cls *} -\Msg{* HsH-report.cls *} -\Msg{* HsH-standalone.cls *} -\Msg{* config.tex *} -\Msg{* *} -\Msg{* Happy TeXing! *} -\Msg{* *} -\Msg{*************************************************************} - -\endbatchfile diff --git a/README.md b/README.md index 92bae5a524ec2bb3890b7b8173009417e90d00cf..a9dd0d972b0347058c6e9276d89828e57fb6d629 100644 --- a/README.md +++ b/README.md @@ -1,262 +1,195 @@ -# What this is +[](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh) +[](https://www.latex-project.org/) +[](https://hs-hannover.de/) +<br> +[](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/releases) -This is a template designed to ease the workflow when writing documents for the Hochschule Hannover. It is intended to be used in all sophisticated -works, from lab-reports to master’s thesis's. <br> -The project provides custom document-classes caring the `HsH-` prefix as well as support files. These classes extend the well known KOMA-Script -classes and customize them with specific configurations, presets and provide commonly needed features. +# What this is -[](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/releases) +This is a template designed to ease the workflow when writing documents for the +Hochschule Hannover. It is intended to be used in all sophisticated works, from +lab-reports to master’s thesis's. \ +The project provides custom document-classes caring +the `HsH-` prefix as well as support files. These classes extend the well known +KOMA-Script classes and customize them with specific configurations, presets and provide +commonly needed features. -**Provided classes are:** +# The different classes -- [`HsH-article`](#hsh-article) -- [`HsH-report`](#hsh-report) -- [`HsH-book`](#hsh-book) (planed) -- [`HsH-standalone`](#hsh-standalone) +This project provides a set of additional classes designed for use in the Hochschule +Hannover, Germany. They extend the well-known +[KOMA-Script classes](https://ctan.org/pkg/koma-script) by adding styling and providing +some additional commands. You can find the full documentation of all features in +[src/HsH-classes.pdf](src/HsH-classes.pdf), but here is a short description of the +different classes: +### `HsH-article` +Based on the `scrartcl` this class is designed for quick and compact documents. It does +not have chapters and therefore never breaks to a new page on its own. This class is +useful for writing lab-protocols and alike. -# Quick start guide +### `HsH-report` +This is probably the most useful class. It is based on the `scrreprt` and can be used +for a wide variety of documents, beginning with lab-reports and ending at complete +thesis. The line between article and report is somewhat blurry, so use as you see fit. -## Recommended software +### `HsH-book` -As a Tex-Distribution, [MiKTeX is recommended](https://miktex.org/), TexLive should also work, but I don't use it much. <br> -To edit the `.tex` files, you could use any text editor, but I personally like [Visual Studio Code](https://code.visualstudio.com/) the most, which -can also be used for pretty much all other programming languages. Use the [Latex Workshop extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop), -and you can steal my config file from [here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/111). <br> -If you prefer a Tex-only editor, I used [Texmaker](https://www.xm1math.net/texmaker/) in the past, and it's also very good. +// ToDo -If you want to use citations in your work, you should get familiar with the `biblatex` package and include it in your project. The classes set it up -to use `biber` as the backend, which is more modern and has more features than the usual `bibtex`, but you will need to set you editor up to also use -this. +### `HsH-standalone` -## I have now Idea how to start, show me! +A helper class based on the normal `standalone` class. It is designed only for creating +images as separate documents to keep things organized and compiler times low. It is +useful for creating graphs, circuit diagrams or other kind of complex sub documents. -To get you started, there is a working example Project on the example branch that has loads of tips. Check it out -[Online](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/tree/example) or locally using `git checkout example` +# Quick start guide +## Recommended software -## Quick and dirty +As a Tex-Distribution, [MiKTeX is recommended](https://miktex.org/), TexLive should also +work, but I don't use it much. You will also need `perl` to run `latexmk` and other +useful tools. To edit the `.tex` files, you could use any text editor, but I personally +like [Visual Studio Code](https://code.visualstudio.com/) the most, which can also be +used for pretty much all other programming languages. Use the +[Latex Workshop extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop). -To get started, create a new folder for your project somewhere on your PC and create your `.tex` file. Copy the class file (`.cls`) you want to use -and the `HsH-logo.pdf` from the src folder to your project folder. You can optionally copy the `config.tex`, but you can also configure everything in -your preamble. +If you have [`winget`](https://docs.microsoft.com/en-us/windows/package-manager/winget) +(windows new, build in package manager) and just want to install everything without any +fuzz, use the following command: +```powershell +winget install "MiKTeX.MiKTeX" "StrawberryPerl.StrawberryPerl" "Git.Git" "Microsoft.VisualStudioCode" +code --install-extension "James-Yu.latex-workshop" +``` -## Using a proper subfolder structure +## Using the project as a template -The projects also provides a recommendation for a subfolder structure, to keep things organized. You can -[download the .zip-Archive](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/archive/master/latex-template-hsh-master.zip) -and unpack it or clone the repository via `git clone https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh.git`. -This has the downside of storing class files and other needed files in the _./src_ folder, which means it needs to be added to the path searched when -running your latex command ([see below](#adding-src-to-path)). <br> -The provided Makefile demonstrates how to run a successful build, you might want to check it out. +The projects also provides a recommendation for a subfolder structure to keep things +organized. If you don't want to use git and just want to get started in LaTeX, +[download the zip-Archive](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/archive/master/latex-template-hsh-master.zip) +and unpack it. -## Compiling +It is recommended you use git to take full advantage of its features (like having backups +and being able to easily see what changed from the last version) and also be able to +easily update should a newer version of this repo be released. First create a new, +**empty** project on the platform of your choice (for example here on +<https://lab.it.hs-hannover.de>), than you can use the following to set it up locally on +your system. -The Project comes with `latexmk` setting, so you should be able to instantly compile using it. +> **Note** replace `[Project]` with your projects name (for example "_Report_") and +> `[Project_URL]` with the git-url for the project you created on the online git +> platform ```shell -latexmk project.tex +# create project folder +mkdir [Project] +cd [Project] +# set up local git repo with template +git init -b [Project] +git lfs install +git remote add upstream https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh.git +git fetch upstream +git pull upstream master +git remote add origin [Project_URL] +git push --set-upstream origin [Project] +# optionally do some cleanup (linux syntax, adjust when needed) +rm CHANGELOG.md LICENSE +mv project.tex [Project].tex +echo "# [Project]" > README.md +git commit --all -m "initalise for [Project]" +git push ``` +> **Note** giving you Project name as the default branch name is optional, and you could +> keep the default name of `master`, but as the template also has a `master` branch it is +> less confusing if you choose a different name. -# Documentation - - -## The different classes - -This project provides a set of additional classes designed for use in the Hochschule Hannover, Germany. They extend the well-known [KOMA-Script -classes](https://ctan.org/pkg/koma-script) by adding styling and providing some additional commands. The provided classes are: +## I have now Idea how to start, show me -### `HsH-article` - -Based on the `scrartcl` this class is designed for quick and compact documents. It does not have chapters and therefore never breaks to a new page on -its own. This class is useful for writing lab-protocols and alike. - -### `HsH-report` -This is probably the most useful class. It is based on the `scrreprt` and can be used for a wide variety of documents, beginning with lab-reports and -ending at complete thesis. The line between article and report is somewhat blurry, so use as you see fit. +To get you started, there is a working example Project on the example branch that has +loads of tips. Check it out +[Online](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/tree/example) or +locally using `git checkout example`. -### `HsH-book` -// To-do +## Compiling -### `HsH-standalone` -A helper class based on the normal standalone class. It is designed only for creating images as separate documents to keep things organized and -compiler times low. It is useful for creating graphs, circuit diagrams or other kind of complex sub documents. - - -## Document Options - -The classes accept a number of new options, which are passed to the class via `\documentclass[options]{class}`. All unknown options are passed to the -underlying subclass and processed there. So you can use everything from the corresponding documentations. - -### Default Options -If you don't define something different, the classes set your project up to use the following options: -- `fontsize=11pt` the font size -- `a4paper` the paper size -- `ngerman` the document language -- `sans` the font type (Sans Serif) -- `margin=0.25cm` ONLY for `hsh-standalone`, adds an empty margin around all pages - -### List of all options -- `german`, `ngerman` These two options are aliases. They switch the document language to German, which affects autogenerated naming as well as the - formatting of numbers. This is implemented by using an internal if switch, called `\@german`, which is set to true. -- `english` This option is the opposite of the previous ones. It sets the document language to English by setting `\@german` to false. -- `f1` - `f5` To use the correct logo of a certain faculty, you can define your faculty with these options. If none of these are present, a generic - grey logo is chosen. <br> - The different logos correspond to different pages of the `HsH-Logo.pdf`, so you could change this file and therefore the used logo as long as you - keep the page numbering consistent with the original. -- `sans` This option sets the font family to Sans Serif. -- `roman` The opposite of `sans`, sets a roman/serif font. -- `todos` This enables the [`todonotes`](http://tug.ctan.org/macros/latex/contrib/todonotes/todonotes.pdf) package and allows you to use the `\todo{}` - command. It is set up in a way that removing this option allows you to still leave `\todos`'s in your code without breaking. NOTE: using this - options will create pages that are wider than A4-format, making them non-printable! - -All remaining options are passed along to the respective subclasses and processed there. This means, that you can use all the options described in -their respective documentations. - - -## Packages - -### Provided packages -These Packages are automatically included by the class file. These are either important for provided functions or so generally useful that they are -used in pretty much every project anyway. - -- `inputenc` for input encoding, all input files (.tex files, etc.) are expected to be UTF8 encoded -- `fontenc` for output encoding, set to T1, if you use non-Latin characters (like Cyrillic, etc.) you need to add that -- `lmodern` is a font -- `babel` for German typesetting -- `geometry` for pagelayout and margins -- `scrlayer-scrpage` KOMA package for headers and footers -- `scrhack` KOMA package for compatibility with listings -- `pgffor` allows for the use of for-loops (internal) -- `graphicx` for importing images -- `hyperref` for references and links -- `caption` to customize captions and make references point to the beginning of the floats -- `bookmark` for bookmarking -- `amsmath` for a lot of general purpose maths features -- `csquotes` makes quotations easier -- `ziffer` is only included when the German document option is provided, sets comma as decimal - -### Recommended packages -These packages are recommended, but not included automatically to save compile time when they are not needed. If you want to use one of them, include -it in your preamble. - -- `bibtex` a package for citation and source management. Keep in mind, that there are multiple backends and `biber` is configured, if you want to - continue using the old backend, type `\usepackage[backend=bibtex]{biblatex}` in your preamble. -- `subfigure` one of multiple packages, that allows you to put multiple images into a figure -- `siunitx` is an amazing tool for Units -- `csvsimple` allows you to import CSV files, which is handy if you want to display measurements -- `listings` allows you to include format code snippets -- `pgfplots` is a great maths engine, which can create amazing plots -- `tikz` is already included with pgfplots, but is also a nice standalone package -- `circuitikz` expands the previous packages with macros for circuit creation -- `standalone` is a package, that allows you to create simple images from sub-texfiles. This can save a lot of compile time, especially with tikz and - alike. - -There's more... - - -## Commands - -The classes provide a few commands of their own. Here are some explanations: - -### `\maketitle[align]` -This command is not new, but changed. It creates a title-page fitting for most use cases. You can change its alignment via the optional parameter by -using on of the three options `r`, `c` or `l` for right aligned, centred or left aligned. <br> -You can use the following macros to define the different information presented on the title-page: - -- `\author` as usual, this is where you put your name. But you can also input a comma-seperated list, if more than one person has written in this file. -- `\matrikelnr` a new macro for your matriculation number. This is optional, but will be put next to your name if present. You can input again a - comma-seperated list, if more than one author is present. -- `\titlehead` is for a small line left of the logo. This is usually the department or division. May be empty -- `\subject` is for a broad description of what your file is. "Laborbericht" for example. Can be empty. -- `\title` is quite obvious. The only one that must be present. I additionally accept an optional parameter which will be treated as a short form of - the title and used in the header (this makes sense if your title is very long and fills your header too much) -- `\subtitle` is a smaller second line under the title. Can be empty -- `\date` is the date of your project. You can use a custom one, but if you don't set it, the current date at compile time will be used. -- `\professor` a new macro do define your professors name, if needed. -- `\firstexaminer` a new macro do define your first examiners name, if needed. -- `\secondexaminer` a new macro do define your second examiners name, if needed. -- `\keywords` will not be printed on the title-page, but rather on the end of the abstract, if you define some. They will also be but into the PDFs - metadata. - -### `\declarationofauthorship[align]` -This macro will typeset a declaration of authorship, which is needed for most academic works. You can choose to have it on the bottom (`b`) or top (`t`) of the page, with bottom beeing the default. <br> -The macro is defined in German and English and will automatically match your document language. - -### `\abs` -A helpful macro for absolute values. It can be used in maths mode and will put vertical lines around its content, that match the height of the -content. <br> -This macro is only provided, meaning if another package defines it, its definition will be used. - -### HsH-Logo macros -These are more of a by-product, but they are defined, so you could use them: -- `\HsHlogoPath` the path to an image, that is used as the logo. Given a default value by the class. -- `\HsHlogoPage` the page of the previous file, which is used. This is changed with the `f1`-`f5` options. -- `\includeHsHlogohere[width]` this macro produces the logo using the previous macros. The width can optionally be provided. +The Project comes with setting for `latexmk`, so you should be able to instantly compile +using it. +```shell +latexmk +``` +> **Note** If you use the recommended folder-structure, it stores the class files and +> other needed files in the _./src_ folder. If you use `latexmk` this is already +> configured correctly, but might be relevant if you choose a different build system +> ([see below](#adding-src-to-path)). # Common additions and expansions (Snippets) -Sadly most Profs have widely different expectations when it comes to styling of written works. So you might find yourself having to change some -settings. For some cases this has already been done and, to help others, uploaded in -[the snippets section](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets) of the project. Most of them are only visible when you -are logged in!! <br> -Also, if you create your own set of additions that are useful for other, feel free to contact me and I will give you access right, so you can upload -it there. - +Sadly most Profs have widely different expectations when it comes to styling of written +works. So you might find yourself having to change some settings. For some cases this +has already been done and, to help others, uploaded in +[the snippets' section](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets) +of the project. +Also, if you create your own set of additions that are useful for other, feel free to +contact me and I will give you access right, so you can upload it there. # Frequently Asked Questions -## What is the `config.tex`? +### How can I create my own title page -These file is an easy way to configure your project in a single central location, so it can be used over multiple documents in the same project as -well as allowing easy reuse of configs for other projects. +If you don't like the title page, feel free to create your own. You can simply redefine +the `\maketitle` command to you liking. -The provided classes automatically check for this file and use it, if it is present. But they are completely optional, so you can just ditch them if -you want to. Keep in mind that the `config.tex` will be included right before the `\begin{document}`, so it overrides all settings you may have put -in your preamble. +Before you go to town, check out what others already published in +[the snippets section](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets). +This will be a good starting point or maybe even already be what you want. -The `config.tex` is intended for configurations. For example new- or redefinitions of commands should be put here. Also, packages-specific configs are -loaded here. The `\@ifpackageloaded{pakagename}{true}{false}` macro allows to check for the existence of a package, so that you can reuse config files, -even if you don't use all the same packages. +### Italic vs. upright Index? (changing subscript) -## Adding _./src_ to path +The classes by default set all sub scripts upright ("steil" in German), because this is +required in Germany in most cases. You can deactivate this permanently with +`\normalsubscripts` and reactivate it with `\upsubscripts`. -You need to do this if you get errors like this: +If you want to change it for a single use, you can use the original Tex Macro `\sb{}` +instead of the `_` to get the original behaviour. -> ! LaTeX Error: File `HsH-report.cls' not found. +> **Warning** DO NOT use `_\math..{}`! This would be a nested font change and lead to +> unexpected results. `\sb{\math..{}}` is possible. -Usually the `latexmkrc` files handles setting this up, but if you have problems or just want more controll, -[here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/121) are more details. +### Adding _./src_ to path -## Using an _.aux_ directory +You need to do this if you get errors like this: -It is very useful to define subdirectory for all the files produced during a latex run. This is also set up via the `latexmkrc` file. +> ! LaTeX Error: File \`HsH-report.cls' not found. + +Usually the `latexmkrc` files handles setting this up, but if you have problems or just +want more control, +[here](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets/121) are +more details. ## LaTeX errors -> You have requested document class \`src/HsH-report', but the document class provides \`HsH-report'. +> You have requested document class \`src/HsH-report', but the document class provides +> \`HsH-report'. -This happens when you tried to use something like `\documentclass{src/HsH-report}`, which was a good idea, but doesn't quite work. You need to properly -add the `src` directory to the path searched by LaTeX (as explained [here](#adding-src-to-path)). You can than simply use `\documentclass{HsH-report}`. +This happens when you tried to use something like `\documentclass{src/HsH-report}`, +which was a good idea, but doesn't quite work. You need to properly add the `src` +directory to the path searched by LaTeX (as explained [here](#adding-src-to-path)). You +can than simply use `\documentclass{HsH-report}`. ## BibTeX errors > Sorry, but BibTeX did not succeed -You are probably using `bibtex` as your backend, but `biber` the standard configuration. You can change it, see -[here for most editors](https://texwelt.de/fragen/1909/wie-verwende-ich-biber-in-meinem-editor) and [here for VS Code](https://tex.stackexchange.com/questions/459640/implementing-biber-for-biblatex-in-microsoft-visual-studio-code/459933#459933) +You are probably using `bibtex` as your backend, but `biber` the standard configuration. +You can change it, see +[here for most editors](https://texwelt.de/fragen/1909/wie-verwende-ich-biber-in-meinem-editor) +and +[here for VS Code](https://tex.stackexchange.com/questions/459640/implementing-biber-for-biblatex-in-microsoft-visual-studio-code/459933#459933) or use `\usepackage[backend=bibtex]{biblatex}` in your preamble to keep using BibTeX. - -## Italic vs. upright Index? (changing subscript) - -The classes by default set all sub scripts upright ("steil" in German), because this is required in Germany in most cases. <br> -You can deactivate this permanently with `\normalsubscripts` and reactivate it with `\upsubscripts`. <br> -If you want to change it for a single use, you can use the original Tex Macro `\sb{}` instead of the `_` to get the original behaviour. <br> -DO NOT use `_\math..{}`! This would be a nested font change and lead to unexpected results. `\sb{\math..{}}` is possible. diff --git a/bib/classes.pdf b/bib/classes.pdf new file mode 100644 index 0000000000000000000000000000000000000000..597e07022462f44ba37aa5a38c97905ad51d9de1 --- /dev/null +++ b/bib/classes.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c85aefa97b0220072e48f1216c98e117b2840e0b4896ebaf1917b9db2bac732 +size 560998 diff --git a/bib/clsguide-historic.pdf b/bib/clsguide-historic.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9b9335c7655c9bf59fc649d796bec7da36515455 --- /dev/null +++ b/bib/clsguide-historic.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4d3a5f770de9cc45509e84d80d446a5c58e7b779f483967dce4492eb0013aca +size 415615 diff --git a/bib/clsguide.pdf b/bib/clsguide.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a2a8893f5bc88ec9a13af667d646c52a1c2894d9 --- /dev/null +++ b/bib/clsguide.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5270947bfb926a44fbe86b2a85434b9c4763f8146858c9aebc29f7f76981d2e3 +size 489925 diff --git a/bib/doc.pdf b/bib/doc.pdf new file mode 100644 index 0000000000000000000000000000000000000000..586b0503cee8dab4b6b34488f74872b88a8ddf62 --- /dev/null +++ b/bib/doc.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:358bc4159fb5046be3ad28524340784bef543c65dc4e738d357de9b0bbed52bb +size 756298 diff --git a/bib/docstrip.pdf b/bib/docstrip.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9121cc88caf93798aaff05886a61ce2a1d4c908e --- /dev/null +++ b/bib/docstrip.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ef8a1a17b5e707530b006ff279d6a874b43b8697123ee273df69bc509c7e178 +size 506630 diff --git a/bib/localBibliography.bib b/bib/localBibliography.bib deleted file mode 100644 index ab049d9ba539f90adae746faf5286fdbe2bee262..0000000000000000000000000000000000000000 --- a/bib/localBibliography.bib +++ /dev/null @@ -1,116 +0,0 @@ -@book{westermann:tabellenbuch, - author = {Dr. Michael Dzieia and Heinrich Hübscher and Dieter Jagla and Jürgen Klaue and Hans-Joachim Petersen and Harald Wickert}, - title = {Elektronik Tabellen: Betriebs- und Automatiesierungstechnik}, - year = {2016}, - edition = {2}, - publisher = {Westermann}, - isbn = {9-783142-450353}, - language = {GER}, -} -@manual{laboranleitung:physik, - author = {Fachschaft Physik}, - editor = {}, - title = {Laboranleitung für das Physiklabor}, - date = {2020-03-01}, - url = {https://docs.f1.Hs-Hannover.de/dl_fachgebiete/labore.php?id_fachgebiet=4}, - urldate = {2020-03-23}, - language = {GER} -} -@manual{laboranleitung:elektrotechnik, - author = {Fachschaft Grundlagen Elektrotechnik}, - title = {Laboranleitung für das Labor Elektrotechnische Grundlagen}, - date = {2016-06-07}, - url = {https://docs.f1.hs-hannover.de/dl_fachgebiete/labore.php?id_fachgebiet=3}, - urldate = {2020-03-30}, - language = {GER} -} -@manual{laboranleitung:messtechnik1, - author = {Prof. Dr.-Ing. S. Beißner and Prof. Dr.-Ing. M. Koch and Prof. Dr.-Ing. M. Kesting and - Prof. Dr.-Ing. M. Lassahn and Prof. Dr.-Ing. D. Hisseine and M.Sc. Brech and - M.Eng. Schwarze and Prof. Dr.-Ing. D. Stolle}, - title = {Laboranleitung für das Labor Grundlagen Messtechnik}, - date = {2019-08-12}, - url = {https://moodle.hs-hannover.de/pluginfile.php/359636/course/section/183463/LGM-Laboranleitung_EIT_20190812.pdf}, - urldate = {2019-08-11}, - language = {GER} -} -%-----------------------Templates-------------------------------------------------------- -% A single-volume book with one or more authors -@book{1, - author = {}, - title = {}, - date = {}, - year = {}, - edition = {}, - publisher = {}, - isbn = {}, - language = {}, - location = {}, - series = {}, - abstract = {}, - pagetotal = {}, - url = {}, - urldate = {} -} -% article in a journal, magazine, newspaper, or other periodical -@article{2, - author = {}, - title = {}, - journaltitle= {}, - date = {}, - year = {}, - journalsubtitle= {}, - issuetitle = {}, - series = {}, - language = {}, - origlanguage= {}, - translator = {}, - pages = {}, - url = {}, - urldate = {} -} -% technical report/paper, published by a university -@report{3, - author = {}, - title = {}, - type = {}, - institution = {}, - date = {}, - year = {}, - url = {}, - urldate = {}, - version = {}, - language = {} -} -% Technical or other documentation, not necessarily in printed form -@manual{4, - author = {}, - editor = {}, - title = {}, - date = {}, - year = {}, - url = {}, - urldate = {}, - language = {} -} -% web sites which are intrinsically online resources -@online{5, - author = {}, - title = {}, - date = {}, - year = {}, - url = {}, - urldate = {}, - language = {} -} -% a Thesis -@phdthesis{6, - author = {}, - title = {}, - school = {}, - date = {}, - year = {}, - address = {}, - month = {}, - note = {}, -} \ No newline at end of file diff --git a/bib/ltxdoc.pdf b/bib/ltxdoc.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4d8f46c7fa9278927f18adabd2273b7ac4a32f0d --- /dev/null +++ b/bib/ltxdoc.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad944fcc8d9dc2d2fe13430c7caefaf98076bcb4e147bac2143d1861a1a47892 +size 244215 diff --git a/bib/project_bibliography.bib b/bib/project_bibliography.bib new file mode 100644 index 0000000000000000000000000000000000000000..734443a99d69057f8651c90d6de9d0d3f1bd88f7 --- /dev/null +++ b/bib/project_bibliography.bib @@ -0,0 +1,207 @@ +@book{westermann:tabellenbuch, + author = {Dr. Michael Dzieia and Heinrich Hübscher and Dieter Jagla and Jürgen Klaue and Hans-Joachim Petersen and Harald Wickert}, + title = {Elektronik Tabellen: Betriebs- und Automatiesierungstechnik}, + year = {2016}, + edition = {2}, + publisher = {Westermann}, + isbn = {9-783142-450353}, + language = {GER} +} +@manual{laboranleitung:physik, + author = {Fachschaft Physik}, + editor = {}, + title = {Laboranleitung für das Physiklabor}, + date = {2020-03-01}, + url = {https://docs.f1.Hs-Hannover.de/dl_fachgebiete/labore.php?id_fachgebiet=4}, + urldate = {2020-03-23}, + language = {GER} +} +@manual{laboranleitung:elektrotechnik, + author = {Fachschaft Grundlagen Elektrotechnik}, + title = {Laboranleitung für das Labor Elektrotechnische Grundlagen}, + date = {2016-06-07}, + url = {https://docs.f1.hs-hannover.de/dl_fachgebiete/labore.php?id_fachgebiet=3}, + urldate = {2020-03-30}, + language = {GER} +} +@manual{laboranleitung:messtechnik1, + author = {Prof. Dr.-Ing. S. Beißner and Prof. Dr.-Ing. M. Koch and Prof. Dr.-Ing. M. Kesting and + Prof. Dr.-Ing. M. Lassahn and Prof. Dr.-Ing. D. Hisseine and M.Sc. Brech and + M.Eng. Schwarze and Prof. Dr.-Ing. D. Stolle}, + title = {Laboranleitung für das Labor Grundlagen Messtechnik}, + date = {2019-08-12}, + url = {https://moodle.hs-hannover.de/pluginfile.php/359636/course/section/183463/LGM-Laboranleitung_EIT_20190812.pdf}, + urldate = {2019-08-11}, + language = {GER} +} +%-----------------------Templates-------------------------------------------------------- +% A single-volume book with one or more authors +% required fields: { author, title, year/date } +@book{z_book-key, + author = {}, + title = {}, + date = {}, + year = {}, + doi = {}, + isbn = {}, + url = {}, + urldate = {}, + language = {}, + origlanguage = {}, + editor = {}, + editora = {}, + editorb = {}, + editorc = {}, + translator = {}, + annotator = {}, + commentator = {}, + introduction = {}, + foreword = {}, + afterword = {}, + subtitle = {}, + titleaddon = {}, + maintitle = {}, + mainsubtitle = {}, + maintitleaddon = {}, + volume = {}, + part = {}, + edition = {}, + volumes = {}, + series = {}, + number = {}, + note = {}, + publisher = {}, + location = {}, + pages = {}, + pagetotal = {}, + addendum = {}, + pubstate = {} +} +% article in a journal, magazine, newspaper, or other periodical +% required fields: { author, title, year/date } +@article{z_article-key, + author = {}, + title = {}, + date = {}, + year = {}, + doi = {}, + issn = {}, + url = {}, + urldate = {}, + language = {}, + origlanguage = {}, + translator = {}, + annotator = {}, + commentator = {}, + subtitle = {}, + titleaddon = {}, + editor = {}, + editora = {}, + editorb = {}, + editorc = {}, + journalsubtitle = {}, + journaltitleaddon = {}, + issuetitle = {}, + issuesubtitle = {}, + issuetitleaddon = {}, + series = {}, + volume = {}, + number = {}, + issue = {}, + month = {}, + pages = {}, + version = {}, + note = {}, + addendum = {}, + pubstate = {} +} +% technical or other documentation, not necessarily in printed form +% required fields: { author/editor, title, year/date } +@manual{z_manual-key, + author = {}, + editor = {}, + title = {}, + year = {}, + date = {}, + doi = {}, + isbn = {}, + url = {}, + urldate = {}, + language = {}, + subtitle = {}, + titleaddon = {}, + edition = {}, + type = {}, + number = {}, + version = {}, + note = {}, + organization = {}, + publisher = {}, + pagetotal = {}, + addendum = {}, + pubstate = {} +} +% article in a conference proceedings +% required fields: { author, title, booktitle, year/date } +@inproceedings{z_inproceedings-key, + author = {}, + title = {}, + booktitle = {}, + year = {}, + date = {}, + editor = {}, + subtitle = {}, + titleaddon = {}, + eventtitle = {}, + eventtitleaddon = {}, + eventdate = {}, + series = {}, + number = {}, + organization = {}, + publisher = {}, + location = {}, + isbn = {}, + doi = {}, + pages = {}, + addendum = {}, + pubstate = {}, + url = {}, + urldate = {}, + language = {} +} +% technical report/paper, published by a university +% required fields: { author, title, type, institution, year/date } +@report{z_report-key, + author = {}, + title = {}, + version = {}, + type = {}, + institution = {}, + date = {}, + year = {}, + url = {}, + urldate = {}, + language = {} +} +% a Thesis +@phdthesis{z_phdthesis-key, + author = {}, + title = {}, + school = {}, + date = {}, + year = {}, + address = {}, + month = {}, + note = {} +} +% web sites which are intrinsically online resources +% required fields: { author/editor, title, year/date, doi/eprint/url } +@online{z_online-key, + author = {}, + title = {}, + date = {}, + year = {}, + url = {}, + urldate = {}, + language = {} +} diff --git a/crc/exampleCircuit.pdf b/crc/exampleCircuit.pdf deleted file mode 100644 index d2074d804712b8f2a68079bb4f3629891493e12c..0000000000000000000000000000000000000000 Binary files a/crc/exampleCircuit.pdf and /dev/null differ diff --git a/data/code/README.md b/data/code/README.md new file mode 100644 index 0000000000000000000000000000000000000000..efeedc3eba6470de5cc641676844e0dbf0057011 --- /dev/null +++ b/data/code/README.md @@ -0,0 +1,6 @@ +# Source-code folder + +This folder is for source-code you want to use in your document. +Maybe you just want it here to be able to easily open and reference it, +but you can also include and print it into your document (with syntax-highlighting). +Use the `lstings` package for that. diff --git a/data/code/main.c b/data/code/main.c new file mode 100644 index 0000000000000000000000000000000000000000..61e6c57a3313fe0bb253df3f9f77dad08b55dcea --- /dev/null +++ b/data/code/main.c @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main(int argc, char* argv[]){ + printf("This is %s\n", argv[0]); + return 0; +} diff --git a/csv/README.md b/data/csv/README.md similarity index 100% rename from csv/README.md rename to data/csv/README.md diff --git a/csv/bsp.csv b/data/csv/bsp.csv similarity index 100% rename from csv/bsp.csv rename to data/csv/bsp.csv diff --git a/crc/README.md b/img/crc/README.md similarity index 100% rename from crc/README.md rename to img/crc/README.md diff --git a/img/crc/exampleCircuit.pdf b/img/crc/exampleCircuit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8b7a8c2a6c76d2933f35d12f6787f442a43b3b4d --- /dev/null +++ b/img/crc/exampleCircuit.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f769c7bf755f0f31c0a89821196d5aaa25eaaa72194f425814569e8ffa46f076 +size 32760 diff --git a/crc/exampleCircuit.tex b/img/crc/exampleCircuit.tex similarity index 100% rename from crc/exampleCircuit.tex rename to img/crc/exampleCircuit.tex diff --git a/img/lorem-ipsum.jpg b/img/lorem-ipsum.jpg deleted file mode 100644 index 04a14b8c7a35b4550a3fb737ca8eb9175ede8496..0000000000000000000000000000000000000000 Binary files a/img/lorem-ipsum.jpg and /dev/null differ diff --git a/plt/README.md b/img/plt/README.md similarity index 100% rename from plt/README.md rename to img/plt/README.md diff --git a/img/plt/examplePlot.pdf b/img/plt/examplePlot.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8f1e0cc8cc2da00feb39f9ede03a8e240ee4a7f7 --- /dev/null +++ b/img/plt/examplePlot.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbde18c1d0c6fc633c520600fe7234d9f4d200a28dc705f24cf87c98db3ab02a +size 106296 diff --git a/plt/examplePlot.tex b/img/plt/examplePlot.tex similarity index 100% rename from plt/examplePlot.tex rename to img/plt/examplePlot.tex diff --git a/svg/README.md b/img/svg/README.md similarity index 100% rename from svg/README.md rename to img/svg/README.md diff --git a/img/svg/exampleSVG.pdf b/img/svg/exampleSVG.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4e5190448995fb46362d66f4c00e7fe86870dbf5 --- /dev/null +++ b/img/svg/exampleSVG.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff16d9a7b9c4eec0e2b44d45f688f8bcfc6dd23b83db3f477efdf568b258de47 +size 1283 diff --git a/svg/exampleSVG.pdf_tex b/img/svg/exampleSVG.pdf_tex similarity index 100% rename from svg/exampleSVG.pdf_tex rename to img/svg/exampleSVG.pdf_tex diff --git a/svg/exampleSVG.svg b/img/svg/exampleSVG.svg similarity index 100% rename from svg/exampleSVG.svg rename to img/svg/exampleSVG.svg diff --git a/plt/examplePlot.pdf b/plt/examplePlot.pdf deleted file mode 100644 index 86d02bc8647d984e36a3c96fee2e3e3af715a0db..0000000000000000000000000000000000000000 Binary files a/plt/examplePlot.pdf and /dev/null differ diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ae5f986cc4c6cb57960442f5f6c976294a2879b5 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,19 @@ +HsH-classes.ins + +*.synctex.gz +*.synctex(busy) +*.log + +*.aux +*.toc +*.lof +*.lot +*.fls +*.idx +*.ind +*.glo +*.gls +*.ilg +*.hd +*.fdb_latexmk +*.out diff --git a/src/.latexmkrc b/src/.latexmkrc new file mode 100644 index 0000000000000000000000000000000000000000..827c617048f919b6f7be347f71d7867d8ea1cede --- /dev/null +++ b/src/.latexmkrc @@ -0,0 +1,18 @@ +@default_files = ('HsH-classes.dtx'); + +# generall settings: +$pdf_mode = 1; # use pdflatex + +push @generated_exts, 'hd'; +push @final_output_exts, 'ins', 'cfg'; + + +$makeindex = 'makeindex -s gind.ist %S'; +add_cus_dep( 'glo', 'gls', 0, 'makeglo2gls' ); +push @generated_exts, 'glo', 'gls'; +sub makeglo2gls { + my ($base_name, $path) = fileparse( $_[0] ); + pushd( $path ); + system "makeindex", "-s", "gglo.ist", "-o", "$base_name.gls", "$base_name.glo" ; + popd(); +} diff --git a/src/HSH-Logo.svg b/src/HSH-Logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..38d3eca20dd3c4f906120206c19219f44a2189e6 --- /dev/null +++ b/src/HSH-Logo.svg @@ -0,0 +1,417 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="51mm" + height="36mm" + viewBox="0 0 51 36" + version="1.1" + id="svg5" + xml:space="preserve" + inkscape:version="1.3 (0e150ed6c4, 2023-07-21)" + sodipodi:docname="HSH-Logo.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> <style + id="style1"> @font-face { font-family: UnitBoldItalic; src: url("https://f1.hs-hannover.de/typo3conf/ext/ui_sitepackage/Resources/Public/assets/fonts/UnitSlabWebPro-BoldIta W01 Rg.998512d.ttf") format("truetype"); } @font-face { font-family: UnitSlabLight; src: url("/typo3conf/ext/ui_sitepackage/Resources/Public/assets/fonts/UnitSlabWebW06-Light.04f9544.ttf") format("truetype"); } </style> <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:document-units="mm" + showgrid="false" + inkscape:zoom="1.1893044" + inkscape:cx="105.10345" + inkscape:cy="458.67148" + inkscape:window-width="2560" + inkscape:window-height="1377" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg5"><inkscape:page + x="0" + y="0" + width="51" + height="36" + id="page26" + margin="0" + bleed="0" /><inkscape:page + x="5.9604645e-08" + y="41.811733" + width="51" + height="36" + id="page70" + margin="0" + bleed="0" /><inkscape:page + x="1.1920922e-08" + y="83.623466" + width="51" + height="36" + id="page71" + margin="0" + bleed="0" /><inkscape:page + x="1.1920922e-08" + y="125.4352" + width="51" + height="36" + id="page72" + margin="0" + bleed="0" /><inkscape:page + x="1.1920922e-08" + y="167.24693" + width="51" + height="36" + id="page73" + margin="0" + bleed="0" /><inkscape:page + x="1.1920922e-08" + y="209.05867" + width="51" + height="36" + id="page74" + margin="0" + bleed="0" /></sodipodi:namedview><defs + id="defs2"> </defs><g + inkscape:label="Ebene 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-219.50001,0.5)" /><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-size:3.175px;font-family:Constantia;-inkscape-font-specification:Constantia-Italic;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text1095" + x="31.66675" + y="30.666668"><tspan + sodipodi:role="line" + id="tspan1093" + x="31.66675" + y="30.666668" + style="stroke-width:0.352778" /></text><path + id="path1061" + style="fill:#575250;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="M 1.508724,0.53445637 C 0.9643884,0.53445637 0.5,0.99864637 0.5,1.5514486 V 26.448636 c 0,0.544336 0.4643884,1.019577 1.008724,1.019577 h 1.95802 c 0.5443355,0 1.0092408,-0.465716 1.0092408,-1.019577 V 15.400732 h 9.4366322 v 11.047904 c 0,0.544336 0.464388,1.019577 1.008724,1.019577 h 1.95802 c 0.544336,0 1.008724,-0.465716 1.008724,-1.019577 V 1.5514486 c 0,-0.5443356 -0.464388,-1.01699223 -1.008724,-1.01699223 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.01699223 V 11.63197 H 4.4759848 V 1.5514486 c 0,-0.55280223 -0.4649053,-1.01699223 -1.0092408,-1.01699223 z m 0,30.95469963 C 0.9643884,31.500096 0.5,31.974215 0.5,32.51855 v 1.987476 c 0,0.555271 0.4643884,1.027844 1.008724,1.027844 h 15.380455 c 0.544336,0 1.008208,-0.472573 1.008208,-1.027844 V 32.51855 c 0,-0.555272 -0.463872,-1.029394 -1.008208,-1.029394 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text1069" + x="20.214525" + y="2.7728314"><tspan + x="20.214525" + y="2.7728314" + sodipodi:role="line" + id="tspan1065" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="6.9744053" + sodipodi:role="line" + id="tspan1067" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="11.175979" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan6">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="15.377553" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan10">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="19.579126" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan11">AND ARTS</tspan></text><path + id="path15" + style="fill:#31c3ed;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="m 1.5087241,42.311734 c -0.54433564,0 -1.00872404,0.46419 -1.00872404,1.016992 v 24.897188 c 0,0.544336 0.4643884,1.019577 1.00872404,1.019577 h 1.95802 c 0.5443355,0 1.0092408,-0.465716 1.0092408,-1.019577 V 57.17801 h 9.4366321 v 11.047904 c 0,0.544336 0.464388,1.019577 1.008724,1.019577 h 1.95802 c 0.544336,0 1.008724,-0.465716 1.008724,-1.019577 V 43.328726 c 0,-0.544335 -0.464388,-1.016992 -1.008724,-1.016992 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.016992 V 53.409248 H 4.4759849 V 43.328726 c 0,-0.552802 -0.4649053,-1.016992 -1.0092408,-1.016992 z m 0,30.9547 c -0.54433564,0.01094 -1.00872404,0.485059 -1.00872404,1.029394 v 1.987476 c 0,0.555271 0.4643884,1.027844 1.00872404,1.027844 H 16.889179 c 0.544336,0 1.008208,-0.472573 1.008208,-1.027844 v -1.987476 c 0,-0.555272 -0.463872,-1.029394 -1.008208,-1.029394 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text19" + x="20.214525" + y="44.55011"><tspan + x="20.214525" + y="44.55011" + sodipodi:role="line" + id="tspan15" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="48.751682" + sodipodi:role="line" + id="tspan16" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="52.953259" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan17">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="57.154831" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan18">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="61.356403" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan19">AND ARTS</tspan></text><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + x="20.151026" + y="68.564369" + id="text25"><tspan + sodipodi:role="line" + id="tspan21" + x="20.151026" + y="68.564369" + style="stroke-width:0.352778"><tspan + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + id="tspan20">Fakultät I</tspan></tspan><tspan + sodipodi:role="line" + id="tspan23" + x="20.151026" + y="72.533119" + style="stroke-width:0.352778"><tspan + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + id="tspan22">Elektro- und </tspan></tspan><tspan + sodipodi:role="line" + x="20.151026" + y="76.501869" + id="tspan25" + style="stroke-width:0.352778"><tspan + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + id="tspan24">Informationstechnikt</tspan></tspan></text><path + style="font-size:9px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + d="m 20.392324,63.742777 h 0.568325 v 0.1905 h -0.568325 z" + id="path25" + aria-label="-" /><path + id="path27" + style="fill:#a6d200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="m 1.508724,84.123466 c -0.54433559,0 -1.00872399,0.46419 -1.00872399,1.016992 v 24.897192 c 0,0.54433 0.4643884,1.01957 1.00872399,1.01957 h 1.95802 c 0.5443355,0 1.0092408,-0.46571 1.0092408,-1.01957 V 98.989742 h 9.4366322 v 11.047908 c 0,0.54433 0.464388,1.01957 1.008724,1.01957 h 1.95802 c 0.544336,0 1.008724,-0.46571 1.008724,-1.01957 V 85.140458 c 0,-0.544335 -0.464388,-1.016992 -1.008724,-1.016992 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.016992 V 95.22098 H 4.4759848 V 85.140458 c 0,-0.552802 -0.4649053,-1.016992 -1.0092408,-1.016992 z m 0,30.954704 c -0.54433559,0.0109 -1.00872399,0.48505 -1.00872399,1.02939 v 1.98748 c 0,0.55527 0.4643884,1.02784 1.00872399,1.02784 h 15.380455 c 0.544336,0 1.008208,-0.47257 1.008208,-1.02784 v -1.98748 c 0,-0.55527 -0.463872,-1.02939 -1.008208,-1.02939 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text31" + x="20.214525" + y="86.361839"><tspan + x="20.214525" + y="86.361839" + sodipodi:role="line" + id="tspan27" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="90.563416" + sodipodi:role="line" + id="tspan28" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="94.764992" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan29">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="98.96656" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan30">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="103.16814" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan31">AND ARTS</tspan></text><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + x="20.151026" + y="110.37611" + id="text37"><tspan + sodipodi:role="line" + id="tspan33" + x="20.151026" + y="110.37611" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778">Fakultät II</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="114.34486" + id="tspan37" + style="stroke-width:0.352778">Maschinenbau und</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="118.31361" + style="stroke-width:0.352778" + id="tspan74">Bioverfahrenstechnik</tspan></text><path + style="font-size:9px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + d="m 20.392324,105.55451 h 0.568325 v 0.1905 h -0.568325 z" + id="path37" + aria-label="-" /><path + id="path38" + style="fill:#ffac14;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="m 1.508724,125.9352 c -0.54433559,0 -1.00872399,0.46419 -1.00872399,1.01699 v 24.89719 c 0,0.54434 0.4643884,1.01958 1.00872399,1.01958 h 1.95802 c 0.5443355,0 1.0092408,-0.46572 1.0092408,-1.01958 v -11.0479 h 9.4366322 v 11.0479 c 0,0.54434 0.464388,1.01958 1.008724,1.01958 h 1.95802 c 0.544336,0 1.008724,-0.46572 1.008724,-1.01958 v -24.89719 c 0,-0.54433 -0.464388,-1.01699 -1.008724,-1.01699 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.01699 v 10.08052 H 4.4759848 v -10.08052 c 0,-0.5528 -0.4649053,-1.01699 -1.0092408,-1.01699 z m 0,30.9547 c -0.54433559,0.0109 -1.00872399,0.48506 -1.00872399,1.02939 v 1.98748 c 0,0.55527 0.4643884,1.02784 1.00872399,1.02784 h 15.380455 c 0.544336,0 1.008208,-0.47257 1.008208,-1.02784 v -1.98748 c 0,-0.55527 -0.463872,-1.02939 -1.008208,-1.02939 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text42" + x="20.214525" + y="128.17357"><tspan + x="20.214525" + y="128.17357" + sodipodi:role="line" + id="tspan38" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="132.37515" + sodipodi:role="line" + id="tspan39" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="136.57672" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan40">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="140.77829" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan41">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="144.97987" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan42">AND ARTS</tspan></text><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + x="20.151026" + y="152.18784" + id="text48"><tspan + sodipodi:role="line" + id="tspan44" + x="20.151026" + y="152.18784" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778">Fakultät III</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="156.15659" + id="tspan48" + style="stroke-width:0.352778">Medien, Information</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="160.12534" + style="stroke-width:0.352778" + id="tspan75">und Design</tspan></text><path + style="font-size:9px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + d="m 20.392324,147.36624 h 0.568325 v 0.1905 h -0.568325 z" + id="path48" + aria-label="-" /><path + id="path49" + style="fill:#f04105;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="m 1.508724,167.74693 c -0.54433559,0 -1.00872399,0.46419 -1.00872399,1.017 v 24.89718 c 0,0.54434 0.4643884,1.01958 1.00872399,1.01958 h 1.95802 c 0.5443355,0 1.0092408,-0.46572 1.0092408,-1.01958 v -11.0479 h 9.4366322 v 11.0479 c 0,0.54434 0.464388,1.01958 1.008724,1.01958 h 1.95802 c 0.544336,0 1.008724,-0.46572 1.008724,-1.01958 v -24.89718 c 0,-0.54434 -0.464388,-1.017 -1.008724,-1.017 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.017 v 10.08052 H 4.4759848 v -10.08052 c 0,-0.55281 -0.4649053,-1.017 -1.0092408,-1.017 z m 0,30.9547 c -0.54433559,0.0109 -1.00872399,0.48506 -1.00872399,1.0294 v 1.98747 c 0,0.55527 0.4643884,1.02785 1.00872399,1.02785 h 15.380455 c 0.544336,0 1.008208,-0.47258 1.008208,-1.02785 v -1.98747 c 0,-0.55527 -0.463872,-1.0294 -1.008208,-1.0294 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text53" + x="20.214525" + y="169.98531"><tspan + x="20.214525" + y="169.98531" + sodipodi:role="line" + id="tspan49" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="174.18687" + sodipodi:role="line" + id="tspan50" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="178.38846" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan51">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="182.59003" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan52">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="186.7916" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan53">AND ARTS</tspan></text><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + x="20.151026" + y="193.99957" + id="text59"><tspan + sodipodi:role="line" + id="tspan55" + x="20.151026" + y="193.99957" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778">Fakultät IV</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="197.96832" + id="tspan59" + style="stroke-width:0.352778">Wirtschaft und</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="201.93707" + style="stroke-width:0.352778" + id="tspan76">Informatik</tspan></text><path + style="font-size:9px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + d="m 20.392324,189.17798 h 0.568325 v 0.1905 h -0.568325 z" + id="path59" + aria-label="-" /><path + id="path60" + style="fill:#d64d9f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + d="m 1.508724,209.55866 c -0.54433559,0 -1.00872399,0.46419 -1.00872399,1.017 v 24.89718 c 0,0.54434 0.4643884,1.01958 1.00872399,1.01958 h 1.95802 c 0.5443355,0 1.0092408,-0.46572 1.0092408,-1.01958 v -11.0479 h 9.4366322 v 11.0479 c 0,0.54434 0.464388,1.01958 1.008724,1.01958 h 1.95802 c 0.544336,0 1.008724,-0.46572 1.008724,-1.01958 v -24.89718 c 0,-0.54434 -0.464388,-1.017 -1.008724,-1.017 h -1.95802 c -0.544336,0 -1.008724,0.46419 -1.008724,1.017 v 10.08052 H 4.4759848 v -10.08052 c 0,-0.55281 -0.4649053,-1.017 -1.0092408,-1.017 z m 0,30.9547 c -0.54433559,0.0109 -1.00872399,0.48506 -1.00872399,1.0294 v 1.98747 c 0,0.55527 0.4643884,1.02785 1.00872399,1.02785 h 15.380455 c 0.544336,0 1.008208,-0.47258 1.008208,-1.02785 v -1.98747 c 0,-0.55527 -0.463872,-1.0294 -1.008208,-1.0294 z" /><text + xml:space="preserve" + style="font-variant:normal;font-weight:bold;font-size:3.175px;font-family:Arial;-inkscape-font-specification:Arial-BoldMT;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.352778" + id="text64" + x="20.214525" + y="211.79704"><tspan + x="20.214525" + y="211.79704" + sodipodi:role="line" + id="tspan60" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HOCHSCHULE</tspan><tspan + x="20.214525" + y="215.99861" + sodipodi:role="line" + id="tspan61" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Medium;-inkscape-font-specification:Unit-Medium;stroke-width:0.352778">HANNOVER</tspan><tspan + x="20.214525" + y="220.2002" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan62">UNIVERSITY OF</tspan><tspan + x="20.214525" + y="224.40176" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan63">APPLIED SIENCE</tspan><tspan + x="20.214525" + y="228.60333" + sodipodi:role="line" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + id="tspan64">AND ARTS</tspan></text><text + xml:space="preserve" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778" + x="20.151026" + y="235.81131" + id="text70"><tspan + sodipodi:role="line" + id="tspan66" + x="20.151026" + y="235.81131" + style="font-style:italic;font-variant:normal;font-weight:300;font-stretch:normal;font-family:UnitSlab;-inkscape-font-specification:'UnitSlab Light Italic';stroke-width:0.352778">Fakultät V</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="239.78006" + id="tspan70" + style="stroke-width:0.352778">Diakonie, Gesundheit</tspan><tspan + sodipodi:role="line" + x="20.151026" + y="243.74881" + style="stroke-width:0.352778" + id="tspan77">und Soziales</tspan></text><path + style="font-size:9px;font-family:Unit-Light;-inkscape-font-specification:Unit-Light;stroke-width:0.352778" + d="m 20.392324,230.98971 h 0.568325 v 0.1905 h -0.568325 z" + id="path70" + aria-label="-" /></svg> diff --git a/src/HsH-Logo.pdf b/src/HsH-Logo.pdf index a6a3099c58805fb801c17d26656b25bde4646e13..12046a7555a518c276fea0fadeecaf45af8f2a18 100644 Binary files a/src/HsH-Logo.pdf and b/src/HsH-Logo.pdf differ diff --git a/src/HsH-article.cls b/src/HsH-article.cls index ad988e28667df08161660359cae830517ca61530..abb5657735105c1e84c28a3a2ab59a9895e55d50 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -5,165 +5,348 @@ %% The original source files were: %% %% HsH-classes.dtx (with options: `article') -%% -%% This is a generated file. -%% -%% Copyright (C) 2021 by Jan Wille <mail@janwille.de> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3 of this license -%% or (at your option) any later version. The latest version of this -%% license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3 or later is part of all distributions of LaTeX version -%% 2021/01/01 or later. -%% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} -\NeedsTeXFormat{LaTeX2e} -\newcommand{\myClassName}{HsH-article} -\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] - -%% commands for HsH-logo -\newcommand{\HsHlogoPath}{HSH-Logo.pdf} -\newcommand{\HsHlogoPage}{1} -\newcommand{\includeHsHlogohere}[1][5cm]{ - \IfFileExists{\HsHlogoPath}{}{ - \ClassError{\myClassName}{HsH-Logo.pdf not found!}{ - The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location - } - } - \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} +%% +%% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +\NeedsTeXFormat{LaTeX2e}[2022-06-01] +\ProvidesClass{HsH-article} + [2024-04-23 3.00 HsH-class based on KOMA] +\let\HsHClassName\@currname +\def\HsHClassName@ParrentClass{% + scrartcl% } -\newif\if@german% -\newif\if@todos\@todosfalse% - -%% document options ------------------------------------------------------------------------------- -\DeclareOption{german}{ - \@germantrue +\RequirePackage{scrbase} +\RequirePackage{setspace} +\DefineFamily{HsH} +\DefineFamilyMember{HsH} +\newcommand{\HsH@Options@PassToParrent}[1]{% + \ClassInfoNoLine{\HsHClassName}{passing option to parrent class: #1}% + \PassOptionsToClass{#1}{\HsHClassName@ParrentClass}% } -\DeclareOption{ngerman}{ - \@germantrue +\newcommand{\HsH@Options@DeclareAlias}[3][HsH]{% + \DeclareOption{#2}{\FamilyExecuteOptions{#1}{#3}}% } -\DeclareOption{english}{ - \@germanfalse +\DefineFamilyKey{HsH}{fontfamily}{ + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } -\DeclareOption{f1}{ - \renewcommand{\HsHlogoPage}{2} +\HsH@Options@DeclareAlias{sans}{fontfamily=sans} +\HsH@Options@DeclareAlias{roman}{fontfamily=roman} +\DefineFamilyKey{HsH}{linespacing}{ + \begingroup + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } -\DeclareOption{f2}{ - \renewcommand{\HsHlogoPage}{3} +\HsH@Options@DeclareAlias{singlespacing}{linespacing=single} +\HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} +\HsH@Options@DeclareAlias{doublespacing}{linespacing=double} +\DefineFamilyKey{HsH}{parskip}{% + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tempa}{% + {never+}{0},% + {never*}{1},% + }{#1} + \if@atdocument + \ClassError{\HsHClassName}{ + option `parskip' can only be configured in preamble! + } + \fi + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.3333\linewidth \@plus 1fil}} + \or% 1 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}} + \else% should never be + \endgroup + \fi + \else + \endgroup + \HsH@Options@PassToParrent{parskip=#1} + \FamilyKeyStateProcessed + \fi } -\DeclareOption{f3}{ - \renewcommand{\HsHlogoPage}{4} +\def\HsH@opt@headheight{} +\FamilyStringKey{HsH}{headheight}{\HsH@opt@headheight} +\AtEndOfClass{% + \headheight=\HsH@opt@headheight% } -\DeclareOption{f4}{ - \renewcommand{\HsHlogoPage}{5} +\DefineFamilyKey{HsH}{twoside}[semi]{% + \HsH@Options@PassToParrent{twoside=#1,BCOR=1cm} + \FamilyKeyStateProcessed } -\DeclareOption{f5}{ - \renewcommand{\HsHlogoPage}{6} +\def\HsH@opt@language{nil} +\FamilyStringKey{HsH}{language}{\HsH@opt@language} +\HsH@Options@DeclareAlias{english}{language=english} +\HsH@Options@DeclareAlias{german}{language=ngerman} +\HsH@Options@DeclareAlias{ngerman}{language=ngerman} +\def\HsH@opt@faculty{1} +\FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% + {none}{1}, {false}{1},% + {f1}{2}, {1}{2},% + {f2}{3}, {2}{3},% + {f3}{4}, {3}{4},% + {f4}{5}, {4}{5},% + {f5}{6}, {5}{6},% } -\DeclareOption{sans}{ - \renewcommand{\familydefault}{\sfdefault} +\HsH@Options@DeclareAlias{f1}{faculty=f1} +\HsH@Options@DeclareAlias{f2}{faculty=f2} +\HsH@Options@DeclareAlias{f3}{faculty=f3} +\HsH@Options@DeclareAlias{f4}{faculty=f4} +\HsH@Options@DeclareAlias{f5}{faculty=f5} +\FamilyBoolKey{HsH}{todos}{@todos} +\DefineFamilyKey{HsH}{@else@}{ + \HsH@Options@PassToParrent{#1} + \FamilyKeyStateProcessed } -\DeclareOption{roman}{ - \renewcommand{\familydefault}{\rmdefault} +\DeclareOption*{ + \HsH@Options@PassToParrent{\CurrentOption} } -\DeclareOption{todos}{ - \@todostrue +\FamilyExecuteOptions{HsH}{% + fontfamily=sans-serif, + fontsize=11pt, + language=ngerman, + parskip=never+, + linespacing=single, + headheight=2.15\baselineskip, + toc=listof, + toc=bibliography, + faculty=none, } -%% defere all other options to the base class -\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{scrartcl}} -\ExecuteOptions{fontsize=11pt,a4paper,ngerman,sans} % default options -\ProcessOptions\relax -%% Load KOMA class -\LoadClass{scrartcl} -\KOMAoption{toc}{bibliography,listof} - -%% package loading and config --------------------------------------------------------------------- -\PassOptionsToPackage{utf8}{inputenc} -\RequirePackage{inputenc} -\PassOptionsToPackage{T1}{fontenc} -\RequirePackage{fontenc} -\RequirePackage{lmodern} -\RequirePackage{graphicx} -\RequirePackage{amsmath} -\PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} -\if@todos - \setlength{\marginparwidth}{6cm} - \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry} -\else - \PassOptionsToPackage{nomarginpar}{geometry} -\fi -\RequirePackage{geometry} -\if@german - \PassOptionsToPackage{ngerman}{babel} -\else - \PassOptionsToPackage{english}{babel} -\fi -\RequirePackage{babel} +\FamilyProcessOptions{HsH}\relax +\LoadClass{\HsHClassName@ParrentClass} +\RequirePackage[T1]{fontenc} +\RequirePackage{type1ec} +\RequirePackage[main=\HsH@opt@language]{babel} +\RequirePackage[autostyle=true]{csquotes} +\MakeOuterQuote{"} \iflanguage{ngerman}{\RequirePackage{ziffer}}{}% -\PassOptionsToPackage{headsepline}{scrlayer-scrpage} -\RequirePackage{scrlayer-scrpage} -\RequirePackage{scrhack} -\PassOptionsToPackage{hidelinks}{hyperref} -\RequirePackage{hyperref} -\PassOptionsToPackage{hypcap=true}{caption} -\RequirePackage{caption} +\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' \RequirePackage{bookmark} -\PassOptionsToPackage{babel}{csquotes} -\iflanguage{ngerman}{\PassOptionsToPackage{german=quotes}{csquotes}}{}% -\RequirePackage{csquotes} -\MakeOuterQuote{"} +\AtBeginDocument{ + \hypersetup{ + pdfinfo={ + Title={\@title}, + Author={\@author}, + Subject={\@subject}, + Keywords={\@keywords} + } + } +} \if@todos - \PassOptionsToPackage{svgnames}{xcolor} \PassOptionsToPackage{ textsize=small, figwidth=.6\textwidth }{todonotes} \RequirePackage{todonotes} - \setlength{\marginparwidth}{5.2cm} \else - \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2][]{} - \newcommand{\missingfigure}[2][]{} + \newcommand{\listoftodos}[1]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} \fi -\RequirePackage{pgffor} -%% options for not loaded packages ---------------------------------------------------------------- -\PassOptionsToPackage{backend=biber,style=alphabetic,sorting=nyt}{biblatex} +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage[svgnames]{xcolor} +\RequirePackage{scrhack} +\PassOptionsToPackage{backend=biber}{biblatex} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{biblatex}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} + }{}% + \makeatother +} \PassOptionsToPackage{free-standing-units}{siunitx} \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} - -%% title matters ---------------------------------------------------------------------------------- -\newcommand*{\@shorttitle}{\@empty} +\AtBeginDocument{ + \makeatletter + \InputIfFileExists{HsH-classes.cfg}{ + \ClassInfo{\HsHClassName}{Local config file HsH-classes.cfg used.} + }{ + \ClassInfo{\HsHClassName}{No HsH-classes.cfg!! I hope you configered it yourself.} + } + \makeatother +} +\newcommand{\HsHlogoPath}{HSH-Logo.pdf} +\newcommand{\HsHlogoPage}{\HsH@opt@faculty} +\newcommand{\includeHsHlogohere}[1][5cm]{ + \IfFileExists{\HsHlogoPath}{ + \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} + }{ + \ClassError{\HsHClassName}{\HsHlogoPath\space not found!}{ + The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location + } + } +} +\let\@author\@empty \renewcommand{\title}[2][]{ \gdef\@title{#2} \gdef\@shorttitle{#1} } -\newcommand*{\@matrikelnr}{} +\def\@shorttitle{\@empty} \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} -\newcommand*{\@professor}{} +\def\@matrikelnr{\@empty} \newcommand{\professor}[1]{\gdef\@professor{#1}} -\newcommand*{\@firstexaminer}{} +\def\@professor{\@empty} \newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} -\newcommand*{\@secondexaminer}{} +\def\@firstexaminer{\@empty} \newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} -\newcommand*{\@keywords}{} +\def\@secondexaminer{\@empty} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} -\let\@author\@empty -\let\@keywords\@empty - -%% typesetting indexes upright or standart -\def\subinrm#1{\sb{\mathrm{#1}}} -{\catcode`\_=13 \global\let_=\subinrm} -\newcommand\upsubscripts{\catcode`\_=12 } -\newcommand\normalsubscripts{\catcode`\_=8 } +\def\@keywords{\@empty} +\RequirePackage{pgffor} +\newcommand{\declarationofauthorship}[1][b]{ + \if#1b + \vspace*{\fill} + \hrule + \else\if#1t + \vspace*{2em} + \else + \ClassError{\HsHClassName}{Wrong Parameter for `\declarationofauthorship'}{ + `\string\declarationofauthorship' only accepts `t' and `b' as parameters. + } + \fi\fi + \vskip 3em + {\centering\bfseries\usekomafont{section}{\decofauthname}\par} + \vskip 3em + \decofauthtext\par + \begingroup + \renewcommand{\thanks}{\sbox0} + \raggedleft + \foreach \tmp@ in \@author { + \if\tmp@\empty\else + \hskip 1em \parbox{4cm}{ + \vskip 4em + \hrule\vskip 4pt + \raggedleft\footnotesize\tmp@ + }% + \fi + }\par + \endgroup +} +\newif\ifsingleauthor +\AtBeginDocument{ + \begingroup + \newcount\count@ + \count@=\z@ + \@for\tmp@:=\@author\do{\advance\count@\@ne} + \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \endgroup +} +\newcommand{\decofauthname}{Declaration of Authorship} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} +\newcommand{\decofauthtext}{Language not supported!} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space + \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own + making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space + \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including + disciplinary actions that may result from it. Any use of the works of any other author, in any form, + is properly acknowledged at their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die + folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und + unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial + unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines + Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space + bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. +} +\def\declarationAuthorship{% + \ClassWarning{\HsHClassName}{% + Command \string\declarationAuthorship\space is deprecate.\MessageBreak + Replace it with \string\declarationofauthorship. + }% + \declarationofauthorship% +} +\newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} +\def\@subinrm#1{\sb{\mathrm{#1}}} +{\catcode`\_=13 \global\let_=\@subinrm} +\newcommand\upsubscripts{\catcode`\_=12} +\newcommand\normalsubscripts{\catcode`\_=8} +\RequirePackage{lmodern} +\areaset[current]{0.75\paperwidth}{0.8\paperheight} +\if@todos + \addtolength\paperwidth{5cm} + \addtolength\marginparwidth{5cm} +\fi +\renewcommand{\fps@figure}{h!t} +\renewcommand{\fps@table}{h!t} +\g@addto@macro\@floatboxreset\centering +\setcapwidth{0.8\textwidth} +\defcaptionname{english}\figurename{Fig.} +\defcaptionname{german,ngerman}\figurename{Abb.} +\defcaptionname{english}\tablename{Tab.} +\defcaptionname{german,ngerman}\tablename{Tab.} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{subfigure}{ + \let\subfigureautorefname\figureautorefname + }{}% + \makeatother +} +\renewcommand{\labelitemi}{\raisebox{.3ex}{\scalebox{0.7}{$\bullet$}}} +\renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} +\renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} +\renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} \upsubscripts - -%% header and footer -\clearpairofpagestyles -\ofoot*{\pagemark} +\raggedbottom +\let\layercontentsmeasure\relax +\RequirePackage{scrlayer-scrpage} +\FamilyOptions{KOMA}{headsepline,singlespacing=true} \newpagestyle{HsHheadings}{ { \parbox[b]{\sls@headwidth}{ @@ -194,119 +377,25 @@ {\hfill\pagemark} {\hfill\pagemark} } +\clearpairofpagestyles +\ofoot*{\pagemark} \pagestyle{HsHheadings} \automark{section} - -%% floats -\renewcommand{\fps@figure}{h!t} -\renewcommand{\fps@table}{h!t} -\ifx\KOMAScriptVersion\undefined\else - \g@addto@macro\@floatboxreset\centering - \setcapwidth{0.8\textwidth} -\fi -\iflanguage{english}{ - \renewcaptionname{english}{\figurename}{Fig.} - \renewcaptionname{english}{\tablename}{Tab.} -}{}% -\iflanguage{ngerman}{ - \renewcaptionname{ngerman}{\figurename}{Abb.} - \renewcaptionname{ngerman}{\tablename}{Tab.} - \renewcaptionname{ngerman}{\abstractname}{Abstract} -}{}% - -%% styling for itemize -\renewcommand{\labelitemi}{$\bullet$} -\renewcommand{\labelitemii}{$\circ$} -\renewcommand{\labelitemiii}{$-$} -\renewcommand{\labelitemiv}{$\cdot$} - -%% do stuff -\setlength\parindent{0pt} -\raggedbottom -\let\layercontentsmeasure\relax - -%% custom commands -\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} -\newcommand{\lowroman}[1]{\romannumeral#1\relax} - -%% load config at beginning of document -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{biblatex}{ - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{} - \@ifpackageloaded{subfigure}{ - \newcommand{\subfigureautorefname}{\figureautorefname} - }{} - \InputIfFileExists{config.tex}{ - \ClassInfo{\myClassName}{config.tex was found. Using it...} - }{ - \ClassInfo{\myClassName}{no config.tex!! I hope you configered it yourself.} - } - %% provide some usefull commands: - \providecommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} - \makeatother -} -%% declaration of Authorship ---------------------------------------------------------------------- -\iflanguage{english}{ - \setlocalecaption{english}{authorshipdeclaration}{Declaration of Authorship} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{authorshipdeclaration}{Selbstst\"andigkeitserkl\"arung} -}{}% -\newif\if@oneAuthor \@oneAuthortrue -\newcommand{\declarationofauthorship}[1][b]{ - \let\@param#1 - \renewcommand{\thanks}{\sbox0} - \foreach \x [count=\i] in \@author{\ifnum\i>1\global\@oneAuthorfalse\fi} - \thispagestyle{plain} - \if\@param b\vspace*{\fill}\fi - {\rule{\textwidth}{0.1pt}} - \vskip 3em - {\centering\huge\bfseries\authorshipdeclarationname\par} - \vskip 3em - \iflanguage{english}{ - \if@oneAuthor I\else We\fi\space hereby certify that the work \if@oneAuthor I\else we\fi\space \if@oneAuthor am\else are\fi\space submitting - is entirely of \if@oneAuthor my\else our\fi own making except where otherwise indicated. \if@oneAuthor I\else We\fi\space - \if@oneAuthor am\else are\fi\space aware of regulations concerning plagiarism, including disciplinary actions that may result from it. Any use - of the works of any other author, in any form, is properly acknowledged at their point of use. \par - }{}% - \iflanguage{ngerman}{ - Hiermit best{\"a}tige\if@oneAuthor\else n\fi\space \if@oneAuthor ich\else wir\fi, dass die folgende Arbeit eigenst{\"a}ndig von - \if@oneAuthor mir\else uns\fi\space allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem - Arbeitsmaterial unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines Plagiats, inklusive - disziplinarischer Ma{\ss}nahmen, sind \if@oneAuthor mir\else uns\fi\space bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmen - als solche kenntlich gemacht. \par - }{}% - {\raggedleft - \foreach \x in \@author{ - \begin{tabular}[t]{r} - \\[3em] - \rule{4cm}{0.4pt}\\ - {\footnotesize\x} - \end{tabular} - } - \par} - \if\@param t\vspace*{\fill}\fi -} -\let\declarationAuthorship\declarationofauthorship - -%% reconfig Titlepage ----------------------------------------------------------------------------- -\iflanguage{english}{ - \setlocalecaption{english}{professor}{Professor} - \setlocalecaption{english}{firstexaminer}{First examiner} - \setlocalecaption{english}{secondexaminer}{Second examiner} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} - \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} - \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} -}{}% +\newcommand{\professortext}{Professor} +\newcommand{\firstexaminertext}{First examiner} +\newcommand{\secondexaminertext}{Second examiner} +\newcaptionname{english}\professortext{Professor} +\newcaptionname{english}\firstexaminertext{First examiner} +\newcaptionname{english}\secondexaminertext{Second examiner} +\newcaptionname{german,ngerman}\professortext{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{german,ngerman}\firstexaminertext{Erstpr{\"u}fer(in)} +\newcaptionname{german,ngerman}\secondexaminertext{Zweitpr{\"u}fer(in)} \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} +\g@addto@macro\titlepage{\singlespacing} \renewcommand\maketitle[1][c]{ \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax \else @@ -335,7 +424,8 @@ \let\@param#1 \ifx\@param\@empty \ClassError{\myClassName}{\maketitle\space with empty option}{ - \maketitle[] has been called with an empty parameter, this doesn't work. Use \maketitle instead. + \maketitle[] has been called (with an empty parameter), this doesn't work. + Use \maketitle instead. } \fi \let\titlepage@restore\relax @@ -407,9 +497,9 @@ \if\@param l\begin{tabular}{@{}l l}\fi \if\@param c\begin{tabular}{l l}\fi \if\@param r\begin{tabular}{r r@{}}\fi - \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi - \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi - \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi + \if\@professor\@empty\else\textbf{\professortext:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminertext:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminertext:}&\@secondexaminer\\\fi \end{tabular} } \ifx\@dedication\@empty\else diff --git a/src/config.tex b/src/HsH-classes.cfg similarity index 93% rename from src/config.tex rename to src/HsH-classes.cfg index 1517eca756ecdcac524442b1bb488f4bf34148f6..c3a352fba9e26336ecd68211e67d8b836f91a191 100644 --- a/src/config.tex +++ b/src/HsH-classes.cfg @@ -1,14 +1,3 @@ -%% Meta Data for the PDF file -\@ifpackageloaded{hyperref}{ - \hypersetup{ - pdfinfo={ - Title={\@title}, - Author={\@author}, - Subject={\@subject}, - Keywords={\@keywords} - } - } -}{} %% configs for optional packages: \@ifpackageloaded{biblatex}{ \ExecuteBibliographyOptions{ diff --git a/src/HsH-classes.dtx b/src/HsH-classes.dtx new file mode 100644 index 0000000000000000000000000000000000000000..13cf50c6d4aa6ffcb197c81fdf9dd5bf503cdaaf --- /dev/null +++ b/src/HsH-classes.dtx @@ -0,0 +1,1719 @@ +%^^A !TeX root = ./HsH-classes.dtx +% \iffalse meta-comment +%<*internal> +\iffalse +%</internal> +%<*readme> ^^A ---------- README ------------------------------------------------------- + HsH-classes | LaTeX for the Hochschule Hannover + -----------:| ------------------------------------------------------------ + Author | Jan Wille + E-mail | <mail@janiwlle.de> + License | Released under the LaTeX Project Public License v1.3c or later + See | <http://www.latex-project.org/lppl.txt> + +This Project containes classes to create documents for the Hochschule Hannover. + +To use them in you projects bring this folder on you `TEXINPUTS`. +%</readme> +%<*internal> +\fi +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +%</internal> +%<*install> ^^A ---------- HsH-Classes.ins --------------------------------------------- +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +\endpreamble + +\usedir{tex/latex/HsH-classes} +\generate{ + \file{HsH-article.cls}{\from{\jobname.dtx}{article}} + \file{HsH-report.cls}{\from{\jobname.dtx}{report}} + \file{HsH-standalone.cls}{\from{\jobname.dtx}{standalone}} +} +%</install> +%<install>\endbatchfile +%<*internal> ^^A ---------- self-extract ----------------------------------------------- +\usedir{source/latex/HsH-classes} +\generate{ + \file{\jobname.ins}{\from{\jobname.dtx}{install}} +} +\nopreamble\nopostamble +\usedir{doc/latex/HsH-classes} +\generate{ + \file{README.md}{\from{\jobname.dtx}{readme}} +} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +%</internal> +% \fi +% +% \iffalse +%<*driver> ^^A ---------- file headers ------------------------------------------------- +\ProvidesFile{HsH-classes.dtx} +%</driver> +%<article|report|standalone>\NeedsTeXFormat{LaTeX2e}[2022-06-01] +%<article>\ProvidesClass{HsH-article} +%<report>\ProvidesClass{HsH-report} +%<standalone>\ProvidesClass{HsH-standalone} +%<*article|report|standalone> + [2024-04-23 3.00 HsH-class based on KOMA] +%</article|report|standalone> +%<*driver> ^^A ---------- documentation driver ----------------------------------------- + \documentclass{ltxdoc} + \usepackage{doc}[2022-06-01] + \usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} + \usepackage[numbered]{hypdoc} + \usepackage[style=ddmmyyyy,datesep={.}]{datetime2} + \usepackage{scrlogo} + % + \NewDocElement[idxgroup=classes]{Class}{class} + \NewDocElement{Option}{option} + \providecommand\opt{\texttt} + \newenvironment{options}% + {\begin{list}{}{% + \renewcommand{\makelabel}[1]{\opt{##1}\hfil}% + \setlength{\itemsep}{-.5\parsep} + \settowidth{\labelwidth}{\texttt{xxxxxxxxx\space}}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}}% + \raggedright} + {\end{list}} + \newenvironment{packages}% + {\begin{list}{}{% + \renewcommand{\makelabel}[1]{\pkg{##1}\hfil}% + \setlength{\itemsep}{-.5\parsep} + \settowidth{\labelwidth}{\texttt{xxxxxxx\space}}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}}% + \raggedright} + {\end{list}} + \newenvironment{note}[1]{\begin{quote}\textbf{Note:}\;#1}{\end{quote}} + \def\paragraph#1{\bigskip\textbf{#1}\\} + \newcommand\OR{\kern1pt{|}\kern1pt} + % + \renewcommand{\familydefault}{\sfdefault} + \setlength\parindent{0pt} + \setcounter{IndexColumns}{2} + \setlength\marginparsep{2\labelsep} + % + \EnableCrossrefs + \RecordChanges + % + \GetFileInfo{\jobname.dtx} + \title{ + \textsf{HsH-Classes} --- A set of \LaTeX{} classes for use in Hochschule Hannover + \thanks{This file describes version \fileversion, last revised \filedate.} + } + \author{Jan Wille\thanks{E-mail: mail@janiwlle.de}} + \MaintainedBy{Maintained on \url{https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh}} + \date{Printed \today} + \begin{document} + \maketitle + \begin{multicols}{2} + \tableofcontents + \end{multicols} + \DocInput{\jobname.dtx} + \end{document} +%</driver> +% \fi +% +%^^A ---------- change log ------------------------------------------------------------- +%\changes{v1.00}{2021-11-09}{Initial Version. Official first release} +%\changes{v2.00}{2023-08-08}{This version changes the default build-system to \texttt{latexmk}} +% +% +%^^A ---------- document body ---------------------------------------------------------- +% +% \vspace{2\baselineskip} +% \begin{abstract} +% The following documents a set of \LaTeX{} classes created for the Hochschule Hannover. +% They are intended to ease the workflow when writing documents by providing a common +% formating basis that should work for pretty much everything a studend will be expected +% to write. This can be simple one-paged documents, excercises, lab-reports, papers or +% bachelors and masters thesises. +% +% The classes provide interfaces to modify commend requriements, provide commands to get +% specifics like the logo and provide and pre-configure comonly needed packages. This +% should get you going imidealty and reduce the setuptime significantly. +% \end{abstract} +% +% +% \clearpage +% \section{The different classes} +% +% The project classes provided by the Project all carry the |HsH-| prefix. Here is a +% list of the available classes and some expleantion on when to use which class. +% \begin{description} +% \item\DescribeClass{HsH-article} +% A article-class based on \KOMAScript{}s \cls{scrartcl}. +% It is designed for quick and compact documents and is useful for writing +% lab-protocols and alike. It does not have chapters and therefore never +% breaks to a new page on its own. +% \item\DescribeClass{HsH-report} +% A report-class based on \KOMAScript{}s \cls{scrreprt}. +% This is probably the most useful class, as it can be used for a wide +% variety of documents (beginning with lab-reports and ending at complete +% thesis). The line between article and report is somewhat blurry, so use +% as you see fit. +% \item\DescribeClass{HsH-standalone} +% A helper class based based on the \cls{standalone} +% class. It is designed only for creating images as separate documents to +% keep things organized and compiler times low. It is useful for creating +% graphs, circuit diagrams or other kind of complex sub documents. +% \end{description} +% +% \section{Document options} +% To configure the behavior and style of documents using this class, options can be +% passed via the |\documentclass|\oarg{options}\marg{document-class} command. +% +% It should be noted that all unknown keys will pe passed to the parrent class and a +% log-message issued. +% +% \subsection{Generic options share by all classes} +% These Options are avalable regardless of documentclass and modify common things. +% +% \DescribeOption{fontfamily} \DescribeOption{sans}\DescribeOption{roman} +% The \opt{fontfamily=\meta{opt}} option configures which font-style is used. +% For convenience there are also short-forms providet. +% The avalable options are: +% \begin{options} +% \item[sans\OR sans-serif] A sans-serif font is used (similar to Arial) +% \item[roman\OR serif] A serif font is udes (similar to Times-new-Roman) +% \end{options} +% +% \DescribeOption{language} \DescribeOption{english}\DescribeOption{german} +% The \opt{language=\meta{opt}} option set the main language you write in. It ensures +% texts like auto-generated headings are localised properly. +% You can pass in any language-name understood by the \pkg{babel} package. German is +% the default. +% For convenience there are also short-forms providet. +% +% \medskip +% \DescribeOption{todos} +% The \opt{todos} option is a simple switch that activates support for the +% \pkg{todonotes} package. It enables/\-disables the package as well as increasing +% the pagewidth to make space for the notes. +% +% You can use the commands from the package to make notes and other anotations +% (similar to how MS-Words comments work). When you pass \opt{off\OR false} all the +% anotation will disaper from the PDF while still beeing in the source. +% \begin{note} +% setting \opt{todos=off} after having used the option will mostlikly produce +% compilation errors. These will go away after you remove the temporary files. +% \end{note} +% +% \subsection{Options for modifying the document} +% The following options are only avalable for documents (so not utility classes). +% +% \DescribeOption{linespacing} +% \DescribeOption{singlespacing}\DescribeOption{onehalfspacing}\DescribeOption{doublespacing} +% The \opt{linespacing=\meta{opt}} option configures the spacing in beween lines. +% For convenience there are also short-forms providet. +% The avalable options are: +% \begin{options} +% \item[single] No additional space is added in between lines. +% \item[onehalf] Aproximalty half a line of empty space is added inbetween lines. +% \item[double] About a full linehight is left in between lines. +% \end{options} +% +% \DescribeOption{parskip} +% The \opt{parskip=\meta{opt}} option configures the spacing in beween paragraphs. +% This is a option originally implemented by \KOMAScript{} (see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#table.3.7}{its manual}) +% so all its options apply. The class only adds additional options. \par +% For you convinience the relevant options are also listed here: +% +% \begin{options} +% \item[false\OR off] Paragraphs are identified by indentation of the first line by +% 1\,em. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[full\OR true\OR on] Paragraphs are identified by a vertical space of one line +% between paragraphs. There must be at least 1\,em of free space at the end of +% the last line of the paragraph. +% \item[full-] Paragraphs are identified by a vertical space of one line between +% paragraphs. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[full+] Paragraphs are identified by a vertical space of one line between +% paragraphs. There must be at least a third of a line of free space at the end +% of a paragraph. +% \item[full*] Paragraphs are identified by a vertical space of one line between +% paragraphs. There must be at least a quarter of a line of free space at the +% end of a paragraph. +% \item[half] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least 1\,em free space at the end of the last +% line of a paragraph. +% \item[half-] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[half+] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least a third of a line of free space at the end +% of a paragraph. +% \item[half*] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least a quarter of a line of free space at the +% end of a paragraph. +% \item[never] No inter-paragraph spacing will be inserted even if additional +% vertical spacing is needed for vertical adjustment with |\flushbottom|. +% \item[never+] No inter-paragraph spacing will be inserted. There must be at least a +% third of a line of free space at the end of a paragraph. +% \item[never*] No inter-paragraph spacing will be inserted. There must be at least a +% quarter of a line of free space at the end of a paragraph. +% \end{options} +% +% +% \DescribeOption{headheight} +% The \opt{headheight=\meta{dim}} option allows you to set the required size of the +% header. You may need to modify this if you get a |\headheight|\emph{ to low} error +% message. The emssage should tell you what value you need, but you can pass any +% valid length. +% +% \paragraph{Often relevant \KOMAScript\ options} +% The following options are implemented by the parrent classes and only listed here +% for completness. For more detils, see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#chapter.3}{its manual}. +% \smallskip +% +% \DescribeOption{fontsize} +% The \opt{fontsize=\meta{size}} options takes a size in \opt{pt}. It is usually in therange of +% 10-12, but other sizes can work as well. +% +% \DescribeOption{paper} +% The \opt{paper=\meta{size}} options accepts a number of options, most ISO formats +% are supported, but also others like \opt{letter} or \opt{legal}. +% +% \DescribeOption{twoside} +% The \opt{twoside} option sets your document up for doublesided printing. The header +% and footer will take this into account and binding-correction will be applide along +% the inner edge. +% +% \DescribeOption{BCOR} +% The \opt{BCOR=}\meta{dim} option allows you to define a custom binding-correction. +% Any valid length can be put here, but to large of a value will shrink the outer +% margin to a not-desirable level. +% +% +% \subsection{Standalone specific options} +% The \cls{standalone} utillity class has some special options which are documented +% here. +% \smallskip +% +% \DescribeOption{margin} +% The \opt{margin=}\meta{dim} option controlls how much whicspace is added arround +% you standalone document. This usually looks better which is why the default is +% 0.25\,cm, but you can supress it by passing 0\,cm. +% +% \DescribeOption{multi} +% The \opt{multi=}\meta{opt} option defines which enviroment make up a page. It can +% be passe more than once. +% +% +% \section{Provided commands} +% The clases define a set of commands which are explained in the following section. +% +% \DescribeMacro{\HsHClassName} +% Each class defines the macro |\HsHClassName| to contain its classname. This is +% mostly usefull so internals can reuse the classname, but you could also check +% against it if you needed to. +% +% \subsection{Title matters} +% \LaTeX{} has a set of default commands which are used to define data for the +% titlepage, like |\title| or |\author|. The classes define a few additional +% commands, which are documented her. +% \smallskip +% +% \DescribeMacro{\matrikelnr} +% The |\matrikelnr|\marg{nr[, ..]} macro sets the matrikelnumber of the author(s). +% It can be a single number or a comma seperated list of numbers. The numbers will +% be matched to the authors passed into |\author|. +% +% \DescribeMacro{\professor} +% You can pass any text to |\professor|\marg{text}, it will be printed on the +% bottom of the titelpage. +% +% \DescribeMacro{\keywords} +% This macro can be used to define keywords which are relevant to your document. +% They will be printed as part of the abstract and be put into the PDF's meta-data. +% +% \paragraph{Modifying the Logo} +% \DescribeMacro{\HsHlogoPath} +% The logo is loaded from a file whos name is read from \cmd{\HsHlogoPath}. Change +% it to use a different logo-file. +% +% \DescribeMacro{\HsHlogoPage} +% As the PDF file can hae multiple pages, the \cmd{\HsHlogoPage} command stores +% which page to load. +% +% \DescribeMacro{\includeHsHlogohere} +% The macro \cmd{\includeHsHlogohere\oarg{width}} is used by |\maketitle| to produce +% the logo. But if you want it elsewhere, you cann call this macro yourself. +% +% +% \subsection{Commands for document writing} +% The following commands will be usefull to you when writing a document. +% \smallskip +% +% \DescribeMacro{\declarationofauthorship} +% The command |\declarationofauthorship|\oarg{align} can be used to print a +% "declatation of authorship" in the current location, similar to how +% |tableofcontens| and friends work. +% +% It will produce a horizontal line, a text block containing the regulatory text and +% a signature block for every author. The command is localised for both english and +% german. Using the optional argument, you can define the positioning. Pass \opt{t} +% for alignment at the top of the page and \opt{b} for bottom alignment +% (\emph{default}). +% +% \smallskip +% The three commands \cmd{\frontmatter},\cmd{\mainmatter} and \cmd{\backmatter} are +% provided for \cls{report} classes. They seperate document section and +% automatically set up pagenumer styles. \par +% \DescribeMacro{\frontmatter} +% \cmd{\frontmatter} set the pagenumers to capital roman numerals. This is usually +% required for everything before the first chapter. \par +% \DescribeMacro{\mainmatter} +% \cmd{\mainmatter} sets the pagenumbering to "normal" arabic numbers. This is +% usually the style for the document content. \par +% \DescribeMacro{\backmatter} +% \cmd{\backmatter} can be used for apendixes and alike. It sets the pagenumbering +% to small roman numerals. +% +% +% \subsection{Default \LaTeX{} Commands that are modified} +% Additionaly, some of \LaTeX{}s default commands are moddified to better fit this +% class. This is documented here. +% +% \DescribeMacro{\title} +% The \cmd{\title\oarg{short-title}\marg{title}} command now takes an additional, +% optional argument. You can use it for a shorter version of your title, that will +% be used in the header to save on space. +% +% \DescribeMacro{\maketitle} +% The |\maketilte| command if \LaTeX{} default way to create a titlepage. We +% redefine it to produce a titlepage that matches the sytel typically used on the +% Hochschle Hannover. This incudes the logo beeing printed, depending on the +% \opt{f1} to \opt{f5} documentoptions. \par +% The command now also takes an options alignment-parameter: +% |\maketitle|\oarg{align}. You can pass \opt{l\OR c\OR r} to get \emph{left}, +% \emph{center} or \emph{right} alignment. +% +% +% \section{Package laoding} +% The classes load some packges for internal use as well as loading and configuring +% common use packages. The details are documented in the following section. +% +% \subsection{Allways loaded packages} +% \begin{packages} +% \item[fontenc] for output encoding, set to the european characterset +% \item[babel] for langauge-specific typesetting +% \item[bookmark] creates bookmoarks in the PDF +% \item[hyperref] for easy referencing and linking +% \item[caption] to customize captions and make references point to the beginning +% of the floats +% \item[graphicx] for importing and manipultating images +% \item[amsmath,amssymb,amsfonts] more options when typesetting math +% \item[lmodern] sets up the Latin-Modern font +% \item[setspace] used for configuring linespacing +% \end{packages} +% +% There are also some packages for internal functionalaty that shouln't conserne the +% user, but they are listed here for completness. +% \begin{packages} +% \item[scrbase] +% \item[pgffor] +% \end{packages} +% +% \subsection{Conditionally loaded Packages} +% A subset of packages is only loaded (or loaded with specifig options) depending +% on options passed to the package +% \begin{packages} +% \item[babel] gets configured depending on \opt{language} +% \item[csquotes] for language-specific quotations marks +% \item[ziffer] only loaded for german documents, sets comma as decimal seperatior +% \item[todonotes] loaded depending on \opt{todos} +% \end{packages} +% +% \subsection{Pre-configured Packages} +% These packages are coonfigured by the class to work in a cooperative way. The +% user must load them in this preable via |\usepackage|\marg{pkg-name} however, as +% loading them allways bears additional, unnecicary overhead. +% +% +%\StopEventually{^^A +% \PrintChanges +% \PrintIndex +%} +% +% \section{Implementation} +% +%\iffalse docstrip-guard +%<*article|report|standalone> +%\fi +% +% \subsection{Internal commands} +% \begin{macro}{\HsHClassName} +% The classname of specific class is stored in the |\HsHClassName| which gets used +% throuout the code. +% \begin{macrocode} +\let\HsHClassName\@currname +% \end{macrocode} +% \end{macro} +% +% There is also a second macro |\HsHClassName@ParrentClass| which stores the parrent +% classes name. +% \begin{macrocode} +\def\HsHClassName@ParrentClass{% +%<article> scrartcl% +%<report> scrreprt% +%<standalone> standalone% +} +% \end{macrocode} +% +% +% \subsection{Option handeling} +% The options are handled using featues provieded by the |KOMA|-Script ecosystem. +% To get access to this the \pkg{srcbase} package is loaded. +% \begin{macrocode} +\RequirePackage{scrbase} +% \end{macrocode} +% +% We also require some packages for some of the option, these are loaded next. +% \begin{macrocode} +\RequirePackage{setspace} +% \end{macrocode} +% +% A new familiy of keys is created and shared by all elelments of this project. +% For that the |\DefineFamily| macro is used. The familiy name is \emph{HsH}, +% matching the usual prefixes. +% \begin{macrocode} +\DefineFamily{HsH} +% \end{macrocode} +% Additionally each class-file represents a member in the family. This is defined +% using the |\DefineFamilyMember| macro. It's optional argument is set to the current +% filename by default, so we do not need to specify it, just the family name to +% attatch it to. +% \begin{macrocode} +\DefineFamilyMember{HsH} +% \end{macrocode} +% +% \begin{macro}{\HsH@Options@PassToParrent} +% To be able to pass options to the parrent class wehre needed easiely, a command is +% defined. It also issues a log-message. +% \begin{macrocode} +\newcommand{\HsH@Options@PassToParrent}[1]{% + \ClassInfoNoLine{\HsHClassName}{passing option to parrent class: #1}% + \PassOptionsToClass{#1}{\HsHClassName@ParrentClass}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HsH@Options@DeclareAlias} +% It is also usefull to have shot-versions of options. The following commands makes +% it easy to decalare these. +% \begin{macrocode} +\newcommand{\HsH@Options@DeclareAlias}[3][HsH]{% + \DeclareOption{#2}{\FamilyExecuteOptions{#1}{#3}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{option}{fontfamily} +% The first option to be defined is \opt{fontpamily}. It's defined as a +% \emph{Numerical} key so that it can accept multiple options and map them to a +% switch case. +% \begin{macrocode} +\DefineFamilyKey{HsH}{fontfamily}{ + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{sans,roman} +% For convinience, there are also two short-versions defined. +% \begin{macrocode} +\HsH@Options@DeclareAlias{sans}{fontfamily=sans} +\HsH@Options@DeclareAlias{roman}{fontfamily=roman} +% \end{macrocode} +% \end{option} +% +% \begin{macrocode} +%<*!standalone> +% \end{macrocode} +% +% +% \begin{option}{linespacing} +% The \opt{linespacing} options is also a \emph{Numerical} option, mapping to three +% cases. They execute the apropriate commands of the \pkg{setspace} package. +% \begin{macrocode} +\DefineFamilyKey{HsH}{linespacing}{ + \begingroup + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{singlespacing,onehalfspacing,doublespacing} +% For convinience, there are also these short-versions defined. +% \begin{macrocode} +\HsH@Options@DeclareAlias{singlespacing}{linespacing=single} +\HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} +\HsH@Options@DeclareAlias{doublespacing}{linespacing=double} +% \end{macrocode} +% \end{option} +% +% +% \begin{option}{parskip} +% The \opt{parskip} option is special in that ist originally a \KOMAScript{} option +% that get expanded by this class. Only two new cases are defined here and everything +% unknown gets passed to the parrent class. \par +% It should also be noted that this option can't execute its code imidealtly, as the +% commands needed are only defined later when the parrent class loads in. So the +% |\setparsizes| command is pushed into a hook. +% \begin{macrocode} +\DefineFamilyKey{HsH}{parskip}{% + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tempa}{% + {never+}{0},% + {never*}{1},% + }{#1} + \if@atdocument + \ClassError{\HsHClassName}{ + option `parskip' can only be configured in preamble! + } + \fi + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.3333\linewidth \@plus 1fil}} + \or% 1 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}} + \else% should never be + \endgroup + \fi + \else + \endgroup + \HsH@Options@PassToParrent{parskip=#1} + \FamilyKeyStateProcessed + \fi +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{headheight} +% The \opt{headheight} option just stet the |\headheight| to the given value. +% \begin{macrocode} +\def\HsH@opt@headheight{} +\FamilyStringKey{HsH}{headheight}{\HsH@opt@headheight} +\AtEndOfClass{% + \headheight=\HsH@opt@headheight% +} +% \end{macrocode} +% \end{option} +% +% For the \opt{twoside} option we only redefine the default, everyting else is +% handled by the parrent class. +% \begin{macrocode} +\DefineFamilyKey{HsH}{twoside}[semi]{% + \HsH@Options@PassToParrent{twoside=#1,BCOR=1cm} + \FamilyKeyStateProcessed +} +% \end{macrocode} +% +% \begin{macrocode} +%</!standalone> +% \end{macrocode} +% +% +% \begin{macro}{\HsH@opt@language} +% First, the macro to store the languages name in is created. The default is |nil|, +% as \pkg{babel} will see this as no-language. +% \begin{macrocode} +\def\HsH@opt@language{nil} +% \end{macrocode} +% \end{macro} +% +% \begin{option}{language} +% The key is than defined to store its value inside the command. This allowes the +% option to be called multiple time, but only the last set value will be passed on to +% \pkg{bable}. +% \begin{macrocode} +\FamilyStringKey{HsH}{language}{\HsH@opt@language} +% \end{macrocode} +% \end{option} +% +% \begin{option}{english,german, ngerman} +% For convinience, there are also these short-versions defined. +% \begin{macrocode} +\HsH@Options@DeclareAlias{english}{language=english} +\HsH@Options@DeclareAlias{german}{language=ngerman} +\HsH@Options@DeclareAlias{ngerman}{language=ngerman} +% \end{macrocode} +% \end{option} +% +% +% \begin{macro}{\HsH@opt@faculty} +% As we need a default value that is not zero, the macro needs to be defined an +% initalised manually. +% \begin{macrocode} +\def\HsH@opt@faculty{1} +% \end{macrocode} +% \end{macro} +% +% \begin{option}{faculty} +% The \opt{faculty} options is once again a \emph{Numerical} option, mapping the five +% faculties and storeing the selected one in |\HsH@opt@faculty|. +% \begin{macrocode} +\FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% + {none}{1}, {false}{1},% + {f1}{2}, {1}{2},% + {f2}{3}, {2}{3},% + {f3}{4}, {3}{4},% + {f4}{5}, {4}{5},% + {f5}{6}, {5}{6},% +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{f1,f2,f3,f4,f5} +% For convinience, there are also these short-versions defined. +% \begin{macrocode} +\HsH@Options@DeclareAlias{f1}{faculty=f1} +\HsH@Options@DeclareAlias{f2}{faculty=f2} +\HsH@Options@DeclareAlias{f3}{faculty=f3} +\HsH@Options@DeclareAlias{f4}{faculty=f4} +\HsH@Options@DeclareAlias{f5}{faculty=f5} +% \end{macrocode} +% \end{option} +% +% \begin{option}{todos} +% The boolean option \opt{todos} is simply created using the commands from \pkg{scrbase}. +% Boolean options allready default to \meta{true} if called without and argument, so +% no need to define an explicit alias. +% \begin{macrocode} +\FamilyBoolKey{HsH}{todos}{@todos} +% \end{macrocode} +% \end{option} +% +% For the \cls{standalone} class the \opt{fontsize} option is mocked to present a +% standardised interface. A user might expect this option to be passable to this +% class and we shoulnd crete an anoying error just for this. +% \begin{macrocode} +%<*standalone> +\DefineFamilyKey{HsH}{fontsize}{% + \ClassInfoNoLine{\HsHClassName}{The `fontsize' option is only a mock, its has not effect} + \FamilyKeyStateProcessed +} +%</standalone> +% \end{macrocode} +% +% \subsubsection{Unknown options} +% Unknown options will be passed to the parent class. For that a |@else@| key is +% defined on the |HsH| family, which will be execute for every unknown key-value +% option. Unknown bare options are handled by the |\DeclareOption*| command and will +% be passed there. +% \begin{macrocode} +\DefineFamilyKey{HsH}{@else@}{ + \HsH@Options@PassToParrent{#1} + \FamilyKeyStateProcessed +} +\DeclareOption*{ + \HsH@Options@PassToParrent{\CurrentOption} +} +% \end{macrocode} +% +% +% \subsubsection{Default options} +% The different classes all execute a set of default options, which is handled by the +% following code. +% \begin{macrocode} +\FamilyExecuteOptions{HsH}{% + fontfamily=sans-serif, +%<*!standalone> + fontsize=11pt, + language=ngerman, +%<article> parskip=never+, +%<report> parskip=half+, + linespacing=single, + headheight=2.15\baselineskip, +%</!standalone> +%<*article|report> + toc=listof, + toc=bibliography, +%</article|report> + faculty=none, +%<*standalone> + margin=0.25cm, + multi=tikzpicture, + multi=circuitikz, +%</standalone> +} +% \end{macrocode} +% +% Now we cann process the options for the |HsH| familiy. +% \begin{macrocode} +\FamilyProcessOptions{HsH}\relax +% \end{macrocode} +% +% \subsubsection{Loading the parrent class} +% \begin{macrocode} +\LoadClass{\HsHClassName@ParrentClass} +% \end{macrocode} +% +% +% \subsection{Package loading} +% The clases load and configure some common packages to reduce the needed amount of +% boilderplate code in your preamble. +% +% Additionally there are settings provided for packages that are used more rarly, but +% will be set up correctly if you decide to load them via |\usepackage{}|. +% +% \subsubsection{Ensuring German works} +% With modern LaTeX systems the encoding of inputfiles is UTF-8 by default, so the +% \pkg{inputenc} package is no longer requried. Should the user still use a old +% setup or use a different encoding, he is responsible for loading \pkg{inputenc} +% himself. +% \changes{v3.00}{2024-02-03}{removed the \pkg{inputenc} package, as utf8 is now default} +% +% The font-encoding for the pdf file is also set up to allow for the full european +% characterset. +% \changes{v3.00}{2024-02-03}{added \pkg{type1ec} package to get better font-scaling} ^^A see https://tex.stackexchange.com/questions/208304 +% \begin{macrocode} +\RequirePackage[T1]{fontenc} +\RequirePackage{type1ec} +% \end{macrocode} +% +% To ensure localised translations of all displayed text automatically dependign on +% the user-selected \opt{language}, the \pkg{babel} package is loaded. This also +% allowes for the use of the |\iflanguage| command, which is relevant later. +% \begin{macrocode} +\RequirePackage[main=\HsH@opt@language]{babel} +% \end{macrocode} +% +% Quotationsmarks are also very different between languages, so the following +% ensures the correct style for the correct language. +% \begin{macrocode} +\RequirePackage[autostyle=true]{csquotes} +\MakeOuterQuote{"} +% \end{macrocode} +% +% German uses a comma as the decimal separator, which collides with \LaTeX{}s +% default english setting of using the comma as a thousands separator and therefore +% replacing it with some whitespace on printed version. Luckily loading the +% \pkg{ziffer} package sets this up to match the german standart. +% \begin{macrocode} +\iflanguage{ngerman}{\RequirePackage{ziffer}}{}% +% \end{macrocode} +% +% +% \subsubsection{Generally usefull packages} +% +% We load \pkg{hyperref} for clikable links and configure it to write meta-date to +% the PDF. +% \begin{macrocode} +\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' +\RequirePackage{bookmark} +\AtBeginDocument{ + \hypersetup{ + pdfinfo={ + Title={\@title}, + Author={\@author}, + Subject={\@subject}, + Keywords={\@keywords} + } + } +} +% \end{macrocode} +% +% The \pkg{todonotes} package is greate for anotation, but extremly expensive on +% compiletime. So we load it only if the user requests it. Also its commands are +% stubed, so that they can be left in the sourcecode and jut not output anything. +% \begin{macrocode} +\if@todos + \PassOptionsToPackage{ + textsize=small, + figwidth=.6\textwidth + }{todonotes} + \RequirePackage{todonotes} +\else + \newcommand{\listoftodos}[1]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} +\fi +% \end{macrocode} +% +% \begin{macrocode} +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage[svgnames]{xcolor} +% \end{macrocode} +% +% For better compatibility with the \pkg{listings} package we load the +% \pkg{scrhack} package. +% \begin{macrocode} +\RequirePackage{scrhack} +% \end{macrocode} +% +% \subsubsection{Options for packages that could be loaded by the user} +% Some package are not always needed and potentially heavy to load in by default. +% But its still usefull to set default options for these packagese. +% +% These differ from the settings provided in |HsH-classes.cfg| in that they are +% defaults that apply allway and not user-configurable preferences which are user +% or even project specific. +% \begin{macrocode} +%<*article|report> +\PassOptionsToPackage{backend=biber}{biblatex} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{biblatex}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} + }{}% + \makeatother +} +%</article|report> +\PassOptionsToPackage{free-standing-units}{siunitx} +\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} +% \end{macrocode} +% +% For other packages we provide the settings more as a recomendation of what is +% usefull. As the user might want to change these, we outsource this to a seperat file +% and input it |\AtBeginDocument|. That way the user can just replace the file with his +% custom version. +% \begin{macrocode} +\AtBeginDocument{ + \makeatletter + \InputIfFileExists{HsH-classes.cfg}{ + \ClassInfo{\HsHClassName}{Local config file HsH-classes.cfg used.} + }{ + \ClassInfo{\HsHClassName}{No HsH-classes.cfg!! I hope you configered it yourself.} + } + \makeatother +} +% \end{macrocode} +% +% \subsection{Custom commands} +% +% \subsubsection{Document seperation commands} +% The following commands are only defnied for \cls{book} type classes by default. +% But they are also usefull for the \cls{report} class, so we define them in that case. +% \begin{macrocode} +%<*report> +% \end{macrocode} +% +% \begin{macro}{\if@mainmatter} +% We define a switch which stores if the document is currently at a mainmatter +% section. Ir defaults to |true| as the user needs to explicitly set the state to +% something differnt. +% \begin{macrocode} +\newif\if@mainmatter\@mainmattertrue +% \end{macrocode} +% \end{macro} +% +% As a pagenumber change requires a fresh page, this is ensured first. We also +% need to make sure that on twosided document, the first page is alwasy on the +% left. +% +% \begin{macro}{\frontmatter} +% The pagenumbering is set to capital roman numerals. +% \begin{macrocode} +\newcommand{\frontmatter}{ + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{Roman} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mainmatter} +% The pagenumbering is set to arabic numerals. +% \begin{macrocode} +\newcommand{\mainmatter}{ + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmattertrue\pagenumbering{arabic} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\backmatter} +% The pagenumbering is set to arabic numerals. +% \begin{macrocode} +\newcommand{\backmatter}{ + \if@openright\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{roman} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</report> +% \end{macrocode} +% +% +% \subsubsection{The Logo for Hochschule Hannover} +% The following macros are responsible for creating the logo. They load a specific +% page of a PDF file and siplay it. +% +% \begin{macro}{\HsHlogoPath} +% This macro contains the path to load the PDF from. It defaults to +% |HSH-Logo.pdf|, which is provieded by this project inside the |scr/| folder. +% \begin{macrocode} +\newcommand{\HsHlogoPath}{HSH-Logo.pdf} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HsHlogoPage} +% This macro stores the page to use from the PDF. It will be set via the +% documentoption \opt{faculty}. +% \begin{macrocode} +\newcommand{\HsHlogoPage}{\HsH@opt@faculty} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\includeHsHlogohere} +% Calling this macro produces the logo in-place. You can specify the width as an +% optional argument. The default is $5\,\mathrm{cm}$. \par +% If the file provided via \cmd{\HsHlogoPath} doesn't exist, the command will +% produce an error. +% \begin{macrocode} +\newcommand{\includeHsHlogohere}[1][5cm]{ + \IfFileExists{\HsHlogoPath}{ + \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} + }{ + \ClassError{\HsHClassName}{\HsHlogoPath\space not found!}{ + The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location + } + } +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Title matters} +% \begin{macrocode} +%<*article|report> +% \end{macrocode} +% +% The following commands relave to the creation of the titlepage. They Implement +% how the user can define the differnt datafields. +% \smallskip +% +% First the |\@author| macro is set to |\@empty|, this makes it easyer to handle it +% later. +% \begin{macrocode} +\let\@author\@empty +% \end{macrocode} +% +% \begin{macro}{\title} +% We redefine the |\title| command to take a optional argument. This is stored in +% the additional |\@shorttitle| macro. +% \begin{macrocode} +\renewcommand{\title}[2][]{ + \gdef\@title{#2} + \gdef\@shorttitle{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@shorttitle} +% This new macro stores a short version of the title. This will be used in places +% where the fill title might overflow the availabel space. +% \begin{macrocode} +\def\@shorttitle{\@empty} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\matrikelnr,\@matrikelnr} +% These macros set and store the matrikel-number (or set of numbers), which will +% be printed on the titlepage. +% \begin{macrocode} +\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} +\def\@matrikelnr{\@empty} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\professor,\firstexaminer,\secondexaminer,\@professor,\@firstexaminer,\@secondexaminer} +% These three macros-groups give options to the user to print peoples names on +% the titlepage, who are relevant to the document, but not the author. +% \begin{macrocode} +\newcommand{\professor}[1]{\gdef\@professor{#1}} +\def\@professor{\@empty} +\newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} +\def\@firstexaminer{\@empty} +\newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} +\def\@secondexaminer{\@empty} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\keywords,\@keywords} +% The macro-group defines and holds keywords which describe the document. They +% are used when printing the abstract as well as in the PDF's meta-data. +% \begin{macrocode} +\newcommand{\keywords}[1]{\gdef\@keywords{#1}} +\def\@keywords{\@empty} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</article|report> +% \end{macrocode} +% +% \subsubsection{Commands for document writing} +% +% \begin{macro}{\declarationofauthorship} +% The declatation of authorship is not relevant for the \cls{standalone} varaiant. +% \begin{macrocode} +%<*!stadnalone> +% \end{macrocode} +% The \pkg{pgffor} package is requried to handle the loope over the list of authors. +% \begin{macrocode} +\RequirePackage{pgffor} +% \end{macrocode} +% Now the command is defined. It takes a optional argument which defaults to \opt{b}. +% \begin{macrocode} +\newcommand{\declarationofauthorship}[1][b]{ +% \end{macrocode} +% First the argument is passed and an error raised for invalid arguments. Passing +% in \opt{b} will push the declatarion to the bottom of the page and add a +% horizontal line. PAssing \opt{t} simply adds some space. +% \begin{macrocode} + \if#1b + \vspace*{\fill} + \hrule + \else\if#1t + \vspace*{2em} + \else + \ClassError{\HsHClassName}{Wrong Parameter for `\declarationofauthorship'}{ + `\string\declarationofauthorship' only accepts `t' and `b' as parameters. + } + \fi\fi +% \end{macrocode} +% Now the actuall declatarion can be constructed. It uses the text from |\decofauthname| +% and |\decofauthtext|. +% \begin{macrocode} + \vskip 3em + {\centering\bfseries\usekomafont{section}{\decofauthname}\par} + \vskip 3em + \decofauthtext\par +% \end{macrocode} +% The last step is to loop over all authors by reading |\@author| and creating a +% signature box for each one. |\thanks| also needs to be cleared, as a footnote +% wouldn't make sense here. +% \begin{macrocode} + \begingroup + \renewcommand{\thanks}{\sbox0} + \raggedleft + \foreach \tmp@ in \@author { + \if\tmp@\empty\else + \hskip 1em \parbox{4cm}{ + \vskip 4em + \hrule\vskip 4pt + \raggedleft\footnotesize\tmp@ + }% + \fi + }\par + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ifsingleauthor} +% To ensure |\decofauthtext| is preperly spelled for one or multiple authors, we +% define a conditional that holds this information. Additionally we check the +% number of authors |\AtBeginDocument| and store it. +% \begin{macrocode} +\newif\ifsingleauthor +\AtBeginDocument{ + \begingroup + \newcount\count@ + \count@=\z@ + \@for\tmp@:=\@author\do{\advance\count@\@ne} + \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% define the localised texts +% \begin{macrocode} +\newcommand{\decofauthname}{Declaration of Authorship} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} +% +\newcommand{\decofauthtext}{Language not supported!} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space + \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own + making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space + \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including + disciplinary actions that may result from it. Any use of the works of any other author, in any form, + is properly acknowledged at their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die + folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und + unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial + unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines + Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space + bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. +} +% \end{macrocode} +% +% \begin{macro}{\declarationAuthorship} +% \changes{v2.01}{2023-08-11}{Deprecate \cmd{\declarationAuthorship}, as it got replaced by \cmd{\declarationofauthorship}} +% \begin{macrocode} +\def\declarationAuthorship{% + \ClassWarning{\HsHClassName}{% + Command \string\declarationAuthorship\space is deprecate.\MessageBreak + Replace it with \string\declarationofauthorship. + }% + \declarationofauthorship% +} +%</!stadnalone> +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Micalanious commands} +% \vspace{-1\baselineskip} +% \paragraph{Utillity commands} +% For writing absolout values, we provide the \cmd{\abs\marg{equ}} command, which +% puts groable, vertical bars on both sides of the equation inside. +% \begin{macrocode} +\newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} +% \end{macrocode} +% +% \paragraph{Configuring mathmode-indices} +% The only hard requirements for documents writing on Hochschule Hannover is, that +% the indices in mathematic formulas must be typset in an upright ("steil") font, +% not the default kursive font. We configure this by first defining a macro to +% replace the default \cmd{\sb} macro. We can than assign this to |_|. For that to +% work we need to change its catcode to make it modifyable. +% \begin{note} +% You can allways use \cmd{\sb} to use the original behaviour for special cases. +% \end{note} +% \begin{macrocode} +\def\@subinrm#1{\sb{\mathrm{#1}}} +{\catcode`\_=13 \global\let_=\@subinrm} +% \end{macrocode} +% +% \begin{macro}{\upsubscripts} +% Now we can define a command to activate this new behavior by changing the catcode +% of |_| to 13, which makes it a normal macro. +% \begin{macrocode} +\newcommand\upsubscripts{\catcode`\_=12} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\normalsubscripts} +% To switch back we simply need to reset the catcode of |_| back to the original, +% which makes it a buildin operator with the default behavior. +% \begin{macrocode} +\newcommand\normalsubscripts{\catcode`\_=8} +% \end{macrocode} +% \end{macro} +% +% \subsection{Document setup} +% The following sets up the look and feel of the documents using this classe. All +% configuration and stylin is done here. +% +% \subsubsection{Fonts and text styling} +% \begin{macrocode} +\RequirePackage{lmodern} +% \end{macrocode} +% +% \subsubsection{Page layout} +% +% \begin{macrocode} +%<*!standalone> +\areaset[current]{0.75\paperwidth}{0.8\paperheight} +\if@todos + \addtolength\paperwidth{5cm} + \addtolength\marginparwidth{5cm} +\fi +%</!standalone> +% \end{macrocode} +% +% \subsubsection{Styling \LaTeX{} default constucts} +% +% \paragraph{Floats}\vspace*{-1\baselineskip} +% \begin{macrocode} +%<*!standalone> +% \end{macrocode} +% Floats should alwasy prefere the \emph{here} placement, than the \emph{top} of +% the following page. +% \begin{macrocode} +\renewcommand{\fps@figure}{h!t} +\renewcommand{\fps@table}{h!t} +% \end{macrocode} +% +% Floats should be centered by default and the width of the caption box is limited. +% \begin{macrocode} +\g@addto@macro\@floatboxreset\centering +\setcapwidth{0.8\textwidth} +% \end{macrocode} +% +% The names of floating enviroments are redefined to show abreviations only. +% \begin{macrocode} +\defcaptionname{english}\figurename{Fig.} +\defcaptionname{german,ngerman}\figurename{Abb.} +\defcaptionname{english}\tablename{Tab.} +\defcaptionname{german,ngerman}\tablename{Tab.} +% \end{macrocode} +% +% For subfigures we need to define a name used in autoreferences. +% \begin{macrocode} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{subfigure}{ + \let\subfigureautorefname\figureautorefname + }{}% + \makeatother +} +% \end{macrocode} +% +% \begin{macrocode} +%</!standalone> +% \end{macrocode} +% +% \paragraph{Lists} +% For unordert liste the markers are redefined to look a littel nicer. +% \begin{macrocode} +\renewcommand{\labelitemi}{\raisebox{.3ex}{\scalebox{0.7}{$\bullet$}}} +\renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} +\renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} +\renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} +% \end{macrocode} +% +% \paragraph{Misc} +% We activae one of the commands defined above to make math-indices upright by +% default. +% \begin{macrocode} +\upsubscripts +% \end{macrocode} +% +% We want a ragged botton instead of spreading the paragraphs over the page. +% \begin{macrocode} +\raggedbottom +% \end{macrocode} +% +% The ruler shown in the top and left margin with the \opt{draft} option is +% removed. +% \begin{macrocode} +\let\layercontentsmeasure\relax +% \end{macrocode} +% +% \subsubsection{Header and footer} +% +% \begin{macrocode} +%<*article|report> +% \end{macrocode} +% +% The header and footer are styled using the low-level commands provided by the +% \KOMAScript{} package \pkg{scrlayer-scrpage}. +% \begin{macrocode} +\RequirePackage{scrlayer-scrpage} +\FamilyOptions{KOMA}{headsepline,singlespacing=true} +% \end{macrocode} +% +% First we define the new pagestyle |HsHheadings|. +% \begin{macrocode} +\newpagestyle{HsHheadings}{ + { + \parbox[b]{\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + } + { + \parbox[b]{\sls@headwidth}{ + \LaTeXraggedleft + \leftmark + }% + } + { + \parbox[b]{.45\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + \hfill + \parbox[b]{.45\sls@headwidth}{ + \LaTeXraggedleft + \headmark + }% + } + (\textwidth,.1pt) +}{ + {\pagemark} + {\hfill\pagemark} + {\hfill\pagemark} +} +% \end{macrocode} +% Than all generic settings are applyed: +% \begin{macrocode} +\clearpairofpagestyles +\ofoot*{\pagemark} +\pagestyle{HsHheadings} +%<article>\automark{section} +%<report>\automark{chapter} +%<report>\renewcommand*{\chapterpagestyle}{HsHheadings} +% \end{macrocode} +% +% \begin{macrocode} +%</article|report> +% \end{macrocode} +% +% \subsubsection{Titlepage} +% +% \begin{macro}{\maketitle} +% The definiton of |\maketitle| is mostly taken from the source-code of the +% \KOMAScript{} parrentclass, but was modified to create the desired style. +% \begin{macrocode} +%<*article|report> +\newcommand{\professortext}{Professor} +\newcommand{\firstexaminertext}{First examiner} +\newcommand{\secondexaminertext}{Second examiner} +\newcaptionname{english}\professortext{Professor} +\newcaptionname{english}\firstexaminertext{First examiner} +\newcaptionname{english}\secondexaminertext{Second examiner} +\newcaptionname{german,ngerman}\professortext{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{german,ngerman}\firstexaminertext{Erstpr{\"u}fer(in)} +\newcaptionname{german,ngerman}\secondexaminertext{Zweitpr{\"u}fer(in)} +\newtoks\@tabtoks +\newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} +\newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} +% %%\newcommand*\resettabtoks{\global\@tabtoks{}} +\newcommand*\printtabtoks{\the\@tabtoks} +\addtokomafont{publishers}{\normalsize} +\g@addto@macro\titlepage{\singlespacing} +% +%<article>\renewcommand\maketitle[1][c]{ +%<report>\renewcommand\maketitle[1][l]{ + \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax + \else + \def\and{% + \end{tabular} + \hskip 1em \@plus.17fil + \begin{tabular}[t]{c}% + } + \fi +%<*article> + \par + \ifx\@uppertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\uppertitleback\space ignored + by \string\maketitle\MessageBreak + in `titlepage=false' mode% + } + \fi + \ifx\@lowertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\lowertitleback\space ignored + by \string\maketitle\MessageBreak + in `titlepage=false' mode% + } + \fi +%</article> +%<report> \begin{titlepage} +%<article> \begingroup + \let\@param#1 + \ifx\@param\@empty + \ClassError{\myClassName}{\maketitle\space with empty option}{ + \maketitle[] has been called (with an empty parameter), this doesn't work. + Use \maketitle instead. + } + \fi +%<*report> + \if@titlepageiscoverpage + \edef\titlepage@restore{ + \noexpand\endgroup + \noexpand\global\noexpand\@colht\the\@colht + \noexpand\global\noexpand\@colroom\the\@colroom + \noexpand\global\vsize\the\vsize + \noexpand\global\noexpand\@titlepageiscoverpagefalse + \noexpand\let\noexpand\titlepage@restore\noexpand\relax + } + \begingroup + \topmargin=\dimexpr \coverpagetopmargin-1in\relax + \oddsidemargin=\dimexpr \coverpageleftmargin-1in\relax + \evensidemargin=\dimexpr \coverpageleftmargin-1in\relax + \textwidth=\dimexpr + \paperwidth-\coverpageleftmargin-\coverpagerightmargin\relax + \textheight=\dimexpr + \paperheight-\coverpagetopmargin-\coverpagebottommargin\relax + \headheight=0pt + \headsep=0pt + \footskip=\baselineskip + \@colht=\textheight + \@colroom=\textheight + \vsize=\textheight + \columnwidth=\textwidth + \hsize=\columnwidth + \linewidth=\hsize + \else + \let\titlepage@restore\relax + \fi + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks +%</report> +%<article> \let\titlepage@restore\relax + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% +%<article> \next@tdpage + \ifx\@extratitle\@empty +%<article> \ifx\@frontispiece\@empty\else \mbox{}\fi +%<*report> + \ifx\@frontispiece\@empty\else + \if@twoside\mbox{}\next@tpage\fi + \noindent\@frontispiece\next@tdpage + \fi +%</report> + \else +%<article> \@makeextratitle +%<*report> + \noindent\@extratitle + \ifx\@frontispiece\@empty + \else + \next@tpage + \noindent\@frontispiece + \fi + \next@tdpage +%</report> + \fi +%<*article> + \ifx\@frontispiece\@empty + \ifx\@extratitle\@empty\else\next@tdpage\fi + \else + \next@tpage + \@makefrontispiece + \next@tdpage + \fi + \global\@topnum=\z@ +%</article> + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \vspace*{1cm} + \begin{minipage}[t]{\textwidth}% + \ifx\@titlehead\@empty \else + \usekomafont{titlehead}{\@titlehead}% + \fi + \hfill +% image with referrencepoint in lower left corner: + \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{\includeHsHlogohere} + \end{minipage} + \raisebox{10pt}{\rule{\textwidth}{0.5pt}} + \null +%<article> \vskip 2em +%<report> \vfill + \begingroup + \if\@param c\centering\fi + \if\@param r\raggedleft\fi + \ifx\@subject\@empty\else + {\usekomafont{subject}{\@subject\par}} +%<article> \vskip 1.5em +%<report> \vskip 3em + \fi + {\usekomafont{title}{\huge\@title\par}} +%<article> \vskip .5em +%<report> \vskip 1em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi} +%<article|report> \vskip 4em + {\ifx\@matrikelnr\@empty + \if\@author\@empty\else\usekomafont{author}{ + \parbox{\dimexpr\linewidth}{ + \if\@param c\centering\fi + \if\@param r\raggedleft\fi + \@author + } + }\fi + \else + \if\@author\@empty\else + % sneeky comma needed after \@matrikelnr to deal with single item lists + \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} + \usekomafont{author}{ + \def\arraystretch{1.2} + \if\@param l\begin{tabular}{@{}l l}\printtabtoks\end{tabular}\fi + \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi + \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi + }% + \fi + \fi} +%<article> \vskip 1em +%<report> \vskip 1.5em + {\usekomafont{date}{\@date\par}} +%<article> \vskip 1em +%<report> \vskip \z@ \@plus3fill + \usekomafont{publishers}{ + \def\arraystretch{1.2} + \if\@param l\begin{tabular}{@{}l l}\fi + \if\@param c\begin{tabular}{l l}\fi + \if\@param r\begin{tabular}{r r@{}}\fi + \if\@professor\@empty\else\textbf{\professortext:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminertext:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminertext:}&\@secondexaminer\\\fi + \end{tabular} + } +%<*article> + \ifx\@dedication\@empty\else + \vskip 2em + {\usekomafont{dedication}{\@dedication \par}}% + \fi +%</article> + \par + \endgroup +%<article> \vskip 2em +%<report> \vskip 3em +%<article> \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi + \@thanks\global\let\@thanks\@empty +%<*report> + \vfill\null + \if@twoside + \@tempswatrue + \expandafter\ifnum \@nameuse{scr@v@3.12}>\scr@compatibility\relax + \else + \ifx\@uppertitleback\@empty\ifx\@lowertitleback\@empty + \@tempswafalse + \fi\fi + \fi + \if@tempswa + \next@tpage + \begin{minipage}[t]{\textwidth} + \@uppertitleback + \end{minipage}\par + \vfill + \begin{minipage}[b]{\textwidth} + \@lowertitleback + \end{minipage}\par + \@thanks\global\let\@thanks\@empty + \fi + \else + \ifx\@uppertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\uppertitleback\space ignored + by \string\maketitle\MessageBreak + in `twoside=false' mode% + } + \fi + \ifx\@lowertitleback\@empty\else + \ClassWarning{\KOMAClassName}{% + non empty \string\lowertitleback\space ignored + by \string\maketitle\MessageBreak + in `twoside=false' mode% + } + \fi + \fi + \ifx\@dedication\@empty + \else + \next@tdpage\null\vfill + {\centering\usekomafont{dedication}{\@dedication \par}}% + \vskip \z@ \@plus3fill + \@thanks\global\let\@thanks\@empty + \cleardoubleemptypage + \fi + \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi +%</report> +%<article> \endgroup +%<report> \end{titlepage} + \setcounter{footnote}{0} + \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax + \let\thanks\relax + \let\maketitle\relax + \let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@subtitle\@empty + \global\let\@extratitle\@empty + \global\let\@frontispiece\@empty + \global\let\@titlehead\@empty + \global\let\@subject\@empty + \global\let\@publishers\@empty + \global\let\@uppertitleback\@empty + \global\let\@lowertitleback\@empty + \global\let\@dedication\@empty + \global\let\@matrikelnr\@empty + \global\let\@prof\@empty + \global\let\author\relax + \global\let\title\relax + \global\let\extratitle\relax + \global\let\titlehead\relax + \global\let\subject\relax + \global\let\publishers\relax + \global\let\uppertitleback\relax + \global\let\lowertitleback\relax + \global\let\dedication\relax + \global\let\date\relax + \global\let\matrikelnr\relax + \global\let\professor\relax + \fi + \global\let\and\relax +} +%</article|report> +% \end{macrocode} +% \end{macro} +% +%\iffalse docstrip-guard +%</article|report|standalone> +%\fi +% +%\Finale +\endinput diff --git a/src/HsH-classes.pdf b/src/HsH-classes.pdf new file mode 100644 index 0000000000000000000000000000000000000000..593cecaf0968943fa3e2613563162ab220ae10f0 --- /dev/null +++ b/src/HsH-classes.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fc4c73ce94b87b806dc3dab2f1d830277c372596b61e94d7c72ee647905a2f4 +size 310671 diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 4c4f13e37cc7ee79fe2c977f9ad2caa96be6076b..e80866519a9880d064b5055b59a9e79af9d165fe 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -5,165 +5,361 @@ %% The original source files were: %% %% HsH-classes.dtx (with options: `report') -%% -%% This is a generated file. -%% -%% Copyright (C) 2021 by Jan Wille <mail@janwille.de> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3 of this license -%% or (at your option) any later version. The latest version of this -%% license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3 or later is part of all distributions of LaTeX version -%% 2021/01/01 or later. -%% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} -\NeedsTeXFormat{LaTeX2e} -\newcommand{\myClassName}{HsH-report} -\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] - -%% commands for HsH-logo -\newcommand{\HsHlogoPath}{HSH-Logo.pdf} -\newcommand{\HsHlogoPage}{1} -\newcommand{\includeHsHlogohere}[1][5cm]{ - \IfFileExists{\HsHlogoPath}{}{ - \ClassError{\myClassName}{HsH-Logo.pdf not found!}{ - The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location - } - } - \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} +%% +%% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +\NeedsTeXFormat{LaTeX2e}[2022-06-01] +\ProvidesClass{HsH-report} + [2024-04-23 3.00 HsH-class based on KOMA] +\let\HsHClassName\@currname +\def\HsHClassName@ParrentClass{% + scrreprt% } -\newif\if@german% -\newif\if@todos\@todosfalse% - -%% document options ------------------------------------------------------------------------------- -\DeclareOption{german}{ - \@germantrue +\RequirePackage{scrbase} +\RequirePackage{setspace} +\DefineFamily{HsH} +\DefineFamilyMember{HsH} +\newcommand{\HsH@Options@PassToParrent}[1]{% + \ClassInfoNoLine{\HsHClassName}{passing option to parrent class: #1}% + \PassOptionsToClass{#1}{\HsHClassName@ParrentClass}% } -\DeclareOption{ngerman}{ - \@germantrue +\newcommand{\HsH@Options@DeclareAlias}[3][HsH]{% + \DeclareOption{#2}{\FamilyExecuteOptions{#1}{#3}}% } -\DeclareOption{english}{ - \@germanfalse +\DefineFamilyKey{HsH}{fontfamily}{ + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } -\DeclareOption{f1}{ - \renewcommand{\HsHlogoPage}{2} +\HsH@Options@DeclareAlias{sans}{fontfamily=sans} +\HsH@Options@DeclareAlias{roman}{fontfamily=roman} +\DefineFamilyKey{HsH}{linespacing}{ + \begingroup + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } -\DeclareOption{f2}{ - \renewcommand{\HsHlogoPage}{3} +\HsH@Options@DeclareAlias{singlespacing}{linespacing=single} +\HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} +\HsH@Options@DeclareAlias{doublespacing}{linespacing=double} +\DefineFamilyKey{HsH}{parskip}{% + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tempa}{% + {never+}{0},% + {never*}{1},% + }{#1} + \if@atdocument + \ClassError{\HsHClassName}{ + option `parskip' can only be configured in preamble! + } + \fi + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.3333\linewidth \@plus 1fil}} + \or% 1 + \endgroup + \AtEndOfClass{\setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}} + \else% should never be + \endgroup + \fi + \else + \endgroup + \HsH@Options@PassToParrent{parskip=#1} + \FamilyKeyStateProcessed + \fi } -\DeclareOption{f3}{ - \renewcommand{\HsHlogoPage}{4} +\def\HsH@opt@headheight{} +\FamilyStringKey{HsH}{headheight}{\HsH@opt@headheight} +\AtEndOfClass{% + \headheight=\HsH@opt@headheight% } -\DeclareOption{f4}{ - \renewcommand{\HsHlogoPage}{5} +\DefineFamilyKey{HsH}{twoside}[semi]{% + \HsH@Options@PassToParrent{twoside=#1,BCOR=1cm} + \FamilyKeyStateProcessed } -\DeclareOption{f5}{ - \renewcommand{\HsHlogoPage}{6} +\def\HsH@opt@language{nil} +\FamilyStringKey{HsH}{language}{\HsH@opt@language} +\HsH@Options@DeclareAlias{english}{language=english} +\HsH@Options@DeclareAlias{german}{language=ngerman} +\HsH@Options@DeclareAlias{ngerman}{language=ngerman} +\def\HsH@opt@faculty{1} +\FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% + {none}{1}, {false}{1},% + {f1}{2}, {1}{2},% + {f2}{3}, {2}{3},% + {f3}{4}, {3}{4},% + {f4}{5}, {4}{5},% + {f5}{6}, {5}{6},% } -\DeclareOption{sans}{ - \renewcommand{\familydefault}{\sfdefault} +\HsH@Options@DeclareAlias{f1}{faculty=f1} +\HsH@Options@DeclareAlias{f2}{faculty=f2} +\HsH@Options@DeclareAlias{f3}{faculty=f3} +\HsH@Options@DeclareAlias{f4}{faculty=f4} +\HsH@Options@DeclareAlias{f5}{faculty=f5} +\FamilyBoolKey{HsH}{todos}{@todos} +\DefineFamilyKey{HsH}{@else@}{ + \HsH@Options@PassToParrent{#1} + \FamilyKeyStateProcessed } -\DeclareOption{roman}{ - \renewcommand{\familydefault}{\rmdefault} +\DeclareOption*{ + \HsH@Options@PassToParrent{\CurrentOption} } -\DeclareOption{todos}{ - \@todostrue +\FamilyExecuteOptions{HsH}{% + fontfamily=sans-serif, + fontsize=11pt, + language=ngerman, + parskip=half+, + linespacing=single, + headheight=2.15\baselineskip, + toc=listof, + toc=bibliography, + faculty=none, } -%% defere all other options to the base class -\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{scrreprt}} -\ExecuteOptions{fontsize=11pt,a4paper,ngerman,sans} % default options -\ProcessOptions\relax -%% Load KOMA class -\LoadClass{scrreprt} -\KOMAoption{toc}{bibliography,listof} - -%% package loading and config --------------------------------------------------------------------- -\PassOptionsToPackage{utf8}{inputenc} -\RequirePackage{inputenc} -\PassOptionsToPackage{T1}{fontenc} -\RequirePackage{fontenc} -\RequirePackage{lmodern} -\RequirePackage{graphicx} -\RequirePackage{amsmath} -\PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry} -\if@todos - \setlength{\marginparwidth}{6cm} - \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry} -\else - \PassOptionsToPackage{nomarginpar}{geometry} -\fi -\RequirePackage{geometry} -\if@german - \PassOptionsToPackage{ngerman}{babel} -\else - \PassOptionsToPackage{english}{babel} -\fi -\RequirePackage{babel} +\FamilyProcessOptions{HsH}\relax +\LoadClass{\HsHClassName@ParrentClass} +\RequirePackage[T1]{fontenc} +\RequirePackage{type1ec} +\RequirePackage[main=\HsH@opt@language]{babel} +\RequirePackage[autostyle=true]{csquotes} +\MakeOuterQuote{"} \iflanguage{ngerman}{\RequirePackage{ziffer}}{}% -\PassOptionsToPackage{headsepline}{scrlayer-scrpage} -\RequirePackage{scrlayer-scrpage} -\RequirePackage{scrhack} -\PassOptionsToPackage{hidelinks}{hyperref} -\RequirePackage{hyperref} -\PassOptionsToPackage{hypcap=true}{caption} -\RequirePackage{caption} +\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' \RequirePackage{bookmark} -\PassOptionsToPackage{babel}{csquotes} -\iflanguage{ngerman}{\PassOptionsToPackage{german=quotes}{csquotes}}{}% -\RequirePackage{csquotes} -\MakeOuterQuote{"} +\AtBeginDocument{ + \hypersetup{ + pdfinfo={ + Title={\@title}, + Author={\@author}, + Subject={\@subject}, + Keywords={\@keywords} + } + } +} \if@todos - \PassOptionsToPackage{svgnames}{xcolor} \PassOptionsToPackage{ textsize=small, figwidth=.6\textwidth }{todonotes} \RequirePackage{todonotes} - \setlength{\marginparwidth}{5.2cm} \else - \newcommand{\listoftodos}[1]{} - \newcommand{\todo}[2][]{} - \newcommand{\missingfigure}[2][]{} + \newcommand{\listoftodos}[1]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} \fi -\RequirePackage{pgffor} -%% options for not loaded packages ---------------------------------------------------------------- -\PassOptionsToPackage{backend=biber,style=alphabetic,sorting=nyt}{biblatex} +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage[svgnames]{xcolor} +\RequirePackage{scrhack} +\PassOptionsToPackage{backend=biber}{biblatex} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{biblatex}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} + }{}% + \makeatother +} \PassOptionsToPackage{free-standing-units}{siunitx} \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} - -%% title matters ---------------------------------------------------------------------------------- -\newcommand*{\@shorttitle}{\@empty} +\AtBeginDocument{ + \makeatletter + \InputIfFileExists{HsH-classes.cfg}{ + \ClassInfo{\HsHClassName}{Local config file HsH-classes.cfg used.} + }{ + \ClassInfo{\HsHClassName}{No HsH-classes.cfg!! I hope you configered it yourself.} + } + \makeatother +} +\newif\if@mainmatter\@mainmattertrue +\newcommand{\frontmatter}{ + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{Roman} +} +\newcommand{\mainmatter}{ + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmattertrue\pagenumbering{arabic} +} +\newcommand{\backmatter}{ + \if@openright\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{roman} +} +\newcommand{\HsHlogoPath}{HSH-Logo.pdf} +\newcommand{\HsHlogoPage}{\HsH@opt@faculty} +\newcommand{\includeHsHlogohere}[1][5cm]{ + \IfFileExists{\HsHlogoPath}{ + \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} + }{ + \ClassError{\HsHClassName}{\HsHlogoPath\space not found!}{ + The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location + } + } +} +\let\@author\@empty \renewcommand{\title}[2][]{ \gdef\@title{#2} \gdef\@shorttitle{#1} } -\newcommand*{\@matrikelnr}{} +\def\@shorttitle{\@empty} \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} -\newcommand*{\@professor}{} +\def\@matrikelnr{\@empty} \newcommand{\professor}[1]{\gdef\@professor{#1}} -\newcommand*{\@firstexaminer}{} +\def\@professor{\@empty} \newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} -\newcommand*{\@secondexaminer}{} +\def\@firstexaminer{\@empty} \newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} -\newcommand*{\@keywords}{} +\def\@secondexaminer{\@empty} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} -\let\@author\@empty -\let\@keywords\@empty - -%% typesetting indexes upright or standart -\def\subinrm#1{\sb{\mathrm{#1}}} -{\catcode`\_=13 \global\let_=\subinrm} -\newcommand\upsubscripts{\catcode`\_=12 } -\newcommand\normalsubscripts{\catcode`\_=8 } +\def\@keywords{\@empty} +\RequirePackage{pgffor} +\newcommand{\declarationofauthorship}[1][b]{ + \if#1b + \vspace*{\fill} + \hrule + \else\if#1t + \vspace*{2em} + \else + \ClassError{\HsHClassName}{Wrong Parameter for `\declarationofauthorship'}{ + `\string\declarationofauthorship' only accepts `t' and `b' as parameters. + } + \fi\fi + \vskip 3em + {\centering\bfseries\usekomafont{section}{\decofauthname}\par} + \vskip 3em + \decofauthtext\par + \begingroup + \renewcommand{\thanks}{\sbox0} + \raggedleft + \foreach \tmp@ in \@author { + \if\tmp@\empty\else + \hskip 1em \parbox{4cm}{ + \vskip 4em + \hrule\vskip 4pt + \raggedleft\footnotesize\tmp@ + }% + \fi + }\par + \endgroup +} +\newif\ifsingleauthor +\AtBeginDocument{ + \begingroup + \newcount\count@ + \count@=\z@ + \@for\tmp@:=\@author\do{\advance\count@\@ne} + \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \endgroup +} +\newcommand{\decofauthname}{Declaration of Authorship} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} +\newcommand{\decofauthtext}{Language not supported!} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space + \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own + making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space + \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including + disciplinary actions that may result from it. Any use of the works of any other author, in any form, + is properly acknowledged at their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die + folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und + unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial + unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines + Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space + bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. +} +\def\declarationAuthorship{% + \ClassWarning{\HsHClassName}{% + Command \string\declarationAuthorship\space is deprecate.\MessageBreak + Replace it with \string\declarationofauthorship. + }% + \declarationofauthorship% +} +\newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} +\def\@subinrm#1{\sb{\mathrm{#1}}} +{\catcode`\_=13 \global\let_=\@subinrm} +\newcommand\upsubscripts{\catcode`\_=12} +\newcommand\normalsubscripts{\catcode`\_=8} +\RequirePackage{lmodern} +\areaset[current]{0.75\paperwidth}{0.8\paperheight} +\if@todos + \addtolength\paperwidth{5cm} + \addtolength\marginparwidth{5cm} +\fi +\renewcommand{\fps@figure}{h!t} +\renewcommand{\fps@table}{h!t} +\g@addto@macro\@floatboxreset\centering +\setcapwidth{0.8\textwidth} +\defcaptionname{english}\figurename{Fig.} +\defcaptionname{german,ngerman}\figurename{Abb.} +\defcaptionname{english}\tablename{Tab.} +\defcaptionname{german,ngerman}\tablename{Tab.} +\AtBeginDocument{ + \makeatletter + \@ifpackageloaded{subfigure}{ + \let\subfigureautorefname\figureautorefname + }{}% + \makeatother +} +\renewcommand{\labelitemi}{\raisebox{.3ex}{\scalebox{0.7}{$\bullet$}}} +\renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} +\renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} +\renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} \upsubscripts - -%% header and footer -\clearpairofpagestyles -\ofoot*{\pagemark} +\raggedbottom +\let\layercontentsmeasure\relax +\RequirePackage{scrlayer-scrpage} +\FamilyOptions{KOMA}{headsepline,singlespacing=true} \newpagestyle{HsHheadings}{ { \parbox[b]{\sls@headwidth}{ @@ -194,151 +390,26 @@ {\hfill\pagemark} {\hfill\pagemark} } +\clearpairofpagestyles +\ofoot*{\pagemark} \pagestyle{HsHheadings} \automark{chapter} \renewcommand*{\chapterpagestyle}{HsHheadings} - -%% floats -\renewcommand{\fps@figure}{h!t} -\renewcommand{\fps@table}{h!t} -\ifx\KOMAScriptVersion\undefined\else - \g@addto@macro\@floatboxreset\centering - \setcapwidth{0.8\textwidth} -\fi -\iflanguage{english}{ - \renewcaptionname{english}{\figurename}{Fig.} - \renewcaptionname{english}{\tablename}{Tab.} -}{}% -\iflanguage{ngerman}{ - \renewcaptionname{ngerman}{\figurename}{Abb.} - \renewcaptionname{ngerman}{\tablename}{Tab.} - \renewcaptionname{ngerman}{\abstractname}{Abstract} -}{}% - -%% styling for itemize -\renewcommand{\labelitemi}{$\bullet$} -\renewcommand{\labelitemii}{$\circ$} -\renewcommand{\labelitemiii}{$-$} -\renewcommand{\labelitemiv}{$\cdot$} - -%% do stuff -\setlength\parindent{0pt} -\raggedbottom -\let\layercontentsmeasure\relax - -%% define easy shorthands to switch pagenumbering -\newif\if@mainmatter\@mainmattertrue -\newcommand*\frontmatter{% - \if@twoside\cleardoubleoddpage\else\clearpage\fi - \@mainmatterfalse\pagenumbering{Roman}% -} -\newcommand*\mainmatter{% - \if@twoside\cleardoubleoddpage\else\clearpage\fi - \@mainmattertrue\pagenumbering{arabic}% -} -\newcommand*\backmatter{% - \if@openright\cleardoubleoddpage\else\clearpage\fi - \@mainmatterfalse\pagenumbering{roman}% -} - -%% custom commands -\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} -\newcommand{\lowroman}[1]{\romannumeral#1\relax} - -%% load config at beginning of document -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{biblatex}{ - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{} - \@ifpackageloaded{subfigure}{ - \newcommand{\subfigureautorefname}{\figureautorefname} - }{} - \InputIfFileExists{config.tex}{ - \ClassInfo{\myClassName}{config.tex was found. Using it...} - }{ - \ClassInfo{\myClassName}{no config.tex!! I hope you configered it yourself.} - } - %% provide some usefull commands: - \providecommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} - \makeatother -} -%% nicer abstract --------------------------------------------------------------------------------- -\renewenvironment{abstract}{ - \quotation - \setlength\parindent{0pt} - \addchap{\abstractname} -}{% - \ifx\@keywords\@empty\else - \vskip 2em - \paragraph{% - \iflanguage{english}{Keywords}{}% - \iflanguage{ngerman}{Schlüsselwörter}{}% - } - \@keywords - \fi - \endquotation -} -%% declaration of Authorship ---------------------------------------------------------------------- -\iflanguage{english}{ - \setlocalecaption{english}{authorshipdeclaration}{Declaration of Authorship} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{authorshipdeclaration}{Selbstst\"andigkeitserkl\"arung} -}{}% -\newif\if@oneAuthor \@oneAuthortrue -\newcommand{\declarationofauthorship}[1][b]{ - \let\@param#1 - \renewcommand{\thanks}{\sbox0} - \foreach \x [count=\i] in \@author{\ifnum\i>1\global\@oneAuthorfalse\fi} - \thispagestyle{plain} - \if\@param b\vspace*{\fill}\fi - {\rule{\textwidth}{0.1pt}} - \vskip 3em - {\centering\huge\bfseries\authorshipdeclarationname\par} - \vskip 3em - \iflanguage{english}{ - \if@oneAuthor I\else We\fi\space hereby certify that the work \if@oneAuthor I\else we\fi\space \if@oneAuthor am\else are\fi\space submitting - is entirely of \if@oneAuthor my\else our\fi own making except where otherwise indicated. \if@oneAuthor I\else We\fi\space - \if@oneAuthor am\else are\fi\space aware of regulations concerning plagiarism, including disciplinary actions that may result from it. Any use - of the works of any other author, in any form, is properly acknowledged at their point of use. \par - }{}% - \iflanguage{ngerman}{ - Hiermit best{\"a}tige\if@oneAuthor\else n\fi\space \if@oneAuthor ich\else wir\fi, dass die folgende Arbeit eigenst{\"a}ndig von - \if@oneAuthor mir\else uns\fi\space allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem - Arbeitsmaterial unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines Plagiats, inklusive - disziplinarischer Ma{\ss}nahmen, sind \if@oneAuthor mir\else uns\fi\space bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmen - als solche kenntlich gemacht. \par - }{}% - {\raggedleft - \foreach \x in \@author{ - \begin{tabular}[t]{r} - \\[3em] - \rule{4cm}{0.4pt}\\ - {\footnotesize\x} - \end{tabular} - } - \par} - \if\@param t\vspace*{\fill}\fi -} -\let\declarationAuthorship\declarationofauthorship - -%% reconfig Titlepage ----------------------------------------------------------------------------- -\iflanguage{english}{ - \setlocalecaption{english}{professor}{Professor} - \setlocalecaption{english}{firstexaminer}{First examiner} - \setlocalecaption{english}{secondexaminer}{Second examiner} -}{}% -\iflanguage{ngerman}{ - \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} - \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} - \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} -}{}% +\newcommand{\professortext}{Professor} +\newcommand{\firstexaminertext}{First examiner} +\newcommand{\secondexaminertext}{Second examiner} +\newcaptionname{english}\professortext{Professor} +\newcaptionname{english}\firstexaminertext{First examiner} +\newcaptionname{english}\secondexaminertext{Second examiner} +\newcaptionname{german,ngerman}\professortext{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{german,ngerman}\firstexaminertext{Erstpr{\"u}fer(in)} +\newcaptionname{german,ngerman}\secondexaminertext{Zweitpr{\"u}fer(in)} \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} +\g@addto@macro\titlepage{\singlespacing} \renewcommand\maketitle[1][l]{ \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax \else @@ -352,7 +423,8 @@ \let\@param#1 \ifx\@param\@empty \ClassError{\myClassName}{\maketitle\space with empty option}{ - \maketitle[] has been called with an empty parameter, this doesn't work. Use \maketitle instead. + \maketitle[] has been called (with an empty parameter), this doesn't work. + Use \maketitle instead. } \fi \if@titlepageiscoverpage @@ -455,9 +527,9 @@ \if\@param l\begin{tabular}{@{}l l}\fi \if\@param c\begin{tabular}{l l}\fi \if\@param r\begin{tabular}{r r@{}}\fi - \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi - \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi - \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi + \if\@professor\@empty\else\textbf{\professortext:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminertext:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminertext:}&\@secondexaminer\\\fi \end{tabular} } \par diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index b865a5f11fe6a576d6eb36f273ef5b31460f53e5..cfcfa1540c5a0c0f20b548c01fcd68afe35a6d22 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -5,108 +5,235 @@ %% The original source files were: %% %% HsH-classes.dtx (with options: `standalone') -%% -%% This is a generated file. -%% -%% Copyright (C) 2021 by Jan Wille <mail@janwille.de> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.3 of this license -%% or (at your option) any later version. The latest version of this -%% license is in: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% and version 1.3 or later is part of all distributions of LaTeX version -%% 2021/01/01 or later. -%% -\typeout{Adapted from KOMA script for use in Hochschule Hannover <2024-04-18> Jan Wille} -\NeedsTeXFormat{LaTeX2e} -\newcommand{\myClassName}{HsH-standalone} -\ProvidesClass{\myClassName}[2024/04/18 v2.2 HsH-Class based on KOMA] - -%% commands for HsH-logo -\newcommand{\HsHlogoPath}{HSH-Logo.pdf} -\newcommand{\HsHlogoPage}{1} -\newcommand{\includeHsHlogohere}[1][5cm]{ - \IfFileExists{\HsHlogoPath}{}{ - \ClassError{\myClassName}{HsH-Logo.pdf not found!}{ - The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location - } - } - \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} -} -\newif\if@german% - -%% document options ------------------------------------------------------------------------------- -\DeclareOption{german}{ - \@germantrue +%% +%% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +\NeedsTeXFormat{LaTeX2e}[2022-06-01] +\ProvidesClass{HsH-standalone} + [2024-04-23 3.00 HsH-class based on KOMA] +\let\HsHClassName\@currname +\def\HsHClassName@ParrentClass{% + standalone% } -\DeclareOption{ngerman}{ - \@germantrue +\RequirePackage{scrbase} +\RequirePackage{setspace} +\DefineFamily{HsH} +\DefineFamilyMember{HsH} +\newcommand{\HsH@Options@PassToParrent}[1]{% + \ClassInfoNoLine{\HsHClassName}{passing option to parrent class: #1}% + \PassOptionsToClass{#1}{\HsHClassName@ParrentClass}% } -\DeclareOption{english}{ - \@germanfalse +\newcommand{\HsH@Options@DeclareAlias}[3][HsH]{% + \DeclareOption{#2}{\FamilyExecuteOptions{#1}{#3}}% } -\DeclareOption{f1}{ - \renewcommand{\HsHlogoPage}{2} +\DefineFamilyKey{HsH}{fontfamily}{ + \begingroup + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } -\DeclareOption{f2}{ - \renewcommand{\HsHlogoPage}{3} +\HsH@Options@DeclareAlias{sans}{fontfamily=sans} +\HsH@Options@DeclareAlias{roman}{fontfamily=roman} +\def\HsH@opt@language{nil} +\FamilyStringKey{HsH}{language}{\HsH@opt@language} +\HsH@Options@DeclareAlias{english}{language=english} +\HsH@Options@DeclareAlias{german}{language=ngerman} +\HsH@Options@DeclareAlias{ngerman}{language=ngerman} +\def\HsH@opt@faculty{1} +\FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% + {none}{1}, {false}{1},% + {f1}{2}, {1}{2},% + {f2}{3}, {2}{3},% + {f3}{4}, {3}{4},% + {f4}{5}, {4}{5},% + {f5}{6}, {5}{6},% } -\DeclareOption{f3}{ - \renewcommand{\HsHlogoPage}{4} +\HsH@Options@DeclareAlias{f1}{faculty=f1} +\HsH@Options@DeclareAlias{f2}{faculty=f2} +\HsH@Options@DeclareAlias{f3}{faculty=f3} +\HsH@Options@DeclareAlias{f4}{faculty=f4} +\HsH@Options@DeclareAlias{f5}{faculty=f5} +\FamilyBoolKey{HsH}{todos}{@todos} +\DefineFamilyKey{HsH}{fontsize}{% + \ClassInfoNoLine{\HsHClassName}{The `fontsize' option is only a mock, its has not effect} + \FamilyKeyStateProcessed } -\DeclareOption{f4}{ - \renewcommand{\HsHlogoPage}{5} +\DefineFamilyKey{HsH}{@else@}{ + \HsH@Options@PassToParrent{#1} + \FamilyKeyStateProcessed } -\DeclareOption{f5}{ - \renewcommand{\HsHlogoPage}{6} +\DeclareOption*{ + \HsH@Options@PassToParrent{\CurrentOption} } -\DeclareOption{sans}{ - \renewcommand{\familydefault}{\sfdefault} +\FamilyExecuteOptions{HsH}{% + fontfamily=sans-serif, + faculty=none, + margin=0.25cm, + multi=tikzpicture, + multi=circuitikz, } -\DeclareOption{roman}{ - \renewcommand{\familydefault}{\rmdefault} +\FamilyProcessOptions{HsH}\relax +\LoadClass{\HsHClassName@ParrentClass} +\RequirePackage[T1]{fontenc} +\RequirePackage{type1ec} +\RequirePackage[main=\HsH@opt@language]{babel} +\RequirePackage[autostyle=true]{csquotes} +\MakeOuterQuote{"} +\iflanguage{ngerman}{\RequirePackage{ziffer}}{}% +\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' +\RequirePackage{bookmark} +\AtBeginDocument{ + \hypersetup{ + pdfinfo={ + Title={\@title}, + Author={\@author}, + Subject={\@subject}, + Keywords={\@keywords} + } + } } -%% defere all other options to the base class -\DeclareOption*{\expandafter\PassOptionsToClass\expandafter{\CurrentOption}{standalone}} -\ExecuteOptions{margin=0.25cm,fontsize=11pt,a4paper,ngerman,sans} % default options -\ProcessOptions\relax -%% Load KOMA class -\LoadClass[multi=tikzpicture,multi=circuitikz]{standalone} - -%% package loading and config --------------------------------------------------------------------- -\PassOptionsToPackage{utf8}{inputenc} -\RequirePackage{inputenc} -\PassOptionsToPackage{T1}{fontenc} -\RequirePackage{fontenc} -\RequirePackage{lmodern} +\if@todos + \PassOptionsToPackage{ + textsize=small, + figwidth=.6\textwidth + }{todonotes} + \RequirePackage{todonotes} +\else + \newcommand{\listoftodos}[1]{} + \newcommand{\todo}[2][]{} + \newcommand{\missingfigure}[2][]{} +\fi +\RequirePackage[hypcap=true]{caption} \RequirePackage{graphicx} -\RequirePackage{amsmath} -%% options for not loaded packages ---------------------------------------------------------------- +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage[svgnames]{xcolor} +\RequirePackage{scrhack} \PassOptionsToPackage{free-standing-units}{siunitx} \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} - -%% typesetting indexes upright or standart -\def\subinrm#1{\sb{\mathrm{#1}}} -{\catcode`\_=13 \global\let_=\subinrm} -\newcommand\upsubscripts{\catcode`\_=12 } -\newcommand\normalsubscripts{\catcode`\_=8 } -\upsubscripts - -%% load config at beginning of document \AtBeginDocument{ \makeatletter - \InputIfFileExists{config.tex}{ - \ClassInfo{\myClassName}{config.tex was found. Using it...} + \InputIfFileExists{HsH-classes.cfg}{ + \ClassInfo{\HsHClassName}{Local config file HsH-classes.cfg used.} }{ - \ClassInfo{\myClassName}{no config.tex!! I hope you configered it yourself.} + \ClassInfo{\HsHClassName}{No HsH-classes.cfg!! I hope you configered it yourself.} } - %% provide some usefull commands: - \providecommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \makeatother } +\newcommand{\HsHlogoPath}{HSH-Logo.pdf} +\newcommand{\HsHlogoPage}{\HsH@opt@faculty} +\newcommand{\includeHsHlogohere}[1][5cm]{ + \IfFileExists{\HsHlogoPath}{ + \includegraphics[width=#1,page=\HsHlogoPage]{\HsHlogoPath} + }{ + \ClassError{\HsHClassName}{\HsHlogoPath\space not found!}{ + The HsH Logo is necasary for the titlepage! Try putting it next to your source file or use \HsHlogoPath to define the file location + } + } +} +\RequirePackage{pgffor} +\newcommand{\declarationofauthorship}[1][b]{ + \if#1b + \vspace*{\fill} + \hrule + \else\if#1t + \vspace*{2em} + \else + \ClassError{\HsHClassName}{Wrong Parameter for `\declarationofauthorship'}{ + `\string\declarationofauthorship' only accepts `t' and `b' as parameters. + } + \fi\fi + \vskip 3em + {\centering\bfseries\usekomafont{section}{\decofauthname}\par} + \vskip 3em + \decofauthtext\par + \begingroup + \renewcommand{\thanks}{\sbox0} + \raggedleft + \foreach \tmp@ in \@author { + \if\tmp@\empty\else + \hskip 1em \parbox{4cm}{ + \vskip 4em + \hrule\vskip 4pt + \raggedleft\footnotesize\tmp@ + }% + \fi + }\par + \endgroup +} +\newif\ifsingleauthor +\AtBeginDocument{ + \begingroup + \newcount\count@ + \count@=\z@ + \@for\tmp@:=\@author\do{\advance\count@\@ne} + \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \endgroup +} +\newcommand{\decofauthname}{Declaration of Authorship} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} +\newcommand{\decofauthtext}{Language not supported!} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space + \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own + making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space + \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including + disciplinary actions that may result from it. Any use of the works of any other author, in any form, + is properly acknowledged at their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die + folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und + unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial + unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines + Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space + bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. +} +\def\declarationAuthorship{% + \ClassWarning{\HsHClassName}{% + Command \string\declarationAuthorship\space is deprecate.\MessageBreak + Replace it with \string\declarationofauthorship. + }% + \declarationofauthorship% +} +\newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} +\def\@subinrm#1{\sb{\mathrm{#1}}} +{\catcode`\_=13 \global\let_=\@subinrm} +\newcommand\upsubscripts{\catcode`\_=12} +\newcommand\normalsubscripts{\catcode`\_=8} +\RequirePackage{lmodern} +\renewcommand{\labelitemi}{\raisebox{.3ex}{\scalebox{0.7}{$\bullet$}}} +\renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} +\renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} +\renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} +\upsubscripts +\raggedbottom +\let\layercontentsmeasure\relax \endinput %% %% End of file `HsH-standalone.cls'. diff --git a/src/README.md b/src/README.md index 768541f69ff38c131774b57337e889b6d342abda..e97a3413a542e91d495cf2242be68f8d08236218 100644 --- a/src/README.md +++ b/src/README.md @@ -1,3 +1,10 @@ -# The sources Folder + HsH-classes | LaTeX for the Hochschule Hannover + -----------:| ------------------------------------------------------------ + Author | Jan Wille + E-mail | <mail@janiwlle.de> + License | Released under the LaTeX Project Public License v1.3c or later + See | <http://www.latex-project.org/lppl.txt> -This folder is for additional source files. It provides the custom classes and support files. \ No newline at end of file +This Project containes classes to create documents for the Hochschule Hannover. + +To use them in you projects bring this folder on you `TEXINPUTS`. diff --git a/src/help_clsguide.pdf b/src/help_clsguide.pdf deleted file mode 100644 index 767f8aa0274f89faa51f8c837cef7ea011305bf0..0000000000000000000000000000000000000000 Binary files a/src/help_clsguide.pdf and /dev/null differ diff --git a/src/help_hefferon.pdf b/src/help_hefferon.pdf deleted file mode 100644 index 2a9853fe23af353c82d3a682b0ea7f89190ed433..0000000000000000000000000000000000000000 Binary files a/src/help_hefferon.pdf and /dev/null differ diff --git a/svg/exampleSVG.pdf b/svg/exampleSVG.pdf deleted file mode 100644 index cb71c5bdc1ed0449d19217d2efc814b8a997aba5..0000000000000000000000000000000000000000 --- a/svg/exampleSVG.pdf +++ /dev/null @@ -1,69 +0,0 @@ -%PDF-1.5 -%���� -4 0 obj -<< /Length 5 0 R - /Filter /FlateDecode ->> -stream -x�m��i1F�B Dѯ-��B`7��!I��ށ����>?���{���|�����s��w��oSE�P8�0B�t�S��{�g�h�9����V�լ�8�/��V&\.8}Z9�0`J�Y1�nɂ]x�z�G��e�ʕ�TN�QiS�B�-Y�//�u��|�f$�%�� p.�*"�����`Os��a{�T�=�����-��8}�n^��csX�e�vko�@!c[ -endstream -endobj -5 0 obj - 233 -endobj -3 0 obj -<< - /ExtGState << - /a0 << /CA 1 /ca 1 >> - >> ->> -endobj -2 0 obj -<< /Type /Page % 1 - /Parent 1 0 R - /MediaBox [ 0 0 69.075493 34.604038 ] - /Contents 4 0 R - /Group << - /Type /Group - /S /Transparency - /I true - /CS /DeviceRGB - >> - /Resources 3 0 R ->> -endobj -1 0 obj -<< /Type /Pages - /Kids [ 2 0 R ] - /Count 1 ->> -endobj -6 0 obj -<< /Producer (cairo 1.16.0 (https://cairographics.org)) - /Creator <FEFF0049006E006B0073006300610070006500200031002E00300020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029> - /CreationDate (D:20210411142101+02'00) ->> -endobj -7 0 obj -<< /Type /Catalog - /Pages 1 0 R ->> -endobj -xref -0 8 -0000000000 65535 f -0000000649 00000 n -0000000419 00000 n -0000000347 00000 n -0000000015 00000 n -0000000325 00000 n -0000000714 00000 n -0000000989 00000 n -trailer -<< /Size 8 - /Root 7 0 R - /Info 6 0 R ->> -startxref -1041 -%%EOF diff --git a/test.pdf b/test.pdf index fb41c150782f1a49963e3c7b3cc3d14a8f52d304..bcb14ffd00546c305ea11344c312e6a80d0129d2 100644 Binary files a/test.pdf and b/test.pdf differ diff --git a/test.tex b/test.tex index 86e2ee9b25f4e3bbe763b8621a929638952f28ef..7c43a7b3ead61141fb1e03b8cb802658695c87a9 100644 --- a/test.tex +++ b/test.tex @@ -1,111 +1,71 @@ -\documentclass[todos,f1]{HsH-report} +\documentclass[todos=off]{HsH-report} -\usepackage{color} \usepackage{lipsum} -\usepackage{siunitx} -\usepackage{biblatex} -\usepackage{soul} -\addbibresource{bib/localBibliography.bib} +% \usepackage{showframe} %% documents personal data: \author{ Max Mustermann, Mira Musterfrau } -\matrikelnr{ - 1234567, - 9876543 -} \titlehead{titlehead} \subject{Subject} -\title[short title]{long and elaborate title that just goes on and on witout stopping} +\title{long and elaborate title that just goes on and on without stopping} \subtitle{Subtitle} \date{\today} -\professor{Professor} -\keywords{test, baum} +\keywords{test, wow} + +\defcaptionname{german,ngerman}\abstractname{Abstract} \begin{document} + \frontmatter + \maketitle + + \declarationofauthorship + + \begin{abstract} + \lipsum[3-5] + \end{abstract} + + \tableofcontents + \mainmatter + + \chapter{test} + \includeHsHlogohere + + Hällo\todo{drop the Ä?} "Welt", ist daß nicht schön? $3.1$ oder $3,2$ + + \begin{equation} + A_1 = \sum_{i=0}^{10} B_i + \abs{\frac{x}{2}} + \end{equation} + + \begin{itemize} + \item Hello World + \item test + \begin{itemize} + \item Hello World + \item test + \begin{itemize} + \item Hello World + \item test + \begin{itemize} + \item Hello World + \item test + \end{itemize} + \end{itemize} + \end{itemize} + \end{itemize} + + \section{superlong and elaborat title that will spand multiple lines, as it is just to big} + \lipsum[12-13] + \smallskip + + \lipsum[12-13] + + \todo[inline]{add another paragraph?} + + \lipsum[12-13] + -\pagenumbering{Roman} -\maketitle -\declarationAuthorship - -\begin{abstract} - \lipsum[5-8] -\end{abstract} - -\tableofcontents - -\cleardoublepage % unbedingt erforderlich bei Doppelseitigem layout vor neuer Seitennummerierung! -\pagenumbering{arabic} % Seitennummerierung normale zahlen - -\chapter{very precice chapterheading with a bounch of important information} - \label{chap: one} - {\color{red}test} und stuff - \begin{figure} - \centering - \includegraphics[width=.6\textwidth]{img/lorem-ipsum.jpg} - \caption{test} - \end{figure} - - title test: \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi - - noch ein test \normalsubscripts$R_t$ \upsubscripts$R_t$ - - mit einheit: $R=200\,\mohm+ \SI{0.34567453}{\volt\per\metre}$ - \cite{laboranleitung:physik} - \vspace{2cm}\\ - eine zahl: $3,5+3.5$\footnote[1]{hello}\\ - - Tiny: {\tiny hello} \todo{test} Small: {\small hello} - - \makeatletter - \newcommand{\test}[1][l]{ - { - \def\t{#1} - \if\t l left - \else - right - \fi - } - } - \test; \test[right] \todo{super long todo that mus be going over multiple lines} - - \lipsum[5-6] - - \pagebreak - \begin{figure} - \centering - \includegraphics[width=0.6\textwidth, page=2]{plt/examplePlot.pdf} - \caption{a nice plot } - \end{figure} - - test text\todo{why this?} - - \begin{figure} - \centering - \includegraphics{crc/exampleCircuit.pdf} - \caption{a circuit diagramm} - \end{figure} - - \makeatletter - - \begin{figure} - \graphicspath{{svg/}} % double curly brackets needet for unknown reason - \input{svg/exampleSVG.pdf_tex} - \caption{made via inkscape} - \end{figure} - - \begin{table} - \caption{hello} - \begin{tabular}{c|c} - test & hello \\\hline\hline - 1 & 2 \\ - \multicolumn{2}{|c|}{temp} - \end{tabular} - \end{table} - -\printbibliography -\listoffigures \end{document}