From 6d139b95da20a681d6cdf970836b0e7d2ecbf465 Mon Sep 17 00:00:00 2001 From: paul-loedige Date: Sat, 5 Feb 2022 22:16:51 +0100 Subject: [PATCH] added the funcionality learned in the Bsc thesis --- Acronyms.tex | 6 -- Appendix.tex | 19 ++++ Content.tex | 4 - Glossary.tex | 58 +++++++++++ Packages.tex | 131 ++++++++++++++++++++++-- Preface.tex | 39 ++++++- Template_Summary.tex | 10 +- chapters/ExamplePart/ExampleChapter.tex | 7 +- parts/ExamplePart.tex | 3 - 9 files changed, 249 insertions(+), 28 deletions(-) delete mode 100644 Acronyms.tex create mode 100644 Appendix.tex delete mode 100644 Content.tex create mode 100644 Glossary.tex delete mode 100644 parts/ExamplePart.tex diff --git a/Acronyms.tex b/Acronyms.tex deleted file mode 100644 index e1941c4..0000000 --- a/Acronyms.tex +++ /dev/null @@ -1,6 +0,0 @@ -%% -% list of acronyms -%% -\begin{acronym} - \acro{example}[EXMPL]{example of an acronym} -\end{acronym} \ No newline at end of file diff --git a/Appendix.tex b/Appendix.tex new file mode 100644 index 0000000..c51bbe1 --- /dev/null +++ b/Appendix.tex @@ -0,0 +1,19 @@ +\pagenumbering{roman} + +%glossary +\printglossary[nonumberlist] + +\newpage + +%bibliography +\phantomsection +\addcontentsline{toc}{chapter}{Literatur} +\bibliographystyle{IEEEtran-de} +\bibliography{Bibliography.bib} + +\newpage + +%appendix +\appendix +\chapter{Anhang} +\label{appendix} diff --git a/Content.tex b/Content.tex deleted file mode 100644 index 62a4a10..0000000 --- a/Content.tex +++ /dev/null @@ -1,4 +0,0 @@ -%all the main content goes here -\pagenumbering{arabic} - -\input{parts/ExamplePart.tex} \ No newline at end of file diff --git a/Glossary.tex b/Glossary.tex new file mode 100644 index 0000000..644ff85 --- /dev/null +++ b/Glossary.tex @@ -0,0 +1,58 @@ +%% +% all references for the glossary as well as the abbreviation list and nomenclature +%% +% add glossary for nomenclature +\newglossary{nomenclature}{nom}{ncl}{Nomenklatur} + +\shorthandon{"} +%-------------------- +%main glossary +%-------------------- +\newglossaryentry{example}{ + name=Example, + plural=Examples, + description={This is an example for a main glossary entry} + } + +%-------------------- +%acronyms +%-------------------- +\setabbreviationstyle[acronym]{long-short} + +\newacronym{EXP}{EXP}{Example} + +%-------------------- +%nomenclature +%-------------------- + +%add new key +\glsaddstoragekey{unit}{}{\glsentryunit} +\glsnoexpandfields + +\newcommand{\newnom}[5]{ + \newglossaryentry{#1}{ + name={#2}, + symbol={#3}, + description={#4}, + unit={#5}, + type=nomenclature, + sort={#1} + } +} +%use nomenclature entry (name + symbol) nomF=>First letter upper case +\newcommand{\nomf}[1]{\glsentryname{#1} \texorpdfstring{\glslink{#1}{\boldmath\ensuremath{\glsentrysymbol{#1}}}}{}\xspace} +\newcommand{\nomF}[1]{\Glsentryname{#1} \texorpdfstring{\glslink{#1}{\boldmath\ensuremath{\glsentrysymbol{#1}}}}{}\xspace} +%use nomenclature entry (name) nomS=>First letter upper case +\newcommand{\noms}[1]{\glsentryname{#1}\xspace} +\newcommand{\nomS}[1]{\Glsentryname{#1}\xspace} +%use nomenclature entry (symbol only) +\newcommand{\nomsym}[1]{\texorpdfstring{\glslink{#1}{\boldmath\ensuremath{\glsentrysymbol{#1}}}}{#1}\xspace} +%use nomenclature entry (use in equation) +\newcommand{\nomeq}[1]{\glslink{#1}{\glsentrysymbol{#1}}} + +\newnom{exampl}{Example}{e_xa_mp_le}{Example for a nomenclature entry}{\si{m}} + +\shorthandoff{"} + +\makeglossaries + diff --git a/Packages.tex b/Packages.tex index 4d31e67..feb2870 100644 --- a/Packages.tex +++ b/Packages.tex @@ -1,36 +1,153 @@ +%-------------------- %encoding +%-------------------- \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} + +%-------------------- %language -\usepackage[ngerman]{babel} +%-------------------- +\usepackage{babel} + +%-------------------- %images +%-------------------- \usepackage{graphicx} \graphicspath{ {./images/} } +%figure wrapping \usepackage{wrapfig} +%precise image placement \usepackage{float} %svg images \usepackage{svg} -%quotation + +%-------------------- +%german quotation +%-------------------- \usepackage[% left = \glqq,% right = \grqq,% leftsub = \glq,% rightsub = \grq% ]{dirtytalk} -%boxes -\usepackage[framemethod=tikz]{mdframed} + + +%-------------------- %enumeration +%-------------------- \usepackage{enumerate} +\usepackage[shortlabels]{enumitem} + +%-------------------- %references +%-------------------- \usepackage{hyperref} + +%-------------------- %for code snippets +%-------------------- \usepackage{xcolor} \usepackage{listings} -%acronyms -\usepackage[printonlyused]{acronym} +% highlight block in equations +\newcommand{\highlight}[2]{% + \colorbox{#1}{$\displaystyle#2$}} + +%-------------------- +%footnotes +%-------------------- +%fix footnotes at the bottom of the page +\usepackage[bottom]{footmisc} + +%-------------------- +%tables +%-------------------- +%enable X columns (columns with automatic width) +\usepackage{tabularx} +\newcolumntype{Y}{>{\centering\arraybackslash}X} %for centered X column +%table longer than one page +\usepackage{longtable} +%colorfull tables +\usepackage{colortbl} +%multirows in tables +\usepackage{multirow} +%enable line break in nomenclature +\usepackage{array} +%footnotes for tables +\usepackage{threeparttable} +%enable rotation of table headers +\newcommand\rothead{\bfseries\rotatebox{90}} + +%-------------------- +%glossary & acronyms +%-------------------- +\usepackage{datatool} +\usepackage[automake,acronym]{glossaries-extra} +%dynamic spaces after a link +\usepackage{xspace} + +%-------------------- %header and footer +%-------------------- \usepackage{fancyhdr} + +%-------------------- %custom font sizes +%-------------------- \usepackage{anyfontsize} + +%-------------------- %bibliography -\usepackage[square, numbers]{natbib} \ No newline at end of file +%-------------------- +\usepackage[square, numbers]{natbib} + +%-------------------- +%conditional formating +%-------------------- +\usepackage{ifthen} + +%-------------------- +%equations +%-------------------- +%math symbols and more +\usepackage{amsmath} +%special symbols +\usepackage{fontawesome} +%si units +\usepackage[output-decimal-marker={,}]{siunitx} +%referencing equations +\usepackage[noabbrev, nameinlink]{cleveref} +%decimal comma +\usepackage{icomma} +%bold math +\usepackage{bm} + +%-------------------- +%drawings & diagrams +%-------------------- +\usepackage{tikz,pgfplots} +\DeclareUnicodeCharacter{2212}{−} +\usepgfplotslibrary{groupplots,dateplot} +\pgfplotsset{compat=newest} +\usetikzlibrary{calc,3d,shapes.arrows,patterns,shapes.geometric} +\usepackage{pgf-umlsd} +\usepackage{environ} +\makeatletter +\newsavebox{\measure@tikzpicture} +\NewEnviron{scaletikzpicturetowidth}[1]{% + \def\tikz@width{#1}% + \def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}% + \BODY + \end{lrbox}% + \pgfmathparse{#1/\wd\measure@tikzpicture}% + \edef\tikzscale{\pgfmathresult}% + \BODY +} +\makeatother +%boxes +\usepackage[framemethod=tikz]{mdframed} + +%-------------------- +% landscape +%-------------------- +\usepackage{pdflscape} + diff --git a/Preface.tex b/Preface.tex index 633768f..1bdc9f4 100644 --- a/Preface.tex +++ b/Preface.tex @@ -1,11 +1,42 @@ +%% %all content that contains information about the main content (e.g. abbreviations) -\pagenumbering{roman} +%% +\pagenumbering{Roman} %table of contents \tableofcontents \clearpage -\chapter*{Abkürzungsverzeichnis} -\input{Acronyms.tex} +%list of figures +\addcontentsline{toc}{chapter}{\listfigurename} +\listoffigures +%list of tables +\addcontentsline{toc}{chapter}{\listtablename} +\listoftables +\clearpage +%abbreviations +\printglossary[type=\acronymtype, title=Abkürzungsverzeichnis, nonumberlist] +\clearpage + +%nomenclature +%custom style +\newglossarystyle{symbunitlong}{% + \setglossarystyle{long4col}% base this style on the list style + \renewcommand{\glsgroupskip}{}%avoids grouping the elements by alphabetical order + \renewenvironment{theglossary}{% Change the table type --> 4 columns + \renewcommand*{\arraystretch}{1.5} + \begin{longtable}{>{\centering}p{.1\textwidth} >{\arraybackslash}p{.225\textwidth} p{.475\textwidth}>{\centering\arraybackslash}p{.1\textwidth}}}% + {\end{longtable}}% + % + \renewcommand*{\glossaryheader}{% Change the table header + \bfseries\large Symbol & \bfseries\large Bezeichnung & \large\bfseries Beschreibung & \large\bfseries Einheit\\ + \hline\endhead}% + \renewcommand*{\glossentry}[2]{% Change the displayed items + \boldmath\ensuremath{\glossentrysymbol{##1}} + & \glstarget{##1}{\hspace*{0pt}\glossentryname{##1}} % + & \glossentrydesc{##1} + & \glsentryunit{##1}\tabularnewline + }% + } +\printglossary[type=nomenclature, nonumberlist, style=symbunitlong] -%acronyms \ No newline at end of file diff --git a/Template_Summary.tex b/Template_Summary.tex index b4c011c..cc57a15 100644 --- a/Template_Summary.tex +++ b/Template_Summary.tex @@ -1,4 +1,4 @@ -\documentclass[a4paper,12pt,oneside]{scrbook} +\documentclass[ngerman,regno,a4paper,12pt,oneside]{scrbook} %page format \usepackage[ a4paper, @@ -16,6 +16,7 @@ \def \MODULECOMPACT{EM} \def \DATE{\today} +\input{Glossary.tex} \begin{document} \input{TitlePage.tex} @@ -24,7 +25,12 @@ \input{Preface.tex} \clearpage - \input{Content.tex} + % {{{ Main Content% + \pagenumbering{arabic} + \part{Example Part} + \input{chapters/ExamplePart/ExampleChapter.tex} \clearpage + % }}} % + \input{Appendix.tex} \end{document} diff --git a/chapters/ExamplePart/ExampleChapter.tex b/chapters/ExamplePart/ExampleChapter.tex index 82f3050..90f96f2 100644 --- a/chapters/ExamplePart/ExampleChapter.tex +++ b/chapters/ExamplePart/ExampleChapter.tex @@ -1,5 +1,8 @@ \chapter{Example Chapter} -Example Text using \acs{example} +Example Text using \gls{example} and the acronym \gls{EXP} +\begin{equation} + \nomeq{exampl} +\end{equation} \clearpage \section{Example Section} -Example Page 2 \ No newline at end of file +Example Page 2 diff --git a/parts/ExamplePart.tex b/parts/ExamplePart.tex deleted file mode 100644 index efc1090..0000000 --- a/parts/ExamplePart.tex +++ /dev/null @@ -1,3 +0,0 @@ -\part{Example Part} - -\input{chapters/ExamplePart/ExampleChapter.tex} \ No newline at end of file