% © 2026 Jan-Luca Hansel <hanseljl@mail.uni-paderborn.de>
% Licensed under the EUPL

\documentclass[us-de]{thesisUPB} % {de-gb, de-us, gb-de, us-de}, showgrid, color
% =============================================================================



% Load packages specific for this document
\usepackage{menukeys}



% Add the bibliography file
\addbibresource{literature.bib}



% Set document metadata
\title{This might be a super long title for your awesome thesis}
\name{Your}
\surname{Name}
\matriculationnumber{1234567}
\thesistype{Master’s Thesis}
\degree{Master of Science}
\researchgroup{Research group of your supervisor}
\supervisor{Dr.\,Super Visor}
\date{April 1, 2026}



% =============================================================================
% Document contents
\begin{document}



% Title page
\printtitlepage



% Abstract
\printabstract{
	This manual gives an introduction to the \code{thesisUPB} class.
	It shows the features that the class provides and explains it’s indented use.
	Furthermore, this document provides you with some tips on how to properly structure and typeset your thesis.

	This place is where the abstract of your thesis should go.
}



% Affirmation in lieu of an oath
\printaffirmation{Here, you can include a list of tools to used for the creation of your thesis}



% ToC
\printtoc



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Getting started}\label{ch:GettingStarted}

This document shall serve as an overview of the \code{thesisUPB} \LaTeX{} class which you may use to typeset your thesis.
It includes explanations as well as tips for writing your thesis.
This chapter starts with an explanation of the most basic things you should setup in the beginning.



% -----------------------------------------------------------------------------
\section{Class options}

The \code{thesisUPB} class provides multiple class options to easily tweak different aspects of the document.

\begin{center}
	\begin{tblr}{lX}
		\toprule
		\code{de-gb}    & Use this when your thesis is primarily written in German while some parts may be written in British English.  \\
		\code{de-us}    & Use this when your thesis is primarily written in German while some parts may be written in American English. \\
		\code{gb-de}    & Use this when your thesis is primarily written in British English.                                            \\
		\code{us-de}    & Use this when your thesis is primarily written in American English.                                           \\
		\code{color}    & Use this when you want to use color on the decorative boxes.                                                  \\
		\code{showgrid} & Use this when you want to see the underlying grid layout.                                                     \\
		\bottomrule
	\end{tblr}
\end{center}

To include these options, you must tweak the \code{\textbackslash documentclass} macro.
So, for example, you may start your document with \code{\textbackslash documentclass[us-de,showgrid]\{thesisUPB\}} if your thesis is written in American English, if you are fine with the black rectangles and if you want to look at the grid lines to better see the type area.



% -----------------------------------------------------------------------------
\section{Compiling your document}

This class is designed to be used with Lua\LaTeX{}. 
Please note that if you use \code{minted} to include source code in your thesis, you need to set the \code{-shell-escape} flag.

Personally, I like to use \code{latexmk} as it makes the compilation process much easier.
Information on that can be found under \url{https://mgeier.github.io/latexmk.html}.
Of course, you are free to choose the tools you like the most.



% -----------------------------------------------------------------------------
\section{Todo notes}

The \code{thesisUPB} class defines the \code{\textbackslash todo\{\}} macro.
With it, you can put notes into your document to remind yourself of the work that still needs to be done.
They are designed to be eye-catching so you do not miss them.
\todo{They look like this.}



% =============================================================================
\part{Tips for your thesis}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Structuring your document}\label{ch:Structure}

Your thesis needs to contain different things in order to be accepted.
This chapter outlines these different parts as well as their ideal ordering.
These include
\begin{itemize}
	\item a title page (\Cref{sec:title}),
	\item an abtact (\Cref{sec:abstract}),
	\item an affirmation in lieu of an oath (\Cref{sec:affirmation}),
	\item a table of contents (\Cref{sec:toc}),
	\item the main body of your thesis consisting of an introduction, the content chapters as well as a conclusion (\Cref{sec:body}) and
	\item a bibliography (\Cref{sec:bibliography}).
\end{itemize}
Optionally, your thesis may include an appendix (\Cref{sec:appendix}) as well as a colophon (\Cref{sec:colophon}).

Structuring the \code{tex} files is a separate issue.
For this document, all of it’s content is contained in a single file.
By doing this, you may easily search for specific words or sentences.
However, this file quickly becomes quite large.

Because of this, it might be sensible to split your thesis into multiple files.
Then, each chapter or each section is contained in a separate, much smaller file.
Putting all of these files together can be achieved with the use of the \code{\textbackslash input\{\}} macro.



% -----------------------------------------------------------------------------
\section{The title page}\label{sec:title}

To get the title page of your thesis, the class defines multiple different commands which allow you to enter the information that shall be printed on the title page.
In your preamble, you should include the following lines:

\begin{center}
	\begin{minted}{latex}
		\title{This might be a super long title for your awesome thesis}
		\name{Your}
		\surname{Name}
		\matriculationnumber{1234567}
		\thesistype{Master’s Thesis}
		\degree{Master of Science}
		\researchgroup{Research group of your supervisor}
		\supervisor{Dr.\,Super Visor}
		\date{April 1, 2026}
	\end{minted}
\end{center}

Of course, you should replace the information in the example above with the information for your thesis.

After the \code{\textbackslash begin\{document\}} line, you should include the \code{\textbackslash printtitlepage} macro.
This will then include a title page in the output document.
Said page will look something like the first page of this document.



% -----------------------------------------------------------------------------
\section{The abstract}\label{sec:abstract}

To include an abtract in your thesis, simply use the \code{\textbackslash printabstract\{\}} macro.
Inside of the braces, you should include the text of your abstract.
Your abstract should be placed directly after the title page.



% -----------------------------------------------------------------------------
\section{The affirmation in lieu of an oath}\label{sec:affirmation}

Your thesis must include a so-called \emph{\foreignlanguage{ngerman}{Eidesstattliche Versicherung}}—an affirmation in lieu of an oath.
You include this with the \code{\textbackslash printaffirmation\{\}} macro.
Inside of the braces, you should indicate all of the aids that you used for the creation of your thesis.
It should be placed directly after the abstract.

For legal purposes, the text is included in German, regardless of your thesis’ language.
The German version is also included in this document, you can find it after the abstract.
If you are not proficient in German, you may find a faithful translation on the next page.

\begin{figure}
\begin{upbtitlebox}{Instruction (“\foreignlanguage{ngerman}{Belehrung}”)}
Anyone who deliberately violates a provision of a university examination regulation concerning deception in examinations is guilty of an administrative offence.
The administrative offence can be punished with a fine of up to €\,50,000.00.
The administrative authority responsible for prosecuting and punishing administrative offences is the vice president for finances and human resources at Paderborn University.
In the event of repeated or otherwise serious attempts at deception, the examinee may also be expelled from the university (Section~63\,(5)~HG~NRW).
Paderborn University may carry out an electronic check of the thesis in order to detect deception.
\end{upbtitlebox}

\begin{upbtitlebox}{Note on the processing of personal data (“\foreignlanguage{ngerman}{Hinweis zu der Verarbeitung personenbezogener Daten}”)}
The data mentioned on the following page is collected on the basis of the applicable examination regulations in conjunction with Section~63\,(5)~HG~NRW.
On the basis of the transmitted data, the examiner and the examination board of the affected degree program will be informed of the consequences in accordance with the examination regulations in conjunction with the \emph{\foreignlanguage{ngerman}{Hochschulgesetz NRW}} in the event of plagiarism or deception. 
The data will be deleted after completion of the examination procedure. 
The data may be forwarded to the examiner and the examination board.
If the examination board decides to impose a fine, the data will be forwarded to the vice president for finances and human resources, who is responsible for pursuing and enforcing the fine.
The examination board of the relevant degree program at Paderborn University is responsible for processing in the regular procedure.
\end{upbtitlebox}

