More stuff

This commit is contained in:
Florian Hoss 2022-09-27 12:11:39 +02:00
parent 08bfa2f3d9
commit 5d5dbf6c73
2 changed files with 59 additions and 33 deletions

View file

@ -49,10 +49,13 @@ Vielleicht reicht auch Google\wwwlink{google.de}...
\section{Lstlisting} \section{Lstlisting}
\begin{lstlisting}[language=Bash] \begin{lstlisting} [caption=Zugriff auf Klassen über eine Nachschlagetabelle, label=code:lookup-table]
#!/bin/bash const bgColor = {
blue: "bg-blue-600",
echo "Hello World" red: "bg-red-600",
green: "bg-green-600",
};
bgColor[props.color]
\end{lstlisting} \end{lstlisting}
\section{Verbatim} \section{Verbatim}

View file

@ -34,8 +34,26 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Listings Paket % Listings Paket
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings,caption} \usepackage{listings,caption,pmboxdraw}
\definecolor{codebg}{rgb}{0.95,0.95,0.95} \definecolor{codebg}{rgb}{0.95,0.95,0.95}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\lstdefinelanguage{JavaScript}{
keywords={break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, this, throw, true, try, typeof, var, void, while, with, const},
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]",
ndkeywords={class, export, boolean, throw, implements, import, this},
keywordstyle=\color{blue}\bfseries,
ndkeywordstyle=\color{darkgray}\bfseries,
identifierstyle=\color{black},
commentstyle=\color{purple}\ttfamily,
stringstyle=\color{red}\ttfamily,
sensitive=true,
}
\lstset{ \lstset{
basicstyle =\ttfamily\color{black}\small, basicstyle =\ttfamily\color{black}\small,
keywordstyle =, keywordstyle =,
@ -47,11 +65,11 @@
breakatwhitespace, breakatwhitespace,
backgroundcolor={\color{codebg}}, backgroundcolor={\color{codebg}},
basewidth=0.5em, basewidth=0.5em,
numbers=left,
numberstyle=\tiny,
numbersep=-8pt,
language=JavaScript,
} }
\lstloadlanguages{
bash,
}
\usepackage{pmboxdraw}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography % Bibliography
@ -62,27 +80,15 @@
backend=biber, backend=biber,
urldate=long, urldate=long,
style=iso-authoryear, style=iso-authoryear,
natbib=true,
useauthor=true, useauthor=true,
mincitenames=1, mincitenames=1,
maxcitenames=3 maxcitenames=3,
maxbibnames=99,
]{biblatex} ]{biblatex}
\addbibresource{./bib/online.bib} \addbibresource{./bib/online.bib}
\addbibresource{./bib/book.bib} \addbibresource{./bib/book.bib}
\DeclareNameAlias{default}{family-given/given-family} \DeclareNameAlias{default}{family-given/given-family}
\renewcommand*{\finalnamedelim}{\addspace{}und\space}
\AtEveryCite{
\renewcommand*{\multinamedelim}{,\space}
\renewcommand*{\nameyeardelim}{\space}
}
\AtBeginBibliography{
\renewcommand*{\multinamedelim}{,\space}
}
\AfterTOCHead[lof]{\appto\autodot{:}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fussnoten % Fussnoten
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -133,11 +139,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Acronyms % Acronyms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{acro} % https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/acro/acro-manual.pdf
\usepackage{acro,supertabular,array}
\acsetup{
make-links=true,
list/template=supertabular,
list/heading=chapter*,
list/sort=true,
list/display=used,
list/name=Abkürzungsverzeichnis,
}
\DeclareAcronym{html}{short=HTML,long=HyperText Markup Language} \DeclareAcronym{html}{short=HTML,long=HyperText Markup Language}
\DeclareAcronym{js}{short=JS,long=JavaScript} \DeclareAcronym{js}{short=JS,long=JavaScript}
\usepackage{todonotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dokument % Dokument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -149,11 +167,16 @@
\tableofcontents \tableofcontents
\newpage \newpage
\listoffigures \listoffigures
\printacronyms \renewcommand\lstlistingname{Codefragment}
\addcontentsline{toc}{chapter}{Abkürzungen} \renewcommand\lstlistlistingname{Codeverzeichnis}
\lstlistoflistings
\printacronyms[heading=addchap]
\include{example/example} \include{example/example}
\printbibliography[title=Literaturverzeichnis] \printbibheading[title=Literaturverzeichnis]
\printbibliography[type=book,heading=subbibliography,title=Buch-Quellen]
\printbibliography[type=online,heading=subbibliography,title=Online-Quellen]
\end{document} \end{document}