Skip to content
Snippets Groups Projects
Commit 078e3874 authored by Jannik Dunkelau's avatar Jannik Dunkelau
Browse files

Move ToC lines for LOA and LOL into styling commands

parent b60e40c3
Branches
No related tags found
No related merge requests found
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hhuthesis}[2020/06/22 HHU Thesis LaTeX document class v1.16]
\ProvidesClass{hhuthesis}[2020/09/03 HHU Thesis LaTeX document class v1.17]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} % Options fallback.
\ProcessOptions\relax
......@@ -207,7 +207,7 @@
\ifprintblackwhite\color{black}\else\color{hhublue}\fi\bfseries#1}
\newcommand{\lststring}[1]{%
\ifprintblackwhite\color{black}\else\color{hhudarkblue}\fi#1}
\newcommand{\setlstlistingstyle}{
\newcommand{\setlstlistingstyle}{%
\lstset{
basicstyle=\small\ttfamily,
numbers=left, numberstyle=\footnotesize,
......@@ -216,12 +216,32 @@
stringstyle=\lststring,
showstringspaces=false,
frame=tb,
}%
\iflanguage{ngerman}{\renewcommand{\lstlistingname}{Quellcode}}{}%
\renewcommand*\thelstnumber{{\the\value{lstnumber}}:}%
\let\old@lstlistoflistings\lstlistoflistings%
\renewcommand{\lstlistoflistings}{%
\iflanguage{ngerman}%
{\renewcommand{\lstlistlistingname}{Quellcodeverzeichnis}}%
{\renewcommand{\lstlistlistingname}{List of Listings}}%
\addcontentsline{toc}{section}{\lstlistlistingname}%
\old@lstlistoflistings%
}
}
%% Adapt styling of algorithms
\newcommand{\setalgorithmstyle}{%
\algrenewcommand\ALG@beginalgorithmic{\small}
\iflanguage{ngerman}{\floatname{algorithm}{Algorithmus}}{}%
\let\old@listofalgorithms\listofalgorithms%
\renewcommand{\listofalgorithms}{%
\iflanguage{ngerman}%
{\renewcommand{\listalgorithmname}{Algorithmenverzeichnis}}{}%
\addcontentsline{toc}{section}{\listalgorithmname}%
\old@listofalgorithms%
}
\renewcommand*\thelstnumber{{\the\value{lstnumber}}:}
}
%% Adapt algorithmicx font
\newcommand{\algsmallfont}{\algrenewcommand\ALG@beginalgorithmic{\small}}
%%% Setup of title page
......
......@@ -92,16 +92,12 @@
%% Quellcode
\usepackage{listings} % Einbindung von Code.
\setlstlistingstyle{} % Kosmetische Einstellungen
% Sprachabhängige Bezeichnung.
\iflanguage{ngerman}{\renewcommand{\lstlistingname}{Quellcode}}{}
%% Algorithmen in Pseudocode
\usepackage{algorithm} % Float-Umgebung für angegebene Algorithmen.
\usepackage{algorithmicx} % Angabe von Algorithmen in Pseudocode.
\usepackage{algpseudocode} % Standard Pseudocode-Elemente für Algorithmen.
\algsmallfont{}
% Sprachabhängige Bezeichnung.
\iflanguage{ngerman}{\floatname{algorithm}{Algorithmus}}{}
\setalgorithmstyle{} % Kosmetische Einstellungen
%% Intelligenteres Referenzieren mittels \cref.
%% \languagename um dynamisch zwischen ngerman oder english zu wechseln.
......@@ -166,16 +162,9 @@
\listoftables
% Algorithms
\iflanguage{ngerman}%
{\renewcommand{\listalgorithmname}{Algorithmenverzeichnis}}{}
\addcontentsline{toc}{section}{\listalgorithmname}
\listofalgorithms
% Code Listings
\iflanguage{ngerman}%
{\renewcommand{\lstlistlistingname}{Quellcodeverzeichnis}}%
{\renewcommand{\lstlistlistingname}{List of Listings}}
\addcontentsline{toc}{section}{\lstlistlistingname}
\lstlistoflistings
\clearpage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment