\documentclass[english]{hgbarticle}

\RequirePackage[utf8]{inputenc}		% remove when using lualatex oder xelatex!


\title{The \textsf{hagenberg-thesis} Package}
\date{\hgbDate}

\author{W.\ Burger and W.\ Hochleitner\\[10pt]
University of Applied Sciences Upper Austria\\
Department of Digital Media, Hagenberg (Austria)}


%%%----------------------------------------------------------
\begin{document}
%%%----------------------------------------------------------
\maketitle
%%%----------------------------------------------------------

\begin{abstract}\noindent
The \textsf{hagenberg-thesis} package is a collection of modern LaTeX
templates for university theses (bachelor, master, or diploma programs) and
related documents. This manual describes the main features of this package.
Pre-configured document templates for English and German manuscripts and a
complete tutorial are available on the package's home repository.
\end{abstract}


\section{Introduction}

The complete source of this package and auxiliary materials are available on
CTAN%
\footnote{\url{https://ctan.org/pkg/hagenberg-thesis}}
and its development repository.%
\footnote{\url{https://github.com/Digital-Media/HagenbergThesis}}
The package is made available under the terms of the Creative Commons
Attribution 4.0 International Public License.%
\footnote{\url{https://creativecommons.org/licenses/by/4.0/legalcode}}


\section{Document classes}

The \texttt{hgb} package provides the following document classes, which are
based on the standard \latex\ classes \texttt{book}, \texttt{report}, and
\texttt{article}, respectively:
%
\begin{itemize}
    \item \textbf{\texttt{hgbthesis}} (\texttt{book}):
    for bachelor's, master's, and diploma theses;
    \item \textbf{\texttt{hgbreport}} (\texttt{report}):
    for project and term reports;
    \item \textbf{\texttt{hgbarticle}} (\texttt{article}):
    for drafting journal articles.
\end{itemize}


\subsection{Class options}

\subsubsection{General options}

All document classes accept the following general options:
%
\begin{itemize}
    \item \texttt{english} or \texttt{german} (select the primary language),
    \item \texttt{smartquotes} (use smart quotes replacement),
    \item \texttt{apa} (use \texttt{apa} bibliography style instead of
    \texttt{numeric-comp}),
    \item \texttt{noUpdateCheck} (suppress check of package release date).
\end{itemize}


\subsubsection{Class-specific options}

In addition, the following class-specific options are accepted:
%
\begin{itemize}
    \item \textbf{\texttt{hgbthesis}}:
    \texttt{master}, \texttt{diploma}, \texttt{bachelor}, \texttt{internship}, \texttt{proposal};
    \item \textbf{\texttt{hgbreport}}: \texttt{notitlepage};
    \item \textbf{\texttt{hgbarticle}}: \texttt{twocolumn}.
\end{itemize}
%
For example, to start a master's thesis in German, simply place
%
\begin{LaTeXCode}[numbers=none]
\documentclass[master,german,smartquotes]{hgbthesis}
\end{LaTeXCode}
%
at the beginning of the document.

The \texttt{proposal} option is intended for a \emph{thesis proposal} (``Exposé'') and is 
only effective in \emph{conjunction} with the \texttt{bachelor} and \texttt{master} 
options, \eg,
%
\begin{LaTeXCode}[numbers=none]
\documentclass[bachelor,proposal,german,smartquotes]{hgbthesis}
\end{LaTeXCode}
%
This option is meant for a short exposé, containing only one chapter. Thus,
chapter numbers are not displayed. Remove the \texttt{proposal} option to
migrate a proposal document to the final thesis (and restore the usual
numbering scheme).

\subsection{Thesis parameters (class \texttt{hgbthesis})}

\texttt{hgbthesis} supports several types of thesis documents. The following
parameters must be specified for \emph{all} types:
%
\begin{itemize}
    \item \verb!\title{...}!,
    \item \verb!\author{...}!,
    \item \verb!\programtype{...}!,
    \item \verb!\programname{...}!,
    \item \verb!\placeofstudy{...}!,
    \item \verb!\dateofsubmission{yyyy}{mm}{dd}!,
    \item \verb!\advisor{...}! (optional).
\end{itemize}
%
Note that \texttt{hgbthesis} only supports a \emph{single author} inside the
\verb!\author{...}! macro argument (commands \verb!\and! and
\verb!\thanks{...}! are deactivated)!


\section{Style files and user commands}

The package comes with a set of style (\texttt{*.sty}) files that can be used
independently of the document classes listed above:
\texttt{hgb.sty},
\texttt{hgbabbrev.sty},
\texttt{hgbbib.sty},
\texttt{hgbheadings.sty},
\texttt{hgblistings.sty},
\texttt{hgbmath.sty}.


\subsection{General user commands and environments (\texttt{hgb.sty})}

\begin{itemize}
    \item \texttt{{\bs}hgbDate}: Outputs the package version date,
    \eg, ``\texttt{\hgbDate}''.
		\item \texttt{{\bs}getcurrentlabel}: Yields the most recently assigned
		label number.
    \item \verb!\calibrationbox{width}{height}!: Inserts a test box for
    checking the final print size (in millimeters).
		\item \verb!\begin{block}...\end{block}!: Dummy environment, provides
		a limited scope for variable/command redefinitions.
    \item \verb!\begin{english}...\end{english}!: Temporarily switches 
		to English language settings.
    \item \verb!\begin{german}...\end{german}!: Temporarily switches 
		to German language settings.
\end{itemize}


\subsection{Text commands (\texttt{hgbabbrev.sty})}

\subsubsection*{Special characters:}

\begin{itemize}
    \item \textbf{\texttt{{\bs}bs}}: Inserts a backslash character (short for
    \verb!\textbackslash!).
    \item \textbf{\texttt{{\bs}obnh}}: Inserts an optional break with no
    hyphen (\eg, \verb!PlugIn{\obnh}Filter!).
\end{itemize}


\subsubsection*{German abbreviations:}

\begin{itemize}
    \item \textbf{\texttt{{\bs}bzgl}}: bzgl.
    \item \textbf{\texttt{{\bs}bzw}}: bzw.
    \item \textbf{\texttt{{\bs}ca}}: ca.
    \item \textbf{\texttt{{\bs}dah}}: d.\thinspace{}h.
    \item \textbf{\texttt{{\bs}Dah}}: D.\thinspace{}h.
    \item \textbf{\texttt{{\bs}ds}}: d.\thinspace{}sind
    \item \textbf{\texttt{{\bs}etc}}: etc.
    \item \textbf{\texttt{{\bs}evtl}}: evtl.
    \item \textbf{\texttt{{\bs}ia}}: i.\thinspace{}Allg.
    \item \textbf{\texttt{{\bs}sa}}: s.\ auch
    \item \textbf{\texttt{{\bs}so}}: s.\ oben
    \item \textbf{\texttt{{\bs}su}}: s.\ unten
    \item \textbf{\texttt{{\bs}ua}}: u.\thinspace{}a.
    \item \textbf{\texttt{{\bs}Ua}}: U.\thinspace{}a.
    \item \textbf{\texttt{{\bs}uae}}: u.\thinspace{}\"A.
    \item \textbf{\texttt{{\bs}usw}}: usw.
    \item \textbf{\texttt{{\bs}uva}}: u.\thinspace{}v.\thinspace{}a.
    \item \textbf{\texttt{{\bs}uvm}}: u.\thinspace{}v.\thinspace{}m.
    \item \textbf{\texttt{{\bs}va}}: vor allem
    \item \textbf{\texttt{{\bs}vgl}}: vgl.
    \item \textbf{\texttt{{\bs}zB}}: z.\thinspace{}B.
    \item \textbf{\texttt{{\bs}ZB}}: Zum Beispiel
\end{itemize}

\subsubsection*{English abbreviations:}

\begin{itemize}
    \item \textbf{\texttt{{\bs}ie}}: \ie
    \item \textbf{\texttt{{\bs}eg}}: \eg
    \item \textbf{\texttt{{\bs}etc}}: etc.
    \item \textbf{\texttt{{\bs}Eg}}: \Eg
    \item \textbf{\texttt{{\bs}wrt}}: \wrt
\end{itemize}

\noindent
Note that none of the above abbreviation macros ``eats'' subsequent white
space, \ie, they can be used without additional controls, as in
``\verb!\wrt what I said!'', for example.

\subsection{Bibliography commands (\texttt{hgbbib.sty})}

\begin{itemize}
    \item
    \texttt{{\bs}AddBibFile}: A wrapper to \texttt{biblatex}'s
    \verb!\addbibresource! macro (for backward compatibility only).
    \item
    \texttt{{\bs}MakeBibliography[\emph{options}]}: Inserts the
    reference section or chapter. By default, references are automatically
    split into category subsections.%
    \footnote{Predefined reference categories are \texttt{literature},
        \texttt{avmedia}, \texttt{online} and \texttt{software}.}
    Use the option \texttt{nosplit} to produce a traditional (\ie,
    contiguous) list of references.
    \item
    \texttt{{\bs}mcite%
        [\emph{text1}]\{\emph{key1}\}%
        [\emph{text2}]\{\emph{key2}\}%
        \ldots
        [\emph{textN}]\{\emph{keyN}\}%
    }:
    Analogous to \texttt{bib\-la\-tex}'s \texttt{{\bs}cites} command%
    \footnote{%
    \url{http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf}
    (see Sec.~3.8.3)} but inserts semicolons between reference entries for
    better readability.
\end{itemize}

% \MakeBibliography ... creates a reference section split subsections (default)
% \MakeBibliography[nosplit] ... creates a one-piece reference section


\subsection{Code environments (\texttt{hgblistings.sty})}

The following types of code environments are defined:%
%
\begin{itemize}
    \item \textbf{\texttt{CCode}}: for C (ANSI),
    \item \textbf{\texttt{CppCode}}: for C++ (ISO),
    \item \textbf{\texttt{CsCode}}: for C\#,
    \item \textbf{\texttt{CssCode}}: for CSS,
    \item \textbf{\texttt{GenericCode}}: for generic code,
    \item \textbf{\texttt{HtmlCode}}: for HTML,
    \item \textbf{\texttt{JavaCode}}: for Java,
    \item \textbf{\texttt{JsCode}}: for JavaScript,
    \item \textbf{\texttt{LaTeXCode}}: for \latex,
    \item \textbf{\texttt{ObjCCode}}: for ObjectiveC,
    \item \textbf{\texttt{PhpCode}}: for PHP,
    \item \textbf{\texttt{PythonCode}}: for Python,
    \item \textbf{\texttt{Swift}}: for Swift,
    \item \textbf{\texttt{XmlCode}}: for XML.
\end{itemize}
%
\texttt{hgblistings} is based on the \texttt{listingsutf8}%
\footnote{\url{https://ctan.org/pkg/listingsutf8}}
package, thus any valid \texttt{listings}%
\footnote{\url{https://ctan.org/pkg/listings}}
option may be used; for example, the option \texttt{numbers=none} to suppress
line numbers:
\begin{LaTeXCode}[numbers=none]
    \begin{JavaCode}[numbers=none]
    ... // Java code comes here
    \end{JavaCode}
\end{LaTeXCode}


\subsection{Mathematical commands (\texttt{hgbmath.sty})}

\texttt{hgbmath} requires (and automatically loads) the \texttt{amsmath}%
\footnote{\url{https://ctan.org/pkg/amsmath}}
package, thus, all commands and symbols of \texttt{amsmath} are available by
default. The following \emph{additional} commands can only be used in math mode:
%
\begin{itemize}
    \item \textbf{\texttt{{\bs}Cpx}}: $\Cpx$ (complex numbers),
    \item \textbf{\texttt{{\bs}N}}: $\N$ (natural numbers),
    \item \textbf{\texttt{{\bs}R}}: $\R$ (real numbers),
    \item \textbf{\texttt{{\bs}Q}}: $\Q$ (rational numbers),
    \item \textbf{\texttt{{\bs}Z}}: $\Z$ (integer numbers).
\end{itemize}


\subsection{Algorithms (\texttt{hgbalgo.sty})}

\texttt{hgbalgo} is a stand-alone package that is based on -- and extends --
the \texttt{algorithmicx} and \texttt{algpseudocodex} packages.%
\footnote{\url{https://ctan.org/pkg/algorithmicx},
    \url{https://ctan.org/pkg/algpseudocodex}}
It fixes some (mostly indentation-related) problems, adds color, and provides
some additional commands. It also loads the \texttt{algorithm}%
\footnote{\url{https://ctan.org/pkg/algorithms}}
package, which defines a compatible float container for algorithms:
\verb!\begin{algorithm}! \verb!...! \verb!\end{algorithm}!.

\paragraph{Additional algorithm commands:}
\begin{itemize}
    \item
    \textbf{\texttt{{\bs}StateNN[<nesting>]\{<text>\}}}:
    Creates a \emph{non-numbered} statement like \texttt{algo\-rith\-micx}'s
    \verb!\Statex! command but provides controlled indentation inside nested
    constructs. The optional integer argument \verb!<nesting>! can be used to
    specify the \emph{nesting depth} to compensate for a bug in
    \texttt{algorithmicx} (the nesting level inside a block is not set
    properly before the first \verb!\State! command). Omitting the optional
    argument should give correct indentation in most situations.
    \item
    \textbf{\texttt{{\bs}Input\{<text>\}}}:
    For describing the input parameters in a procedure's preamble.
    \item
    \textbf{\texttt{{\bs}Output\{<text>\}}}:
    For describing the output values in a procedure's preamble.
    \item
    \textbf{\texttt{{\bs}Returns\{<text>\}}}:
    For describing the return values in a procedure's preamble.
\end{itemize}

\paragraph{Vertical spacing commands:}
The following commands are provided for fine-tuning the vertical spacing
between individual statements of an algorithm (the standard spacing commands
like \verb!\smallskip! \etc\ have no effect between statements):%
\footnote{Note that the standard spacing commands work \emph{between}
\texttt{procedure} and \texttt{function} blocks in the usual way.}
\begin{itemize}
    \item \textbf{{\bs}\texttt{algsmallskip}}: inserts 3pt extra space,
    \item \textbf{{\bs}\texttt{algmedskip}}: inserts 6pt extra space,
    \item \textbf{{\bs}\texttt{algbigskip}}: inserts 12pt extra space.
\end{itemize}
They are supposed to be used inside (\ie, at the end of) statements, for
example:
%
\begin{LaTeXCode}[numbers=none]
    \State $x \gets x + 1$ \algsmallskip
\end{LaTeXCode}

\paragraph{Defined algorithm colors:}
\begin{itemize}
    \item \textbf{\texttt{AlgKeywordColor}} (for algorithm keywords),
    \item \textbf{\texttt{AlgProcedureColor}} (for procedure and function
    names).
\end{itemize}
These colors can be redefined at any time (see the \texttt{xcolor}%
\footnote{\url{https://ctan.org/pkg/xcolor}}
package), \eg, by
\begin{LaTeXCode}[numbers=none]
    \definecolor{AlgKeywordColor}{named}{black}
    \definecolor{AlgProcedureColor}{rgb}{0.0, 0.5, 0.0}     % dark green
\end{LaTeXCode}




\section{Package dependencies}

\begin{sloppypar}
The \texttt{hagenberg-thesis} package builds on the following \latex\
packages:\newline
\texttt{abstract}, 
\texttt{algorithm}, 
\texttt{algorithmicx}, 
\texttt{algpseudocodex}, 
\texttt{amsbsy}, 
\texttt{amsfonts}, 
\texttt{amsmath}, 
\texttt{amssymb}, 
\texttt{babel}, 
\texttt{biblatex}, 
\texttt{breakurl}, 
\texttt{caption}, 
\texttt{cmap}, 
\texttt{csquotes}, 
\texttt{datetime2}, 
\texttt{enumitem}, 
\texttt{epstopdf}, 
\texttt{eurosym}, 
\texttt{exscale}, 
\texttt{fancyhdr}, 
\texttt{float}, 
\texttt{fontenc}, 
\texttt{geometry}, 
\texttt{graphicx}, 
\texttt{hypcap}, 
\texttt{hyperref}, 
\texttt{ifpdf}, 
\texttt{inputenc}, 
\texttt{lengthconvert},
\texttt{listingsutf8}, 
\texttt{lmodern}, 
\texttt{moreverb}, 
\texttt{overpic}, 
\texttt{pdfpages}, 
\texttt{pict2e}, 
\texttt{subdepth}, 
\texttt{titlesec}, 
\texttt{titling},
\texttt{tocbasic},
\texttt{url}, 
\texttt{upquote}, 
\texttt{verbatim}, 
\texttt{xcolor}, 
\texttt{xifthen},
\texttt{xstring},
\texttt{xspace}.
\end{sloppypar}

\end{document}
