diff --git a/.gitignore b/.gitignore index 0509c59..fdd247b 100644 --- a/.gitignore +++ b/.gitignore @@ -120,7 +120,7 @@ acs-*.bib *.sls # uncomment this for glossaries-extra (will ignore makeindex's style files!) -# *.ist +*.ist # gnuplot *.gnuplot @@ -312,3 +312,6 @@ TSWLatexianTemp* *.glstex # End of https://www.toptal.com/developers/gitignore/api/latex + +# ignore generated pdf file +main.pdf \ No newline at end of file diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..4310bac --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,31 @@ +# make file for latex +@default_files = ('main.tex'); + +$pdflatex = 'pdflatex %O -interaction=nonstopmode -shell-escape %S'; + +# Specify the bibliography +$bibtex = 'bibtex %O %B'; +$makeglossaries = 'makeglossaries %O %B'; + +# Continuous preview mode +$continuous_mode = 1; + +# Output to PDF +$pdf_mode = 1; + +# Keep auxiliary files +$clean_ext = ""; + +add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); +add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); +$clean_ext .= " acr acn alg glo gls glg"; + +sub makeglossaries { + my ($base_name, $path) = fileparse( $_[0] ); + my @args = ( "-q", "-d", $path, $base_name ); + if ($silent) { unshift @args, "-q"; } + return system "makeglossaries", "-d", $path, $base_name; +} + +# Silence warnings +$silent = 1; \ No newline at end of file diff --git a/acros.tex b/acros.tex new file mode 100644 index 0000000..0441155 --- /dev/null +++ b/acros.tex @@ -0,0 +1,21 @@ +% ===================================================================== +% Declare your acronyms in this file. +% This file must be included in the prelude in order to work +% +% Example: +% \DeclareAcronym{usa}{ +% short=USA, +% long=United States of America, +% } +% +% Use with: \acs{usa} +% +% Available options: +% - short: The short form of the acronym. +% - long: The long form of the acronym. +% - plural: The plural form of the acronym. +% - class: The class of the acronym, such as "abbrev" or "nomenclature". +% - first-style: The style of the first occurrence of the acronym. +% - single: The text to use for a single occurrence of the acronym. +% - list: The text to use for a list of occurrences of the acronym. + diff --git a/chapter/chapter-introduction.tex b/chapter/chapter-introduction.tex new file mode 100644 index 0000000..272b4d8 --- /dev/null +++ b/chapter/chapter-introduction.tex @@ -0,0 +1,2 @@ +\section{Einleitung} +\loremipsum \ No newline at end of file diff --git a/config/author.tex b/config/author.tex new file mode 100644 index 0000000..c96e1ac --- /dev/null +++ b/config/author.tex @@ -0,0 +1,22 @@ +% about this document +\def\reportTitle{Erklärung wesentlicher Bestandteile des Templates} +\def\reportSubtitle{Untertitel} +\def\reportType{T1000} +\def\reportStudyYear{1} +\def\reportFaculty{Technik} +\def\reportStudy{Informationstechnik} +\def\reportTheoryLocation{Mannheim} +\def\reportSubmissionDate{10. Mai 2022} +\def\reportEditingPeriod{1. Januar 2022 - 29. März 2022} + +% about the author +\def\authorName{Sven Vogel} +\def\authorMatriculationNumber{1191225} +\def\authorCourse{TINF22IT2} +\def\authorCompany{ABB} +\def\authorSupervisor{Herbert Grönemeier} + +% set document information +\title{\reportTitle} +\author{\reportAuthor} +\date{\reportTitle} \ No newline at end of file diff --git a/config/minted.tex b/config/minted.tex new file mode 100644 index 0000000..074935d --- /dev/null +++ b/config/minted.tex @@ -0,0 +1,16 @@ +% custom colors +\definecolor{minted-background}{rgb}{0.95, 0.95, 0.95} + +% global theme +\usemintedstyle{tango} + +% set global options for all listings +% these can also be applied locally to individual listings +\setminted { + linenos=true, % enable line numbers + bgcolor=minted-background, % background color + resetmargins=true, + tabsize=4, % white spaces for tabs + xleftmargin=24pt, % margin to the left side. + escapeinside=|| % symbols used to escape LaTeX +} diff --git a/config/pages.tex b/config/pages.tex new file mode 100644 index 0000000..6e63f00 --- /dev/null +++ b/config/pages.tex @@ -0,0 +1,32 @@ +% set page margins +\newgeometry { + left=3cm, + right=2cm, + top=2cm, + bottom=2cm, + includehead +} + +% configure hyper links +\hypersetup{ + bookmarksopen=false, + bookmarksnumbered=true, + bookmarksopenlevel=0, + pdftitle=\reportTitle, + pdfsubject=\reportTitle, + pdfauthor=\authorName, + pdfborder={0 0 0} % disable border +} + +\captionsetup*[figure]{name=Bild} +\captionsetup*[table]{name=Tabelle} +\captionsetup*[listing]{name=Quelltext} + +% mak line numbering on the right side (outside) of the header +\pagestyle{fancy} +\fancyhf{} +\fancyhead[R]{\thepage} +\renewcommand{\headrulewidth}{0.5pt} + +% line spacing: 1.5 +\onehalfspacing diff --git a/extra/fixes.tex b/extra/fixes.tex new file mode 100644 index 0000000..fcbbda0 --- /dev/null +++ b/extra/fixes.tex @@ -0,0 +1,6 @@ + + +% NOTE: +% increase head height to fix warning of fancyhdr package +% complaining about it being to small +\setlength{\headheight}{15pt} diff --git a/extra/utils.tex b/extra/utils.tex new file mode 100644 index 0000000..3e76e6e --- /dev/null +++ b/extra/utils.tex @@ -0,0 +1,23 @@ +% make the @ symbol available as character for command names +% requried for some commands to work +\makeatletter + +% lorem ipsum constant +% used for testing purposes only +\def\loremipsum { +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +} + +% apply this as scaling for images to make them fit available space +\def\ScaleIfNeeded{ + \ifdim\Gin@nat@width>\linewidth + \linewidth + \else + \Gin@nat@width + \fi +} + +% qouted text +\newcommand{\gqq}[1]{\glqq #1\grqq} + +\makeatother \ No newline at end of file diff --git a/glossary.tex b/glossary.tex new file mode 100644 index 0000000..f351e6f --- /dev/null +++ b/glossary.tex @@ -0,0 +1,13 @@ +% Defne your glossary entries here +% They will be sorted and automatically generated +% +% Example: +% \newglossaryentry{Python}{ +% name=Python, +% description={ +% Python ist eine populäre Hochsprache. +% }, +% } +% +% They can then be referenced in the text via: +% \Gls{Python} diff --git a/main.tex b/main.tex new file mode 100644 index 0000000..a3ac909 --- /dev/null +++ b/main.tex @@ -0,0 +1,73 @@ +\documentclass[a4paper, 12pt]{article} + +% ===================================================================== +% latex packages to use +\usepackage{graphicx} % Required for inserting images +\usepackage{longtable} % Tables that can overflow pages +\usepackage{setspace} % for more spacing control +\usepackage{geometry} % for margin control +\usepackage{tabularx} % extension of tabular environment that allows dynamic widths +\usepackage{hyperref} % for referecing stuff +\usepackage{fancyhdr} % fancy headers +\usepackage{import} % advanced document import +\usepackage{pdfpages} % include multipage pdf documents +\usepackage{tikz} % graphics, diagrams, logic +\usepackage{imakeidx} % inhaltsverzeichnis +\usepackage{nomencl} % nomenclature +\usepackage{acro} % acronyms +\usepackage[ngerman]{babel} % german language support +\usepackage[labelfont=bf]{caption} % make caption title fat +\usepackage{wrapfig} % for figures wrapping text wraps around +\usepackage{minted} % highlighted code blocks +\usepackage[toc,style=altlist]{glossaries} +\usepackage{tocloft} % control over the typography of the Table of Contents, etc. +\usepackage{listings} % code listings +\usepackage{color} % more colors +\usepackage{tikz} % painting +\usepackage{tikz-imagelabels} % overlay labels for images + +\makeindex +\makenomenclature +\makeglossaries + +% include acronym definitions +\input{acros} +\input{glossary} +% include file with fixes and workaround +% as well as special settings +\input{extra/fixes} + +\begin{document} + + % ===================================================================== + % include configuration files + \include{config/author} % meta information about author + \include{config/pages} % set page configuration + \include{config/minted} % set minted configuration + + \input{extra/utils} % some utility stuff + + % ===================================================================== + % meta pages will have roman line numbering + \pagenumbering{Roman} + + % include documents in the directory pages/ + \include{pages/page-01-title} + \include{pages/page-02-indipendence-declaration} + \include{pages/page-03-lock-notice} + \include{pages/page-04-abstract} + \include{pages/page-05-summary} + \include{pages/page-06-preface} + \include{pages/page-07-indices} + + % ===================================================================== + % chapter + \pagenumbering{arabic} + + % add section title to header + \pagestyle{fancy} + \fancyhead[L]{\nouppercase{\leftmark}} + % include all used chapters + \input{pages/page-08-chapter} + +\end{document} diff --git a/multmedia/logo-abb.pdf b/multmedia/logo-abb.pdf new file mode 100644 index 0000000..07b6ffd Binary files /dev/null and b/multmedia/logo-abb.pdf differ diff --git a/multmedia/logo-dhbw.pdf b/multmedia/logo-dhbw.pdf new file mode 100644 index 0000000..123731a Binary files /dev/null and b/multmedia/logo-dhbw.pdf differ diff --git a/pages/page-01-title.tex b/pages/page-01-title.tex new file mode 100644 index 0000000..70c6f4d --- /dev/null +++ b/pages/page-01-title.tex @@ -0,0 +1,69 @@ +\begin{titlepage} + + % ===================================================================== + % logos of ABB and DHBW + \begin{minipage}{0.22\textwidth} + \includegraphics[width=\textwidth]{multmedia/logo-abb.pdf} + \end{minipage} + \hfill + \begin{minipage}{0.25\textwidth} + \raggedleft + \includegraphics[width=\textwidth]{multmedia/logo-dhbw.pdf} + \end{minipage} + + % ===================================================================== + % centered general document information + \vspace*{2cm} + \begin{center} + % titles + \LARGE\bf + \reportTitle + \\ + \Large\rm + \singlespacing + \reportSubtitle + \vspace*{2cm} + + % report type + \bf + \reportType + \vspace*{0.5cm} + + % time + \singlespacing + \normalsize\rm + Praxisphase des \reportStudyYear Studienjahrs + \vspace*{0.5cm} + + % location + an der Fakultät für \reportFaculty \\ + im Studiengang \reportStudy \\ + \vspace*{0.5cm} + \singlespacing + an der \\ + DHBW \reportTheoryLocation + \vfill + \end{center} + + % ===================================================================== + % author information + \begin{tabular}{ll} + Verfasser: & \authorName \\ + Bearbeitungszeitraum: & \reportEditingPeriod \\ + Matrikelnummer, Kurs: & \authorMatriculationNumber, \authorCourse \\ + Ausbildungsbetrieb: & \authorCompany \\ + Betr. Betreuer: & \authorSupervisor \\ + Abgabedatum: & \reportSubmissionDate \\ + \end{tabular} + \vspace*{1.5cm} + + % ===================================================================== + % signing section + Unterschrift des betrieblichen Betreuers + \hfill + \rule{6cm}{0.3mm} + +\end{titlepage} + +% start counting pages at 1 (this will be page 1) +\setcounter{page}{2} \ No newline at end of file diff --git a/pages/page-02-indipendence-declaration.tex b/pages/page-02-indipendence-declaration.tex new file mode 100644 index 0000000..44d92f5 --- /dev/null +++ b/pages/page-02-indipendence-declaration.tex @@ -0,0 +1,24 @@ +\addcontentsline{toc}{section}{Selbständigkeitserklärung} +\thispagestyle{empty} % no line numbering +\begin{center} + \vspace*{2cm} + \Huge\bf Selbständigkeitserklärung \\ + \vspace*{3cm} + \large\rm\singlespacing + Ich versichere hiermit, dass ich meine\\ + Prüfung mit dem Thema\\ + \vspace*{2cm} + \Large\bf\reportTitle\\ + \Large\rm\reportSubtitle\\ + \vspace*{2cm} + \large\rm + \singlespacing + selbständig verfasst und keine anderen als die angegebenen \\ + Quellen und Hilfsmittel benutzt habe. + Ich versichere zudem, dass die eingereichte elektronische Fassung mit der gedruckten Fassung übereinstimmt. \\ + \vfill + \begin{tabularx}{\textwidth}{l@{\extracolsep\fill}l} + \rule{7cm}{0.3mm} & \rule{7cm}{0.3mm} \\ + Ort, Datum & Unterschrift \\ + \end{tabularx} +\end{center} diff --git a/pages/page-03-lock-notice.tex b/pages/page-03-lock-notice.tex new file mode 100644 index 0000000..fdf2cc7 --- /dev/null +++ b/pages/page-03-lock-notice.tex @@ -0,0 +1,20 @@ +\addcontentsline{toc}{section}{Sperrvermerk} +\thispagestyle{empty} +\cleardoublepage +\begin{center} + \vspace*{2cm} + \Huge\bf Sperrvermerk\\ + \vspace*{2cm} + \large\rm + \begin{quotation} + Der Inhalt dieser Arbeit darf weder als Ganzes noch in Auszü\-gen Personen außerhalb des Prüfungsprozesses und des Evaluationsverfahrens zugänglich gemacht werden, sofern keine anders lautende Genehmigung der Ausbildungsstätte vorliegt. + \end{quotation} + \vspace*{2cm} + \begin{tabularx}{\textwidth}{l@{\extracolsep\fill}l} + \rule{7cm}{0.3mm} & \rule{7cm}{0.3mm} \\ + Ort, Datum & Unterschrift \\ + \end{tabularx} +\end{center} + +\pagebreak +\newpage \ No newline at end of file diff --git a/pages/page-04-abstract.tex b/pages/page-04-abstract.tex new file mode 100644 index 0000000..d6a9e63 --- /dev/null +++ b/pages/page-04-abstract.tex @@ -0,0 +1,12 @@ +% create hyperlinkable pyhntom section (this is only for reference) +\phantomsection +\addcontentsline{toc}{section}{\protect{Abstract}} + +% print some actual visible heading +\begin{flushleft} + \Large\bf Abstract +\end{flushleft} + +% your text here! +% vvvvvvvvv +\loremipsum \ No newline at end of file diff --git a/pages/page-05-summary.tex b/pages/page-05-summary.tex new file mode 100644 index 0000000..fecb364 --- /dev/null +++ b/pages/page-05-summary.tex @@ -0,0 +1,12 @@ +% create hyperlinkable pyhntom section (this is only for reference) +\phantomsection +\addcontentsline{toc}{section}{\protect{Zusammenfassung}} + +% print some actual visible heading +\begin{flushleft} + \Large\bf Zusammenfassung +\end{flushleft} + +% your text here! +% vvvvvvvvv +\loremipsum \ No newline at end of file diff --git a/pages/page-06-preface.tex b/pages/page-06-preface.tex new file mode 100644 index 0000000..ae8fe2a --- /dev/null +++ b/pages/page-06-preface.tex @@ -0,0 +1,12 @@ +% create hyperlinkable pyhntom section (this is only for reference) +\phantomsection +\addcontentsline{toc}{section}{\protect{Vorwort}} + +% print some actual visible heading +\begin{flushleft} + \Large\bf Vorwort +\end{flushleft} + +% your text here! +% vvvvvvvvv +\loremipsum \ No newline at end of file diff --git a/pages/page-07-indices.tex b/pages/page-07-indices.tex new file mode 100644 index 0000000..8d2d896 --- /dev/null +++ b/pages/page-07-indices.tex @@ -0,0 +1,47 @@ +% ===================================================================== +% this file contains calls the commands which auto generate tables of +% figures, contents, tables, etc. + +% table of contents +\cleardoublepage +\addcontentsline{toc}{section}{Inhaltsverzeichnis} +\tableofcontents +\newpage + +% figures +\cleardoublepage +\addcontentsline{toc}{section}{\listfigurename} +\listoffigures +\newpage + +% tables +\cleardoublepage +\addcontentsline{toc}{section}{\listtablename} +\listoftables +\newpage + +% code listings +% define custom german title for code lisitng +\def\listlistingname{Quelltextverzeichnis} +% add list of contents entry for code listing +\renewcommand\listoflistingscaption{\listlistingname} +\addcontentsline{toc}{section}{\listlistingname} +% print used listings +\listoflistings +\newpage + +% nomenclature +\printnomenclature +\newpage + +\renewcommand{\glossaryname}{Glossar} +\printglossaries +\newpage + +%acronyms +% will be sorted automatically by alpabetic order +\cleardoublepage +\def\listacronymname{Abkürzungsverzeichnis} +\addcontentsline{toc}{section}{\listacronymname} +\printacronyms +\newpage \ No newline at end of file diff --git a/pages/page-08-chapter.tex b/pages/page-08-chapter.tex new file mode 100644 index 0000000..9fc5894 --- /dev/null +++ b/pages/page-08-chapter.tex @@ -0,0 +1,5 @@ +% ===================================================================== +% Every chapter used in the document has to be included here + +% include actual chapters +\include{chapter/chapter-introduction} \ No newline at end of file