Skip to content
Snippets Groups Projects
HsH-classes.dtx 26.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • %^^A !TeX root = ./HsH-classes.dtx
    
    Jan Wille's avatar
    Jan Wille committed
    % \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>
    
    Jan Wille's avatar
    Jan Wille committed
    % \fi
    %
    
    % \iffalse
    %<*driver>
    \documentclass{ltxdoc}
    \begin{document}
    \end{document}
    %</driver>
    % \fi
    
    Jan Wille's avatar
    Jan Wille committed
    %<*article|report|standalone>
    
    Jan Wille's avatar
    Jan Wille committed
    \typeout{Adapted from KOMA script for use in Hochschule Hannover <2023-08-12> Jan Wille}
    
    Jan Wille's avatar
    Jan Wille committed
    \NeedsTeXFormat{LaTeX2e}
    %
    
    %<article>\newcommand{\HsHClassName}{HsH-article}
    %<report>\newcommand{\HsHClassName}{HsH-report}
    %<standalone>\newcommand{\HsHClassName}{HsH-standalone}
    \ProvidesClass{\HsHClassName}[2023/08/12 v2.1 HsH-Class based on KOMA]
    
    Jan Wille's avatar
    Jan Wille committed
    
    %% commands for HsH-logo
    \newcommand{\HsHlogoPath}{HSH-Logo.pdf}
    \newcommand{\HsHlogoPage}{1}
    
    \newcommand{\includeHsHlogohere}[1][5cm]{
      \IfFileExists{\HsHlogoPath}{}{
    
        \ClassError{\HsHClassName}{HsH-Logo.pdf not found!}{
    
    Jan Wille's avatar
    Jan Wille committed
          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}
    }
    
    Jan Wille's avatar
    Jan Wille committed
    \newif\if@german%
    
    Jan Wille's avatar
    Jan Wille committed
    %<article|report>\newif\if@todos\@todosfalse%
    
    Jan Wille's avatar
    Jan Wille committed
    
    %% document options -------------------------------------------------------------------------------
    
    \DeclareOption{german}{
    
    Jan Wille's avatar
    Jan Wille committed
      \@germantrue
    }
    
    \DeclareOption{ngerman}{
    
    Jan Wille's avatar
    Jan Wille committed
      \@germantrue
    }
    
    \DeclareOption{english}{
    
    Jan Wille's avatar
    Jan Wille committed
      \@germanfalse
    }
    
    \DeclareOption{f1}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\HsHlogoPage}{2}
    }
    
    \DeclareOption{f2}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\HsHlogoPage}{3}
    }
    
    \DeclareOption{f3}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\HsHlogoPage}{4}
    }
    
    \DeclareOption{f4}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\HsHlogoPage}{5}
    }
    
    \DeclareOption{f5}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\HsHlogoPage}{6}
    }
    
    \DeclareOption{sans}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\familydefault}{\sfdefault}
    }
    
    \DeclareOption{roman}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\familydefault}{\rmdefault}
    }
    
    Jan Wille's avatar
    Jan Wille committed
    %<*article|report>
    \DeclareOption{todos}{
      \@todostrue
    }
    %</article|report>
    
    %
    %% defere all other options to the base class
    
    Jan Wille's avatar
    Jan Wille committed
    %<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
    
    Jan Wille's avatar
    Jan Wille committed
    \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}
    
    Jan Wille's avatar
    Jan Wille committed
    %
    % required for importing images
    \RequirePackage{graphicx}
    %
    % a lot of nice Math
    \RequirePackage{amsmath}
    %
    %<*article|report>
    % required for changing layout
    
    Jan Wille's avatar
    Jan Wille committed
    \PassOptionsToPackage{vmargin=6\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry}
    
    Jan Wille's avatar
    Jan Wille committed
    \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
    
    Jan Wille's avatar
    Jan Wille committed
      \setlength{\marginparwidth}{6cm}
      \PassOptionsToPackage{paperwidth=\dimexpr +0.915\paperwidth+\marginparsep+\marginparwidth+0.25cm, right=\dimexpr +\marginparsep+\marginparwidth+0.25cm}{geometry}
    
    Jan Wille's avatar
    Jan Wille committed
    \else
    
      \PassOptionsToPackage{nomarginpar}{geometry}
    
    Jan Wille's avatar
    Jan Wille committed
    \fi
    
    Jan Wille's avatar
    Jan Wille committed
    \RequirePackage{geometry}
    
    Jan Wille's avatar
    Jan Wille committed
    %
    % language specific localisation
    
    \if@german
      \PassOptionsToPackage{ngerman}{babel}
    \else
      \PassOptionsToPackage{english}{babel}
    \fi
    
    Jan Wille's avatar
    Jan Wille committed
    \RequirePackage{babel}
    %
    
    % german dezimal numbers
    \iflanguage{ngerman}{\RequirePackage{ziffer}}{}%
    %
    
    Jan Wille's avatar
    Jan Wille committed
    % 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}
    %
    
    Jan Wille's avatar
    Jan Wille committed
    % generat bookmarkes
    \RequirePackage{bookmark}
    %
    % quotations
    \PassOptionsToPackage{babel}{csquotes}
    
    \iflanguage{ngerman}{\PassOptionsToPackage{german=quotes}{csquotes}}{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \RequirePackage{csquotes}
    % this makes quotationmarks usable in text:
    \MakeOuterQuote{"}
    %
    
    Jan Wille's avatar
    Jan Wille committed
    % 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]{}
    
    Jan Wille's avatar
    Jan Wille committed
    \fi
    %
    
    Jan Wille's avatar
    Jan Wille committed
    % foreach loops
    \RequirePackage{pgffor}
    %
    %</article|report>
    %
    
    %% options for not loaded packages ----------------------------------------------------------------
    
    Jan Wille's avatar
    Jan Wille committed
    %<article|report>\PassOptionsToPackage{backend=biber,style=alphabetic,sorting=nyt}{biblatex}
    
    \PassOptionsToPackage{free-standing-units}{siunitx}
    
    Jan Wille's avatar
    Jan Wille committed
    \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
    
    %
    
    Jan Wille's avatar
    Jan Wille committed
    %% 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}}
    
    Jan Wille's avatar
    Jan Wille committed
    \let\@author\@empty
    \let\@keywords\@empty
    
    
    Jan Wille's avatar
    Jan Wille committed
    %
    %% 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
    
    Jan Wille's avatar
    Jan Wille committed
    % first clear the default styles
    \clearpairofpagestyles
    % than we set the pagenumber for the plain and normal style
    
    Jan Wille's avatar
    Jan Wille committed
    %
    % 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
        }%
    
        \parbox[b]{.45\sls@headwidth}{
          \LaTeXraggedleft
          \headmark
        }%
    
      }
      (\textwidth,.1pt)
    }{
      {\pagemark}
      {\hfill\pagemark}
      {\hfill\pagemark}
    }
    \pagestyle{HsHheadings}
    
    Jan Wille's avatar
    Jan Wille committed
    %<article>\automark{section}
    
    %<report>\automark{chapter}
    
    Jan Wille's avatar
    Jan Wille committed
    % Chaptertitles get same header/footer as everything:
    
    %<report>\renewcommand*{\chapterpagestyle}{HsHheadings}
    
    Jan Wille's avatar
    Jan Wille committed
    
    %% 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}
    
    Jan Wille's avatar
    Jan Wille committed
    \fi
    % abbreviations for names:
    
    \iflanguage{english}{
      \renewcaptionname{english}{\figurename}{Fig.}
      \renewcaptionname{english}{\tablename}{Tab.}
    }{}%
    \iflanguage{ngerman}{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcaptionname{ngerman}{\figurename}{Abb.}
      \renewcaptionname{ngerman}{\tablename}{Tab.}
      \renewcaptionname{ngerman}{\abstractname}{Abstract}
    
    Jan Wille's avatar
    Jan Wille committed
    
    %% 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
    
    Jan Wille's avatar
    Jan Wille committed
    \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}%
    
    Jan Wille's avatar
    Jan Wille committed
    %% custom commands
    
    % these two comand can convert decimal number into roman numerrals in etheir upper- or lowercase
    
    Jan Wille's avatar
    Jan Wille committed
    \newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}}
    \newcommand{\lowroman}[1]{\romannumeral#1\relax}
    
    Jan Wille's avatar
    Jan Wille committed
    %</article|report>
    %
    %% load config at beginning of document
    \AtBeginDocument{
      \makeatletter
    
    %<*!standalone>
    
    Jan Wille's avatar
    Jan Wille committed
    % solve some common errors:
      \@ifpackageloaded{biblatex}{
    % solves fontype warning in San-Serif
        \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}}
      }{}
      \@ifpackageloaded{subfigure}{
        \newcommand{\subfigureautorefname}{\figureautorefname}
      }{}
    
    %</!standalone>
    
    Jan Wille's avatar
    Jan Wille committed
      \InputIfFileExists{HsH-classes.cfg}{
    
        \ClassInfo{\HsHClassName}{HsH-classes.cfg was found. Using it...}
    
    Jan Wille's avatar
    Jan Wille committed
      }{
    
        \ClassInfo{\HsHClassName}{no HsH-classes.cfg!! I hope you configered it yourself.}
    
    Jan Wille's avatar
    Jan Wille committed
      }
      %% provide some usefull commands:
    % Makro for vertical lines around absolute values
      \providecommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}}
      \makeatother
    }
    %
    
    Jan Wille's avatar
    Jan Wille committed
    %% nicer abstract ---------------------------------------------------------------------------------
    
    \renewenvironment{abstract}{
      \quotation
      \setlength\parindent{0pt}
    
      \addchap{\abstractname}
    
    Jan Wille's avatar
    Jan Wille committed
    }{%
      \ifx\@keywords\@empty\else
    
        \paragraph{%
          \iflanguage{english}{Keywords}{}%
          \iflanguage{ngerman}{Schlüsselwörter}{}%
        }
    
    Jan Wille's avatar
    Jan Wille committed
        \@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
    
    Jan Wille's avatar
    Jan Wille committed
    \newif\if@oneAuthor \@oneAuthortrue
    
    %
    % this is the actuall command:
    
    \newcommand{\declarationofauthorship}[1][b]{
    
    Jan Wille's avatar
    Jan Wille committed
      \renewcommand{\thanks}{\sbox0}
      \foreach \x [count=\i] in \@author{\ifnum\i>1\global\@oneAuthorfalse\fi}
      \thispagestyle{plain}
    
      \if\@param b\vspace*{\fill}\fi
    
    Jan Wille's avatar
    Jan Wille committed
      {\rule{\textwidth}{0.1pt}}
      \vskip 3em
    
      {\centering\huge\bfseries\authorshipdeclarationname\par}
    
    Jan Wille's avatar
    Jan Wille committed
      \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
      }{}%
    
    Jan Wille's avatar
    Jan Wille committed
      {\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
    
    
    Jan Wille's avatar
    Jan Wille committed
    %
    %% 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)}
    }{}%
    
    Jan Wille's avatar
    Jan Wille committed
    \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{}}
    
    Jan Wille's avatar
    Jan Wille committed
    \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{\HsHClassName}{\maketitle\space with empty option}{
    
    Jan Wille's avatar
    Jan Wille committed
            \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
    
    Jan Wille's avatar
    Jan Wille committed
                \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi
    
                \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi
    
    Jan Wille's avatar
    Jan Wille committed
            \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}
          }
    
    Jan Wille's avatar
    Jan Wille committed
    %<*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>
    
    Jan Wille's avatar
    Jan Wille committed
    %
    % Config file -------------------------------------------------------------------------------------
    %<*config>
    %% Meta Data for the PDF file
    \@ifpackageloaded{hyperref}{
      \hypersetup{
        pdfinfo={
          Title={\@title},
          Author={\@author},
          Subject={\@subject},
          Keywords={\@keywords}
        }
      }
    
    Jan Wille's avatar
    Jan Wille committed
    %% configs for optional packages:
    \@ifpackageloaded{biblatex}{
      \ExecuteBibliographyOptions{
        bibwarn=true,
        url=true,
        isbn=false,
      }
    }{}
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{todonotes}{
      \setuptodonotes{
        backgroundcolor=orange!60!white,
        linecolor=orange,
        bordercolor=white
      }
    }{}
    
    Jan Wille's avatar
    Jan Wille committed
    \@ifpackageloaded{siunitx}{
    
      \iflanguage{ngerman}{
    
    Jan Wille's avatar
    Jan Wille committed
        \sisetup{output-decimal-marker={,}} % use comma as dezimal
    
    Jan Wille's avatar
    Jan Wille committed
      \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}{
    
    Jan Wille's avatar
    Jan Wille committed
      \PassOptionsToPackage{svgnames}{xcolor}
      \RequirePackage{xcolor}
    
      \RequirePackage{lstautogobble}
    
    Jan Wille's avatar
    Jan Wille committed
      \lstset{
        commentstyle=\color{gray},
    
    Jan Wille's avatar
    Jan Wille committed
        keywordstyle=\color{FireBrick}\bfseries,
        stringstyle=\color{DodgerBlue},
    
    Jan Wille's avatar
    Jan Wille committed
        showstringspaces=false,
        basicstyle=\ttfamily,
        tabsize=4,
        literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1,
        escapeinside={(*@}{@*)},
    
        autogobble=true,
    
    Jan Wille's avatar
    Jan Wille committed
      }
    }{}
    \@ifpackageloaded{enumitem}{
    
      \RequirePackage{amssymb}
    
    Jan Wille's avatar
    Jan Wille committed
      \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}{
    
    Jan Wille's avatar
    Jan Wille committed
        \pgfplotsset{/pgf/number format/use comma}
    
    Jan Wille's avatar
    Jan Wille committed
      \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