\begin{upbtitlebox}{Affirmation in lieu of an oath (“\foreignlanguage{ngerman}{Eidesstattliche Versicherung}”)}
The table contains
\begin{itemize}
	\item your surname and given name,
	\item your matriculation number and study program,
	\item the title of your thesis and
	\item a list of all aids you used.
\end{itemize}

I hereby declare that I have completed this thesis independently and without any unauthorized outside assistance.
\begin{itemize}
	\item I have read and understood the above instructions.
	\item I have not used any sources or aids other than those indicated, and I have identified all direct and indirect quotations.
	\item This thesis has not been submitted to any examination authority in the same or a similar form.
	\item The electronic version corresponds to the printed and bound version.
\end{itemize}
\end{upbtitlebox}
\end{figure}



% -----------------------------------------------------------------------------
\section{The table of contents}\label{sec:toc}

To include a table of contents, simply use the \code{\textbackslash printtoc} macro.
You should include the table of contents directly after your affirmation in lieu of an oath.



% -----------------------------------------------------------------------------
\section{The main body of your thesis}\label{sec:body}

After your table of contents, you may begin to write the main body of your thesis.
This must first include an introductory chapter in which you motivate your topic and give an overview of what is to come.
Depending on how many concepts you need to introduce, it might make sense to create a chapter dedicated to the explanation of the concepts necessary for understanding your thesis.
If this is rather short, it might also be possible to include this in the introduction.
Then, you will most likely need to give an overview of the related work in which you outline the approaches others have taken to tackle the same or a similar problem.
For the main content chapters of your thesis, you will need to come up with a sensible breakdown into multiple chapters.
In the end, you want to sum up your approach and results in a conclusion chapter.
Perhaps you would also want to include a chapter after that in which you outline possible future work that could extend or improve your results.

For structuring your thesis, you have the following macros in your repertoire.
\begin{itemize}
	\item \code{\textbackslash part\{\}} splits your thesis into bigger parts.
		Using parts might make sense if your work can be split into different parts which do not build upon each other.
	\item \code{\textbackslash chapter\{\}} divides your thesis into chapters.
		Every chapter should be concerned with one bigger topic, e.g., the theory behind your approach or the details of your implementation.
	\item \code{\textbackslash section\{\}}, \code{\textbackslash subsection\{\}} and \code{\textbackslash subsubsection\{\}} can be used to divide a single chapter into smaller topics.
		Ideally, the sections of a chapter provide a good outline of its contents.
		As their names suggest, the \code{\textbackslash subsection\{\}} may divide each section while the \code{\textbackslash subsubsection\{\}} divides subsections.
		Hence, you should not use a \code{\textbackslash subsection\{\}} without a \code{\textbackslash section\{\}} first, for example.
		When using these macros, make sure to stay consistent.
\end{itemize}

By default, the macros outlined above produce numbered party, chapters and sections.
If you want to surpress these numbers, you can use the variants of these macros that are marked with an asterisk, e.g., \code{\textbackslash chapter*\{\}} or \code{\textbackslash subsection*\{\}}.



% -----------------------------------------------------------------------------
\section{The bibliography}\label{sec:bibliography}

The details of citation management and useage is described in \Cref{ch:citations}.
To utilize a \code{bib} file, you simply need to use the \code{\textbackslash addbibresource\{\}} in your preamble.
To print the bibliography with all cited resources, you just need to include the \code{\textbackslash bibliographychapter} macro after your thesis’ main body has ended.



% -----------------------------------------------------------------------------
\section{The appendix}\label{sec:appendix}

To include something in the form of an appendix, you can structure that content similar to all other content.
To start the appendix, you just need to include the \code{\textbackslash appendix} before the start of the appendix.



% -----------------------------------------------------------------------------
\section{The colophon}\label{sec:colophon}

The very last thing to could add to your thesis is a colophon.
This is entirely optional however.
If you wish to include a colophon, \code{\textbackslash thesisUPB} defines the \code{\textbackslash colophon} macro which you can simply put directly before the \code{\textbackslash end\{document\}} macro.
This outputs a predefined text which is also included on the last page of this document.
Feel free to redefine its contents to your needs.



% =============================================================================
\part{Hints for good typography}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Installing an E1 keyboard layout}

When you are using a standard \term{qwertz} keyboard—as it is customary in Germany—I implore you to look into installing a driver that supports the E1 layout.
If you install an E1-compatible keyboard driver, you will be able to use many glyphs that were previously difficult to access, e.g., correct qutation marks and different dashes.
Of course, \LaTeX{} provides you with options to use these glyphs without the need to input them directly.
However, learning how to use the E1 keyboard layout enables you to use them in other places too.

This manual will outline how to set the correct glyphs using the E1 keyboard layout as well as using a standard keyboard layout and \LaTeX{} macros in the corresponding chapters.
Usually, it is interchangable whether you use the direct input or the \LaTeX{} input.
However, one important difference lies in the handling of spaces.

Spaces come in different widths as well as breaking and non-breaking variants.
\Cref{tbl:space-input} gives an overview of the most important spaces.
In this table, the non-breaking thin space is listed twice because \code{\textbackslash ,} inserts a constant \sfrac{1}{6}\,em while the width of the character input using the E1 layout is font-dependent.

If you use \code{thesisUPB}, I would advise to use \code{\textbackslash ,} as the non-breaking thin space of Latin Modern Roman is still quite wide.
Also, it is easily apparent which space is used, even when using an editor which displays the source files in a monospaced typeface.

\begin{htable}
	\caption{An overview of the most important spaces}
	\label{tbl:space-input}
	\begin{tblr}{ccl}
		\toprule
			Name                    & \LaTeX{}                & E1                    \\
		\midrule
			Word space              &                         & \keys{Space}          \\
			Non-breaking space      & \code{\~}               & \keys{Alt Gr + Space} \\
			Non-breaking thin space & \code{\textbackslash ,} &                       \\
			Non-breaking thin space &                         & \keys{Alt Gr + C}     \\
		\bottomrule
	\end{tblr}
\end{htable}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item The article \textcite{wikipedia:e1} provides links for installation instructions as well as an overview of the layout.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Page Layout}

\begin{tikzpicture}[remember picture, overlay]
	\draw[lightgray,xstep=\xgrid,ystep=\ygrid,yshift=\dimexpr0.46\ygrid\relax] (current page.north west) grid (current page.south east);
\end{tikzpicture}%

For page construction, \code{thesisUPB} divides each page into a grid of 9\,\times\,9 rectangles.
The type area spans 6\,\times\,6 of these rectangles, leaving one line of rectangles at the top and two lines of rectangles at the bottom.
\code{thesisUPB} expects the thesis to be printed out double-sided. 
Hence, odd-numbered pages have two empty columns of rectangles on their left side and one empty column of rectangles on their right side.
For even-numbered pages, this is mirrored.

It is recommended to stick to this type area.
If you want to see the type area more clearly, set the \code{showgrid} option of the class.



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Emphasis}

Oftentimes, one might want to emphasize certain words or phrases.
In general, it is best to use emphasis sparingly as constant changes in the appearance of a text can be easily distracting.
To minimize distractions, it is advisable to use the more subtle emphasis you get when using \emph{italics} or \term{small caps}.
Please do only use true italics and disregard the option of using slanted text.

Using \strong{bold} text for emphasis is not as ideal as because of how it influces the type color.
Also, mixing multiple font styles must not be done, i.e., do not use \emph{\strong{bold and italics at the same time}}.
Lastly, underlining text is to be avoided.
While it works for handwriting and typewriters which do not have other means of adding emphasis, computer typesetting allows for much better alternatives.

Regarding how to apply these styles, \LaTeX{} offers several commands for changing the appearance of text.
These include, for example, \code{\textbackslash textit} and \code{\textbackslash textbf}.
These commands, however, define a certain style directly.
While this makes it obvious how something should appear, this approach makes it much more difficult to tweak the appearance of. e.g., the introduction of new terms.
For this, \code{thesisUPB} provides semantic markup macros whose definition only needs to be changed at a single location to change the appearance of all instances.

Similar to \term{html}, \code{\textbackslash strong} and \code{\textbackslash emph} macros are defined.
These map to \strong{bold} and \emph{italic} text respectively.
To reference names from source code, \code{\textbackslash code} sets the text in a \code{typewriter-style typeface}.
Special terms could, for example, be set using the \code{\textbackslash term} macro, which produces \term{small caps}.

Moreover, \code{thesisUPB} provides you with two different kinds of boxes you can use to offset and highlight certain parts.
These are the \code{upbbox} and \code{upbtitlebox} environments.
As the name suggests, the latter supports setting a title for the box.
Additionally, you can optionally set an individual color for the striple on the left.
An example use would be \code{\textbackslash begin\{upbtitlebox\}[upbSkyBlue]\{Title\}}.
For the version without a title, the last pair of braces is not needed.

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item See the chapters \emph{underlining} and \emph{bold or italic} in the book by \textcite{butterick2018}.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Links and references}

While the style defined by \code{thesisUPB} assumes a print version of the thesis, people are most likely to also a digital version of you thesis.
Thus, one of course wants to take advantage of the \term{pdf} format.
One of these advantages is the ability to have clickable links, both to online resources and to other parts of your thesis.

If you want to include links to a web resource, you may use the \code{\textbackslash url\{\}} macro.
This will set the link in the \code{\textbackslash ttfamily} style and the entire link will be clickable.

For referring to other parts of your thesis, \code{thesisUPB} provides you with the \code{cleveref} package.
If you want to reference a point in your document, you first need to create a label using the \code{\textbackslash label} macro.
For example, \Cref{ch:GettingStarted} was set using the following macros:
\begin{upbbox}[upbIrisViolet]
	\begin{minted}{latex}
		\chapter{Getting started}\label{ch:GettingStarted}
	\end{minted}
\end{upbbox}

For the label to be utilized properly, it is important to define it after the macro that defines the name, e.g., \code{\textbackslash chapter} or \code{\textbackslash caption}.
To create a reference, one can then use the \code{\textbackslash Cref} macro, e.g., \code{\textbackslash Cref\{ch:GettingStarted\}}.
The chapter number will then be a clickable link that brings you to the beginning of the chapter.

The \code{cleveref} package also provides you with automatic formatting if you want to refer to multiple different spots at once.
For this, you just need to pass a comma-separated list to the macro.
The result will then look like this:
\begin{upbbox}[upbIrisViolet]
	\begin{itemize*}[itemjoin=\quad]
		\item[] \Cref{ch:GettingStarted}
		\item[] \Cref{sec:toc,sec:body}
		\item[] \Cref{sec:toc,sec:body,sec:bibliography}
		\item[] \Cref{sec:toc,sec:body,sec:appendix}
	\end{itemize*}
\end{upbbox}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item See the official documentation of \code{cleveref}  by \textcite{cleveref}.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Abbreviations}

Abbreviations themselves and their typesetting differ between American English, British English and German.
However, some things hold true for all of these languages.
The most important thing to keep in mind is that the end of a sentence is always marked by a single period.
Hence, if your sentence ends on, for example, \emph{etc.}, the period of the abbreviation also signals the end of the sentence and you must not write \emph{etc..}

Also, both \emph{etc.} and \emph{et al.} are used in both English and German.
There, you should keep in mind that the \emph{et} in both abbreviations is the Latin word for \emph{and}.
Hence, you must not use the word \emph{and} before them.
Also, as \emph{and} is its own word, it is acceptable to have a line break between \emph{et} and \emph{al.}



% -----------------------------------------------------------------------------
\section{English}

English does not have many rules on top of the ones outlined above.
For English writing, please refrain from setting any spaces inside abbreviations—you write \code{e.g.} and not \code{e.~g.}

Also, you need to be aware of which style you follow.
In American English, abbreviations such as \emph{i.e.} or \emph{e.g.} are followed by a comma.

\begin{upbtitlebox}[upbIrisViolet]{American English}
	An example sentence may show a lot of things, e.g.\strong{,} how to use commas with abbreviations.
\end{upbtitlebox}

\noindent In British English, you would not use a comma there.

\begin{upbtitlebox}[upbIrisViolet]{British English}
	An example sentence may show a lot of things, e.g. how to use commas with abbreviations.
\end{upbtitlebox}



% -----------------------------------------------------------------------------
\section{German}

In German, you need to pay a little more attention to the use of abbreviations because in abbreviations such as \emph{z.\,B.}, you need to use a thin non-breaking space, i.e., write \code{z.\textbackslash,B.}
For your convenience, this class defines the commands 
\begin{itemize}
	\item \code{\textbackslash zB} for \emph{z.\,B.} (\emph{zum Beispiel}), 
	\item \code{\textbackslash ua} for \emph{u.\,a.} (\emph{unter anderem}), 
	\item \code{\textbackslash uAe} for \emph{u.\,Ä.} (\emph{und Ähnliche}(\!\emph{s})) and 
	\item \code{\textbackslash oAe} for \emph{o.\,Ä.} (\emph{oder Ähnliche}(\!\emph{s})) 
\end{itemize}
if you set the \code{de-us} or \code{de-gb} class option.



% -----------------------------------------------------------------------------
\section{Non-breaking spaces}

To mark abbreviations, it is customary to terminate them with a period.
While this is not an issue most of the time, if a line break occurs directly after such a period, readers might be more inclined to assume that this is a sentence-ending period.
Similarly, some phrases like a person’s title and name or shorthand symbols—such as ©, ℗, § or ¶—should be kept together.
To mitigate this issue, it makes sense to use a non-breaking space or even a thin non-breaking space after an abbreviation.

\begin{upbbox}[upbIrisViolet]
	\begin{itemize*}[itemjoin=\qquad]
		\item[] \code{Dr.\textbackslash ,Super Visor}
		\item[] \code{§\textbackslash ,1\~{}GG}
		\item[] \code{\$\textbackslash ,110.99}
	\end{itemize*}
\end{upbbox}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item For English, see the chapter \emph{type composition} in the book by \textcite{butterick2018}.
		\item For German, see the book by \textcite[12]{forssman2021}.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Quotation marks}

The use of quotation marks is very much language-dependent.
However, regardless of language, do not use the straight quotation marks \code{"} and \code{'}.
You may only use them when including source code.
Also, as quotation marks may become quite obtrusive, it is best to reserve them only for quotations.
For emphasis, it is advisable to use \emph{italics} or \term{small caps}.

Please note that this section details how to individually set quotation marks to aid understanding.
Instead of following these explanations directly, it might be sensible to use the \code{\textbackslash textquote} command.
More information on that can be found in \Cref{ch:citations}.

Finally, please do not mix up quotation marks with the apostrophe.
To write it in \LaTeX{}, you can simply use \code{'}.
Using an E1 layout, you can use \keys{Alt Gr + 1}.


% -----------------------------------------------------------------------------
\section{English} 

Regardless of style, English text uses “~and~” or ‘~and~’ as quotation marks.
\Cref{tbl:en-quotation-mark-input} details how to input these glyphs.

\begin{table}
	\caption{An overview of how to input English quotation marks}
	\label{tbl:en-quotation-mark-input}
	\begin{tblr}{ccl}
		\toprule
			Glyph & \LaTeX{}  & E1                                  \\
		\midrule
			“     & \code{``} & \keys{Alt Gr + F}, \keys{V}         \\
			”     & \code{''} & \keys{Alt Gr + F}, \keys{B}         \\
			‘     & \code{`}  & \keys{Alt Gr + F}, \keys{Shift + B} \\
			’     & \code{'}  & \keys{Alt Gr + F}, \keys{Shift + B} \\
		\bottomrule
	\end{tblr}
\end{table}

American English uses “~ and~” as primary quotation marks.
Consequently, ‘~and~’ are used as secondary quotation marks.
This means that quoations are normally enclosed in “~and~”.
Only when having to use quotation marks within a quote, you use ‘~and~’ to differntiate them from the outer quotation marks.

\begin{upbtitlebox}[upbIrisViolet]{American English}
	\code{``Setting these these so-called `quotation marks' correcty needs some practice.''}

	``Setting these these so-called `quotation marks' correcty needs some practice.''
\end{upbtitlebox}

The British use quotation marks the other way around, i.e., ‘~and~’ are the primary quotation marks while “~and~” are the secondard quotation marks.

\begin{upbtitlebox}[upbIrisViolet]{British English}
	\code{`Setting these these so-called ``quotation marks'' correcty needs some practice.'}

	`Setting these these so-called ``quotation marks'' correcty needs some practice.'
\end{upbtitlebox}

American English and British English are not very much apart in how they handle the order of quotation marks and other punctuation.
The only difference in how they handle periods and commas, so exclamation marks, question marks, semicolons, colons and other punctuation is treated equally.
Such punctiuation comes before the quotation mark if and only if it belongs to the quoted material.

\begin{upbbox}[upbIrisViolet]
	She asked, ``Was it possible to follow all of these rules corretly?''

	Did they say, ``Congratulations for completing your thesis''?
\end{upbbox}

Periods are only included if the quotation also ends the sentence that includes the quotation.

\begin{upbbox}[upbIrisViolet]
	She said, ``I finally got my degree.''

	``I finally got my degree,'' she said.
\end{upbbox}

As one can see, sentence-ending punctuation of a quote at the end of a sentence also ends the sentece includeing the quote without the need to add extra punctuation after the closing quote.

In American English, periods and commas are always put before the closing quotation mark, regardless of whether it is part of the quoted material.

\begin{upbtitlebox}[upbIrisViolet]{American English}
	``Today,'' she said ``is the day that I hand in my thesis.''
\end{upbtitlebox}

In British English, periods and commas appear only before the closing quotation mark if they actually belong to the quotation.

\begin{upbtitlebox}[upbIrisViolet]{British English}
	`Today', she said `is the day that I hand in my thesis.'
\end{upbtitlebox}




% -----------------------------------------------------------------------------
\section{German}

The German language uses „~and~“, »~and~« or «~and~» as well as ‚~and~‘, ›~and~‹ or ‹~and~›. 
\Cref{tbl:de-quotation-mark-input} details how to input these glyphs. 

\begin{table}
	\caption{An overview of how to input German quotation marks}
	\label{tbl:de-quotation-mark-input}
	\begin{tblr}{ccl}
		\toprule
			Glyph & \LaTeX{}                   & E1                                  \\
		\midrule
			„     & \code{"`}                  & \keys{Alt Gr + F}, \keys{X}         \\
			“     & \code{"'}                  & \keys{Alt Gr + F}, \keys{V}         \\
			‚     & \code{\textbackslash glq}  & \keys{Alt Gr + F}, \keys{Shift + X} \\
			’     & \code{\textbackslash grq}  & \keys{Alt Gr + F}, \keys{Shift + B} \\
			»     & \code{">}                  & \keys{Alt Gr + X}                   \\
			«     & \code{"<}                  & \keys{Alt Gr + V}                   \\
			›     & \code{\textbackslash frq}  & \keys{Alt Gr + Y}                   \\
			‹     & \code{\textbackslash flq}  & \keys{Alt Gr + B}                   \\
		\bottomrule
	\end{tblr}
\end{table}

In Germany and Austria, „~and~“ as well as ‚~and~‘ are most widely used with the exception of books where »~and~« as well as ›~and~‹ are most often used.
In Switzerland, the French style quotation marks «~and~» as well as ‹~and~› are most often the default choice.
Regardless of where you live or come from, all of these quotation marks are acceptable, although sticking to the usual choice for your region is the best idea.
Also, most importantly, please ensure that you stay consistent with their use throughout the thesis.

Furthermore, when using quotation marks within a quotation, it is advisable to also not mix different kinds of quotation marks, i.e., use „~and~“ as primary quotation marks and ‚~and~‘ as secondary quotation marks.
Usually, the double quotation marks such as »~and~« serve as the primary mark while the corresponding single quotation mark, e.g., ›~and~‹, serve as the secondary mark.

The use of «~and~» as well as ‹~and~› is a bit trickier than the other two options though.
With this style, it is necessary to add whitespace after the quotation marks.

\begin{upbbox}[upbIrisViolet]
	\code{«So wird es in der Schweiz oft gesetzt.»}

	«So wird es in der Schweiz oft gesetzt.»

	\null\par

	\code{«\textbackslash kern0.0625em So sieht es aber etwas schöner aus.\textbackslash kern0.0625em»}

	«\kern0.0625em So sieht es aber etwas schöner aus.\kern0.0625em»
\end{upbbox}

Similar to British English, German quotations should only contain punctuation if is part of the quoted material.
Periods are omitted if the sentence containing the quote continues, other punctuation marks are retained.

\begin{upbbox}[upbIrisViolet]
	»Ich gebe meine Arbeit heute ab«, versicherte sie.

	»Ich gebe meine Arbeit heute ab!«, versicherte sie.
\end{upbbox}

If both the quoted material and the sentence containing it include question marks or exclamation marks, you write both.
If one of the sentences contains a period, you only keep the question mark or exclamation mark.
If both sentences end with a period, the period comes before the closing quotation mark.

\begin{upbbox}[upbIrisViolet]
	Sie schrie: »Ich gebe meine Arbeit heute ab!«!

	Sagte sie wirklich: »Ich gebe meine Arbeit heute ab«?

	Sie fragte mich: »Wann gibst du deine Arbeit ab?«

	»Ich glaube«, sagte sie, »dass ich das noch schaffe.«
\end{upbbox}

As one can see in the last example, you do not use a comma before and after a closing quotation mark—the comma in the quote needs to be left out.

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item For more information on English quotation marks, see the book by \textcite[86–87]{bringhurst2008}.
		\item For more information on German quotation marks, see the book by \textcite[104–105, 180–182]{forssman2021} as well as the guide of the \textcite[146–149]{rfdr2024}.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Citations}\label{ch:citations}

In academic writing, it is important to properly backup your claims with citations and to properly mark phrases, sentences or paragraphs which you copied from someone else’s writing.
\LaTeX{} provides you with mechanisms to help with managing your sources and setting the references.
The following sections describe how to use these mechanisms and also give exmples of how to properly cite your sources.



% -----------------------------------------------------------------------------
\section{The \code{bib}-file}

All of your references need to be stored in a \texttt{.bib} file, e.g., a file called \texttt{literature.bib}.
The documentation by \textcite{biblatex} gives an overview of all possible entry types and the data fields they allow.
An entry may look like this:

\begin{upbbox}[upbIrisViolet]
	\begin{minted}{bibtex}
		@book{bringhurst2008,
			author = {Bringhurst, Robert},
			title = {{The Elements of Typographic Style}},
			edition = {3},
			year = {2008},
			publisher = {Hartley \& Marks}
		}
	\end{minted}
\end{upbbox}

Note the use of double braces to enforce retaining the given capitalization.
The Author is split into surname and given namen using a comma.
If multiple authors worked on one source, you separate them using an \code{and}.

To use the file, you need to include the line \code{\textbackslash addbibresource\{literature.bib\}} in your preamble—of course, you may need to substitute the filename if you chose a different name.
To generate a chapter with all references, you need to use the \verb=\bibliographychapter= macro after concluding your final chapter.
This will automatically generate a list of all references you used.



% -----------------------------------------------------------------------------
\section{Short citations}

To cite another author, you should primarily use the \code{\textbackslash parencite\{\}} and \code{\textbackslash textcite\{\}} macros.
As the names already suggest, they are used to cite inside of runnning text or inside of parentheses respecitively.
You may also pass page numbers as optional arguments.
The result renders as follows:

\begin{upbbox}[upbIrisViolet]
	\begin{tblr}{lcl}
		\code{\textbackslash textcite\{bringhurst2008\}}         & → & \textcite{bringhurst2008}         \\
		\code{\textbackslash textcite[10–15]\{bringhurst2008\}}  & → & \textcite[10–15]{bringhurst2008}  \\
		\code{\textbackslash parencite\{bringhurst2008\}}        & → & \parencite{bringhurst2008}        \\
		\code{\textbackslash parencite[10–15]\{bringhurst2008\}} & → & \parencite[10–15]{bringhurst2008}
	\end{tblr}
\end{upbbox}

If you want to incorporate a citation into your own sentence, you may use \code{\textbackslash textcite\{\}}. 
\code{\textbackslash parencite\{\}} should be used after direct citations as well as after a statement in your own words that you want to back up with a citation.
If you change parts of the quote or omit parts of it, indicate this with square brackets and the \code{\textbackslash textelp\{\}} macro respectively.
Please see the folowing examples:

\begin{upbbox}[upbIrisViolet]
	\begin{itemize}[leftmargin=*]
		\item \textquote[{\cite[39]{bringhurst2008}}]{Typography, like other arts, from cooking to choregraphy, involves a balance between the familiar and the unfamiliar, the dependably consistent and unforeseen.} 
		\item \textcite{bringhurst2008} writes that typography is \textquote[{\cite[24]{bringhurst2008}}]{like a musical performance or a theatrical production.} 
		\item In their book, \textcite{bringhurst2008} says that one should proplerly understand a text before setting it.
		\item A pica is equal to 12\,points \parencite[328]{bringhurst2008}.
		\item \textquote[{\cite[17]{bringhurst2008}}]{[T]ypography is an art \textelp{} [as well as] a craft by which the meanings of a text \textelp{} can be clarified, honored and shared, knowingly disguised.}
	\end{itemize}
\end{upbbox}

For direct quotation, you may also employ the \code{\textbackslash textquote[]\{\}} macro.
This macro will automatically put quotation marks around the enclosed text and add the citation behind it.
For the quotation, you then need to use the \code{\textbackslash cite\{\}} macro as \code{\textbackslash textquote[]\{\}} already encloses the citation in parentheses.
Note that you may need to enclose the \code{\textbackslash cite\{\}} macro in braces in some situations.
The first quote from the example above may be set like this:

\begin{upbbox}[upbIrisViolet]
	\code{\textbackslash textquote[\{\textbackslash cite[39]\{bringhurst2008\}\}]\{Typography, like other arts, …\}}
\end{upbbox}



% -----------------------------------------------------------------------------
\section{Block quotes}

The style of quote presented in the previous section lends itself better to shorter quotes.
If a quote spans more than three lines, you should most probably use a block quote.

\begin{displayquote}[{\cite[24]{bringhurst2008}}]
	While serving the reader in this way, typography, like a musical performance or a theatrical production, should serve two other ends.
	It should honor the text for its own sake~— always assuming that the text is worth a typographer’s trouble~– and it should honor and contribute to its own tradition: that of typography itself.
\end{displayquote}

This can be set using the \code{displayquote} environment.
As an optional argument, you may pass a citation with the \code{\textbackslash cite\{\}} macro, analogously to the \code{\textbackslash textquote\{\}} macro.


% -----------------------------------------------------------------------------
\section{Foreign quotes}

In theory, you set foreign language quotes in the style of the language you are quoting in.
However, this may create an inconsistent look if you quote material from other languages only sparingly.
If you include a lot of foreign langauge quotes alongside quotes in your thesis’ langauge, the constant shifts in style could also feel distracting.
Thus, it might be advisable to just stick to the style of the language you are writing in.

Yet, if you would like to use the foreign style, the \code{csquotes} package defines the appropriate macros. 
\code{\textbackslash foreigntextquote\{\}\{\}} works similar to \code{\textbackslash foreigntextquote\{\}}.
Here, you need to input the language of the quote into the first pair of braces.
Note that this language needs to be loaded by babel first.
A citation may be included in square brackets between the two pairs of braces.

\begin{upbbox}[upbIrisViolet]
	\foreigntextquote{german}[{\cite[7]{tschichold2001}}]{Häufig sind [diese Drucksachen] lärmende Orgien wildgewordener Buchstaben und selbstbewußt auftretender Wurstigkeit.}
\end{upbbox}

The \code{\textbackslash foreigndisplayquote} environment works similar to the \code{\textbackslash displayquote} environment.
Here, you need to include the language in enclosed in braces after the \code{\textbackslash begin} macro.
Again, a citation may follow in square brackets after the language specification.

\begin{foreigndisplayquote}{german}[{\cite[7]{tschichold2001}}]
	Liegt es nicht klar zutage, daß mit Schrift umzugehen keineswegs einfach ist?
	Beim Gang durch eine Stadt begegnen wir auf Schritt und Tritt häßlichen Namenzügen über den Läden, wie von Leuten entworfen, die nicht schreiben, sondern nur den eigenen Namen zur Not malen können, träge dahinfließend wie lauwarme Lava, eitel und unleserlich dazu.
\end{foreigndisplayquote}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item See the official documentation of \code{csquotes} by \textcite{csquotes}.
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Hyphens and dashes}

Not all horizontal lines are created equal—it is important to differentiate between a hyphen (-), a minus sign (−), an en-dash (–) and an em-dash (—).
The following sections demonstrate when to use which glyph.
\Cref{tbl:dashes} gives an overview of how to input the glyphs.

\begin{table}
	\caption{An overview of how to input German quotation marks}
	\label{tbl:dashes}
	\begin{tblr}{ccl}
		\toprule
			Glyph & \LaTeX{}     & E1                 \\
		\midrule
			-     & \code{-}     & \keys{-}           \\
			−     & \code{\$-\$} & \keys{Alt Gr + \#} \\
			–     & \code{--}    & \keys{Alt Gr + N}  \\
			—     & \code{---}   & \keys{Alt Gr + 4}  \\
		\bottomrule
	\end{tblr}
\end{table}



% -----------------------------------------------------------------------------
\section{Joining and splitting words}

The hyphen has two main use cases.
Firstly, the hyphen is used to split words over two lines of text.
Secondly, the hyphen can join two words together.

For some words, e.g., \emph{cost-effective}, their correct spelling includes a hyphen.
Sometimes, however, you may also want to join two or more words together to form a single adjectival unit
If you want to search for lead, a \emph{heavy metal detector} is a worse choice than a \emph{heavy-metal detector}—the former must weigh a lot and shows you all kinds of metal while the latter is specificly made for finding heavy metals (without a hyphen this time).

The German language allows for words to be joined togehter much more than English.
Thus, there is an increased need for the use of hyphens.
For example, you may join a group of words with hyphens such that you can use them as a single word.
There, it is important that you join all words togehter—it’s \emph{Universität Paderborn} but \emph{Universität-Paderborn-Studentin}, not \emph{Universität Paderborn-Studentin}.



% -----------------------------------------------------------------------------
\section{Setting off phrases}

Sometimes, you may want to set off phrases from the rest of a sentence.
This—as you might expect—comes with its own rules.

In American English, you set off phrases with an em-dash which is not surrounded by whitespace.

\begin{upbtitlebox}[upbIrisViolet]{American English}
	I wondered—is ts that difficult to use dashes correctly?
\end{upbtitlebox}

In British English and German, you set off phrases with an en-dash surrounded by word spaces.
There, the first word space should be non-breaking.

\begin{upbtitlebox}[upbIrisViolet]{British English and German}
	I wondered~– is it that difficult to use dashes correctly?
\end{upbtitlebox}



% -----------------------------------------------------------------------------
\section{Number ranges}

When giving a range of numbers, e.g., \emph{1918–1933}, you use an en-dash without any whitespace to join the numbers.
If you use this notation, you should refrain from using it in combination with \emph{from}. 
It is either \emph{from 1918 to 1933} or \emph{1918–1933}, never \emph{from 1918–1933}.
The same holds true for German texts using \emph{von} and \emph{bis}.

\term{Elision} is the technical term for a special king of number range notation.
There, you would for example reduce \emph{130–136} to \emph{130–6}.
As there are a number of different rules to follow, I would advise to writing out all number ranges without any elision—this much simpler and clearer.



% -----------------------------------------------------------------------------
\section{Connection and contrast}

The en-dash may be used to indicate a contrast or a connection between words.
For example, you may know the Church–Turing thesis.
Here, you connect the names of the two people behind it.
Only a person with the surname \emph{Church-Turing} could have formulated the Church-Turing thesis.
When writing in English, you do not use any space around such an en-dash.

In German typography, you should use thin spaces around such an en-dash.
Additionally, at least the first of these thin spaces should be non-breaking.
Thus, the example from above should be written as follows: Church\,–\,Turing-These.

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item For more information on English, see the book by \textcite[80–81]{bringhurst2008} and the chapter \emph{hyphens and dashes} in the book by \textcite{butterick2018}.
		\item For more information on German, see the book by \textcite[172–175]{forssman2021} as well as the guide by the \textcite[141–144,150–151]{rfdr2024}
	\end{itemize}
\end{upbtitlebox}






% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Colors}

The \code{thesisUPB} class gives you access to the official color scheme of Paderborn University.
These colors are presented in \Cref{tbl:colors}.

In \LaTeX{}, these colors can be accessed by the names denoted in the table.
To get the variations of the base colors, you can—for example—write \code{upbSkyBlue!90}.
The colors \code{upbUltraBlue}, \code{upbGarnetPink} and \code{upbLimeGreen} should only be used in their base verison.

To color text, you can use the \code{\textbackslash textcolor} macro, e.g., \textcolor{upbUltraBlue}{\code{\textbackslash textcolor\{upbUltraBlue\}\{like this\}}}.
Only those colors marked with {\sffamily A} are allowed to be used for coloring text.
Note that you may only use the base colors for coloring text.
Colors not marked with {\sffamily A} do not provide a sufficient contrast on a white page.
The ternary colors should only be used for small decorative elements.

\begin{htable}
	\caption{
		This table shows the official colors of Paderborn University.
		The row denoted by {\sffamily P} is the primary color.
		The rows denoted by {\sffamily S} are the secondard colors.
		The rows denoted by {\sffamily T} are the ternary colors.
		The {\sffamily A} signals accessible colors.
		The text color in each cell shows whether to use black or white text.
	}
	\label{tbl:colors}
	\begin{tblr}{
		column{1}={font=\sffamily\small},
		column{2}={font=\sffamily\small},
		column{4}={font=\sffamily\small\bfseries},
		column{5}={font=\sffamily\small\bfseries},
		column{6}={font=\sffamily\small\bfseries},
		column{7}={font=\sffamily\small\bfseries},
		column{8}={font=\sffamily\small\bfseries},
		column{9}={font=\sffamily\small\bfseries},
		column{10}={font=\sffamily\small\bfseries},
		column{11}={font=\sffamily\small\bfseries},
		column{12}={font=\sffamily\small\bfseries},
		cell{2}{1}={r=4}{l},
		cell{2}{2}={r=4}{l},
		cell{6}{1}={r=2}{l},
		cell{8}{1}={r=2}{l},
		cell{1}{4}={bg=upbUltraBlue, fg=white},
		cell{2}{4}={bg=upbSkyBlue, fg=white},
		cell{2}{5}={bg=upbSkyBlue!90, fg=white},
		cell{2}{6}={bg=upbSkyBlue!80, fg=white},
		cell{2}{7}={bg=upbSkyBlue!70, fg=white},
		cell{2}{8}={bg=upbSkyBlue!60, fg=white},
		cell{2}{9}={bg=upbSkyBlue!50, fg=white},
		cell{2}{10}={bg=upbSkyBlue!40, fg=black},
		cell{2}{11}={bg=upbSkyBlue!30, fg=black},
		cell{2}{12}={bg=upbSkyBlue!20, fg=black},
		cell{3}{4}={bg=upbSapphireBlue, fg=white},
		cell{3}{5}={bg=upbSapphireBlue!90, fg=white},
		cell{3}{6}={bg=upbSapphireBlue!80, fg=white},
		cell{3}{7}={bg=upbSapphireBlue!70, fg=white},
		cell{3}{8}={bg=upbSapphireBlue!60, fg=white},
		cell{3}{9}={bg=upbSapphireBlue!50, fg=white},
		cell{3}{10}={bg=upbSapphireBlue!40, fg=white},
		cell{3}{11}={bg=upbSapphireBlue!30, fg=white},
		cell{3}{12}={bg=upbSapphireBlue!20, fg=black},
		cell{4}{4}={bg=upbIrisViolet, fg=white},
		cell{4}{5}={bg=upbIrisViolet!90, fg=white},
		cell{4}{6}={bg=upbIrisViolet!80, fg=white},
		cell{4}{7}={bg=upbIrisViolet!70, fg=white},
		cell{4}{8}={bg=upbIrisViolet!60, fg=white},
		cell{4}{9}={bg=upbIrisViolet!50, fg=white},
		cell{4}{10}={bg=upbIrisViolet!40, fg=black},
		cell{4}{11}={bg=upbIrisViolet!30, fg=black},
		cell{4}{12}={bg=upbIrisViolet!20, fg=black},
		cell{5}{4}={bg=upbIrisViolet, fg=white},
		cell{5}{5}={bg=upbIrisViolet!90, fg=white},
		cell{5}{6}={bg=upbIrisViolet!80, fg=white},
		cell{5}{7}={bg=upbIrisViolet!70, fg=white},
		cell{5}{8}={bg=upbIrisViolet!60, fg=white},
		cell{5}{9}={bg=upbIrisViolet!50, fg=white},
		cell{5}{10}={bg=upbIrisViolet!40, fg=black},
		cell{5}{11}={bg=upbIrisViolet!30, fg=black},
		cell{5}{12}={bg=upbIrisViolet!20, fg=black},
		cell{6}{4}={bg=upbArcticBlue, fg=white},
		cell{6}{5}={bg=upbArcticBlue!90, fg=white},
		cell{6}{6}={bg=upbArcticBlue!80, fg=white},
		cell{6}{7}={bg=upbArcticBlue!70, fg=black},
		cell{6}{8}={bg=upbArcticBlue!60, fg=black},
		cell{6}{9}={bg=upbArcticBlue!50, fg=black},
		cell{6}{10}={bg=upbArcticBlue!40, fg=black},
		cell{6}{11}={bg=upbArcticBlue!30, fg=black},
		cell{6}{12}={bg=upbArcticBlue!20, fg=black},
		cell{7}{4}={bg=upbOceanBlue, fg=white},
		cell{7}{5}={bg=upbOceanBlue!90, fg=white},
		cell{7}{6}={bg=upbOceanBlue!80, fg=white},
		cell{7}{7}={bg=upbOceanBlue!70, fg=black},
		cell{7}{8}={bg=upbOceanBlue!60, fg=black},
		cell{7}{9}={bg=upbOceanBlue!50, fg=black},
		cell{7}{10}={bg=upbOceanBlue!40, fg=black},
		cell{7}{11}={bg=upbOceanBlue!30, fg=black},
		cell{7}{12}={bg=upbOceanBlue!20, fg=black},
		cell{8}{4}={bg=upbGarnetPink, fg=white},
		cell{9}{4}={bg=upbLimeGreen, fg=white}
	}
		\toprule
		P & A & \code{upbUltraBlue}    & 100\,\% &        &        &        &        &        &        &        &        \\
		\midrule
		S & A & \code{upbSkyBlue}      & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		  &   & \code{upbSapphireBlue} & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		  &   & \code{upbIrisViolet}   & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		  &   & \code{upbIrisViolet}   & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		\midrule
		S &   & \code{upbArcticBlue}   & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		  &   & \code{upbOceanBlue}    & 100\,\% & 90\,\% & 80\,\% & 70\,\% & 60\,\% & 50\,\% & 40\,\% & 30\,\% & 20\,\% \\
		\midrule
		T &   & \code{upbGarnetPink}   & 100\,\% &        &        &        &        &        &        &        &        \\
		  &   & \code{upbLimeGreen}    & 100\,\% &        &        &        &        &        &        &        &        \\
		\bottomrule
	\end{tblr}
\end{htable}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item Brandportal: \url{www.upb.de/en/university/press-communications-marketing/brandportal/basic-elements}
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Accessibility}

Designing a document to be more accessible to readers with impairments demands that you need to put some thought into certain design decisions.

One of the easiest things to do is to be aware of your use of color.
Of course, using color is okay.
However, a lot of people have some form of color vision deficiency leading to a decreased ability to distinguish differences in color.
Perhaps one of your supervisors has such an impairment!

To make your thesis more accessible to people with a color vision deficiency, \strong{do not use color as the onyly means to convey information}.
For example, if you want to include a chart showing some measurements you made, consider using different shapes for the data points and different line styles.
Of course, you are still allowed to use different colors but people who have a hard time distinguishing certain colors will have a much easier time to interpret your graph.

There is also simulation software that can help you to check whether a design is accessible to different kinds of color vision deficiency.
Alternatively, it can also be helpful to look at a monochrome version of a design.
If the difference in brightness of the different colors is clearly distinguishable, the choice of colors will most likely also be accessible to people with a color vision deficiency. 

Of course, there are other kinds of impairments that could be addressed.
However, unfortunately, \LaTeX{} is not able to properly write the \term{pdf} tags that help screenreaders read the body copy correctly for people with a complete loss of sight, for example.
Thus, the issue of accessibility becomes much more difficult—and you only have a limited amount of time for your thesis.


\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item Color Oracle software: \textcite{colororacle}
	\end{itemize}
\end{upbtitlebox}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Figures, Tables and (pseudo)code}

In \LaTeX{}, figures, tables, pseudocode and code snippets have one thing in common: they are usually set with floats.
These elements—unlike text—do not appear directly where you define them.
Instead, they are put at places which the engine deems to be good.
Usually, this will be at the top or bottom of a page.

As a general rule, you should always reference a figure, table or listing, i.e., all floating environments, which you include inside of your running text.
Every float should have a descriptive caption that aids its understanding.
If a caption is only one sentence long, you do not terminate them with a period.
Otherwise, all sentence should end with a period (or similar sentence-terminating punctuation).



% -----------------------------------------------------------------------------
\section{Figures}

Figures are any kind of visual, e.g., screenshots or diagrams.
To define them, you use the \code{figure} environment.
The caption of a figure sits below the visual.
Thus, you shoud use the \code{\textbackslash caption} macro after defining the picture.

The example figure in \Cref{fig:line-of-sight} was set using the instructions seen in \Cref{lst:line-of-sight}.
The picture is defined with the help of the \code{tikz} package.
If you simlpy want to include an image file, you may use the \code{\textbackslash includegraphics\{\}} macro.
As optional arguments, this macro may receive, for example, the width of the picture.
This allows for any length, such as \code{8cm}, or \code{0.9\textbackslash textwidth}.

\begin{listing}
	\caption{The \LaTeX{} source used to set \Cref{fig:line-of-sight}}
	\label{lst:line-of-sight}
	\begin{minted}{latex}
		\begin{figure}
			\begin{tikzpicture}[
				every node/.style={draw=black,shape=circle,fill=red,inner sep=2pt}
			]
				\node[inner sep=3pt] (start) at (0,4) {};
				\node[inner sep=3pt] (end) at (4,-0.25) {};

				\node (A) at (1,4.25) {};
				\node (B) at (2,3.75) {};
				\node (C) at (3,4.25) {};
				\node (D) at (4,3.75) {};
				\node (E) at (4.25,2.75) {};
				\node (F) at (3.75,1.75) {};
				\node (G) at (4.25,0.75) {};

				\draw[ultra thick] (start) -- (A) -- (B) -- (C) -- (D) --
								   (E) -- (F) -- (G) -- (end);

				\draw[red, dashed, draw opacity=0.5] (start) -- (B);
				\draw[red, dashed, draw opacity=0.5] (start) -- (C);
				\draw[red, dashed, draw opacity=0.5] (start) -- (D);
				\draw[red, thick, draw opacity=1.00] (start) -- (E);
				\draw[red, thick, draw opacity=1.00] (E) -- (end);

				\draw[fill=yellow] (0,-0.25) -- (3,-0.25) -- (3,3) -- (0,3) -- cycle;
			\end{tikzpicture}
			\caption{With line-of-sight testing, the zig-zag path shown in black can be
					 shortened to the path shown in red}
			\label{fig:line-of-sight}
		\end{figure}
	\end{minted}
\end{listing}

\begin{figure}
	\begin{tikzpicture}[
		every node/.style={draw=black,shape=circle,fill=red,inner sep=2pt}
	]
		\node[inner sep=3pt] (start) at (0,4) {};
		\node[inner sep=3pt] (end) at (4,-0.25) {};

		\node (A) at (1,4.25) {};
		\node (B) at (2,3.75) {};
		\node (C) at (3,4.25) {};
		\node (D) at (4,3.75) {};
		\node (E) at (4.25,2.75) {};
		\node (F) at (3.75,1.75) {};
		\node (G) at (4.25,0.75) {};

		\draw[ultra thick] (start) -- (A) -- (B) -- (C) -- (D) --
                           (E) -- (F) -- (G) -- (end);

		\draw[red, dashed, draw opacity=0.5] (start) -- (B);
		\draw[red, dashed, draw opacity=0.5] (start) -- (C);
		\draw[red, dashed, draw opacity=0.5] (start) -- (D);
		\draw[red, thick, draw opacity=1.00] (start) -- (E);
		\draw[red, thick, draw opacity=1.00] (E) -- (end);

		\draw[fill=yellow] (0,-0.25) -- (3,-0.25) -- (3,3) -- (0,3) -- cycle;
	\end{tikzpicture}
	\caption{With line-of-sight testing, the zig-zag path shown in black can be
			 shortened to the path shown in red}
	\label{fig:line-of-sight}
\end{figure}



% -----------------------------------------------------------------------------
\section{Tables}

To define a floating table, you use the \code{table} environment.
To typeset the table itself, this class loads the \texttt{tabularray} package.
The caption of a table sits above the visual.
Thus, you shoud use the \code{\textbackslash caption} macro before defining the table.

It is wise to use grid lines sparingly as a well-filled table implicitly forms a grid.
My recommendation is to left-align columns with text and right-align columns with numbers.
The \code{tblr} environment is configured such that it automatically switches to using lining figures, i.e., numbers which all take the same horizontal space.
This makes the comparison of numbers easier as the length of each number can be seen more easily.
When using numbers with a decimal point, make sure to use a uniform amount of figures after the decimal point such that the numbers align at the decimal point.

An example table if shown in \Cref{tbl:tblr-example} with the code being used to generate it shown in \Cref{lst:tblr-example}.
The \code{tblr} package also allows for the definition of more sophisticated layouts.
For example, the package also defines even more column types and supports coloring tables as well as multi-column or multi-row cells.

\begin{listing}
	\caption{The \LaTeX{} source used to set \Cref{tbl:tblr-example}}
	\label{lst:tblr-example}
	\begin{minted}{latex}
		\begin{tblr}{lr}
			\toprule
				Header & Header \\
			\midrule
				A short line             & 1.20 \\
				This line is much longer & 123.45 \\
			\bottomrule
		\end{tblr}
	\end{minted}
\end{listing}

\begin{table}
	\caption{An example for a table set with \texttt{tblr}}
	\label{tbl:tblr-example}
	\begin{tblr}{lr}
		\toprule
			Header	& Header	\\
		\midrule
			A short line             & 1.20 \\
			This line is much longer & 123.45 \\
		\bottomrule
	\end{tblr}
\end{table}



% -----------------------------------------------------------------------------
\section{Pseudocode}

If you want to typeset pseudocode, you can use the \code{algorithmic} environment from the \code{algpseudocodex} package eclosed in the \code{algorithm} environment to make it a float.
The caption of a pseudocode listing sits above the pseudocode.
Thus, you shoud use the \code{\textbackslash caption} macro before defining the pseudocode.
An example can be seen in \Cref{alg:example} with its \LaTeX{} source shown in \Cref{lst:pseudocode}.

\begin{listing}
	\caption{The \LaTeX{} source used to set \Cref{alg:example}}
	\label{lst:pseudocode}
		\begin{minted}{latex}
		\begin{algorithm}
			\caption{An example algorithm}
			\label{alg:example}
			\begin{algorithmic}
				\ForAll{$n \in \{1, \dots, 10\}$}
					\State $x \gets n^2$
					\State \Output $x$
				\EndFor
			\end{algorithmic}
		\end{algorithm}
	\end{minted}
\end{listing}

\begin{algorithm}
	\caption{An example algorithm}
	\label{alg:example}
	\begin{algorithmic}[1]
		\ForAll{$n \in \{1, \dots, 10\}$}
			\State $x \gets n^2$
			\State \Output $x$
		\EndFor
	\end{algorithmic}
\end{algorithm}



% -----------------------------------------------------------------------------
\section{Source code and pseudocode}

If you want to include source code, you use the \code{listing} environment defined by the \code{minted} package.
The code itself should be enclosed in the \code{minted} environment to which you can pass the language of the code as an argument, e.g., \code{\textbackslash begin\{minted\}\{python\}}.
The caption of a code listing sits above the visual.
Thus, you shoud use the \code{\textbackslash caption} macro before defining the listing.
An example can be seen in \Cref{lst:minted}.

\begin{hlisting}
	\caption{An example program set using \code{minted}}
	\label{lst:minted}
	\begin{minted}{latex}
		def fac(a: int) -> int:
			if a == 1:
				return 1
			return a * fac(a - 1)
	\end{minted}
\end{hlisting}

\begin{upbtitlebox}[upbSkyBlue]{Further reading}
	\begin{itemize}[leftmargin=*]
		\item See the official documentation of \code{tikz} by \textcite{tikz}.
		\item See the official documentation of \code{tabularray} by \textcite{tabularray}.
		\item See the official documentation of \code{algpseudocodex} by \textcite{algpseudocodex}.
		\item See the official documentation of \code{minted} by \textcite{minted}.
	\end{itemize}
\end{upbtitlebox}



% -----------------------------------------------------------------------------
\section{Placement}

The \code{figure}, \code{table} and \code{listing} environments try to put its contents on the top of a page.
Sometimes, this might lead to unwanted issues.
For that case, \code{thesisUPB} defines the \code{hfigure}, \code{htable} and \code{hlisting} environments.
If you use these environments, the contents will be output at the place where you defined them.
However, this should only be used sparingly when you do your final layout after the content has been finalized.



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Math}

Oftentimes, you might want to include mathematic formulas.
\LaTeX{} provides you with a lot of facilities to properly typeset them.
In fact, the engine has a separate math mode used to set all kinds of equations.



% -----------------------------------------------------------------------------
\section{Variables and simple equations}

If you want to, for example, set a simple quation such as $x = a + b$, you need to use dollar signs.
You enclose the equation like this: \code{\$x = a + b\$}.
Math mode takes care of the spacing.

If you know want to refer to $x$ again, for example, you should also enclose the varaible name in dollar signs, even though you do not need any special commands that only work in math mode or special spacing.
By doing this, you establish a visual similarity that helps recognizing it as a variable.



% -----------------------------------------------------------------------------
\section{Units and other text}

Sometimes, one want to include text inside of math mode.
For this, you can use the \code{\textbackslash textrm\{\}} macro.
There, you will most probably need to add spacing yourself.
If you include words or phrases, these should be spaces with word spaces.
When you want to include units for some numerical values, you should use thin spaces.

Outside of math mode, i.e., in your normal running text, you should also space numercal values and their units with a thin non-breaking space, e.g., 18\,°C.



% -----------------------------------------------------------------------------
\section{Display style equations}\label{sec:display-equation}

Sometimes, you may want to give equations some more vertical space so highlight them and to give them their proper form—they oftentimes appear a bit squished inside the running text.
For that, you can use the \code{align} and \code{align*} environments.
The difference between these two is that the version with the asterisk does not label each line with a number.
Hence, you should most often use \code{align*} as you should only number the lines you actually refer to later.

Here is an example equation which was set with the macros seen in \Cref{lst:equation}:
\begin{align*}
	\sum_{i=1}^{4} \frac{1}{i} &= \frac{1}{1} + \frac{1}{2} + \dots + \frac{1}{4} \\
							   &= \frac{25}{12}
\end{align*}

\begin{listing}
	\caption{The \LaTeX{} source used to set the equation in \Cref{sec:display-equation}}
	\label{lst:equation}
	\begin{minted}{latex}
		\begin{align*}
			\sum_{i=1}^{4} \frac{1}{i} &= \frac{1}{1} + \frac{1}{2} + \dots + \frac{1}{4} \\
									   &= \frac{25}{12}
		\end{align*}
	\end{minted}
\end{listing}



% -----------------------------------------------------------------------------
\section{Environments}

\code{thesisUPB} provides you with several environments you can use for structuring your document into definitions, observations, theorems, lemmas, corollaries and proofs.
These are quickly shown below

\begin{definition}{Definition}
Using the \code{definition} environment makes sense as it highlights definitions, making them easier to find.
\end{definition}

\begin{observation}{Observation}
Observations might contain small things that you want to highlight regarding something you described earlier.
\end{observation}

\begin{theorem}{Theorem}\label{thm:example}
Theorems are the most important theoretical results of your thesis.
\end{theorem}

\begin{proof}{Proof}
The \code{proof} environement frames your proofs and puts the expected box at the end.
\end{proof}

\begin{lemma}{Lemma}
Lemmata are smaller theoretical results which you use for your theorems.
\end{lemma}

\begin{corollary}{Corollary}
A corollary is a result that directly follows from a theorem or lemma.
\end{corollary}



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Bibliography
\bibliographychapter



% =============================================================================
% Appendix
\part*{Appendix}
\appendix



% :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\chapter{Example appendix chapter}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 


% -----------------------------------------------------------------------------
\section{Example text}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 


% -----------------------------------------------------------------------------
\section*{Example text}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 



% =============================================================================
% Colophon
\colophon

\end{document}
