diff --git a/.gitignore b/.gitignore index c30677a..36d6301 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ svg-inkscape/ *.alg *.acr *.acn +Main.pdf # Python *.pyc diff --git a/HSRTReport/Config/Fonts.tex b/HSRTReport/Config/Fonts.tex index 45d143c..06febaa 100644 --- a/HSRTReport/Config/Fonts.tex +++ b/HSRTReport/Config/Fonts.tex @@ -1,4 +1,4 @@ -% !TEX root = ../../HSRTReport.cls +% !TEX root = ../HSRTReport.cls % ============================================================================== % Fonts Configuration Module % ============================================================================== diff --git a/HSRTReport/Config/PageSetup.tex b/HSRTReport/Config/PageSetup.tex index bdd8373..3a12532 100644 --- a/HSRTReport/Config/PageSetup.tex +++ b/HSRTReport/Config/PageSetup.tex @@ -1,6 +1,6 @@ -% !TEX root = ../../HSRTReport.cls +% !TEX root = ../HSRTReport.cls % ============================================================================== -% Page Setup Module +% Page Setup Configuration Module % ============================================================================== % Description: Page layout configuration including headers, footers, and styling % Author: Frederik Beimgraben diff --git a/HSRTReport/HSRTReport.cls b/HSRTReport/HSRTReport.cls index 8ee6826..c3348e7 100644 --- a/HSRTReport/HSRTReport.cls +++ b/HSRTReport/HSRTReport.cls @@ -52,9 +52,9 @@ % Load the base class with options \LoadClass{\baseclass} -% ---------------------------------------- -% Imports -% ---------------------------------------- +% ============================================================================== +% Package Imports +% ============================================================================== % Load core packages first \input{\classPath/Config/Imports/Core} % Document structure packages @@ -64,9 +64,9 @@ % Graphics and TikZ packages \input{\classPath/Config/Imports/Graphics} -%---------------------------------------- -% REFS -%---------------------------------------- +% ============================================================================== +% Hyperref Configuration +% ============================================================================== % Hyperref already loaded in Imports-Document \hypersetup{ pdfpagemode={UseOutlines}, @@ -82,179 +82,11 @@ breaklinks=true } -%---------------------------------------- -% FONT SETUP -%---------------------------------------- -\renewcommand*\rmdefault{lmr} -\renewcommand*\sfdefault{lmss} -\definecolor{midnightblue}{rgb}{0.094, 0.051, 0.228} +% Font and page setup are loaded from configuration modules -\newfontfamily\blenderfont[ - Path=\fontsPath/Blender/, - Extension=.ttf, - UprightFont=*-Medium, - BoldFont=*-Bold, - ItalicFont=*-MediumItalic, - BoldItalicFont=*-BoldItalic -]{Blender} -\newfontfamily\dinfont[ - Path=\fontsPath/DIN/, - Extension=.ttf, - UprightFont=*-Regular, - BoldFont=*-Bold, - ItalicFont=*-Italic, - BoldItalicFont=*-BoldItalic -]{DIN} - -\setsansfont{Blender}[ - Path=\fontsPath/Blender/, - Extension=.ttf, - UprightFont=*-Medium, - BoldFont=*-Bold, - ItalicFont=*-MediumItalic, - BoldItalicFont=*-BoldItalic -] -\setmainfont{DIN}[ - Path=\fontsPath/DIN/, - Extension=.ttf, - UprightFont=*-Regular, - BoldFont=*-Bold, - ItalicFont=*-Italic, - BoldItalicFont=*-BoldItalic -] - - -%---------------------------------------- -% PAGE SETUP -%---------------------------------------- - -\pagestyle{fancy} - -\renewcommand{\headrulewidth}{0pt} - -%---------------------------------------- -% LOGOS -%---------------------------------------- - -% ==== Add more logos to be placed besides the main logo on the title page ==== -\newcommand{\logosScale}{1} -\newcommand{\mainLogoScale}{1} - -\newlength{\imageHeight} - - -\DeclareRobustCommand{\SetLogosScale}[1]{ - \renewcommand{\logosScale}{#1} -} - -\let\newglobalarray\newarray -\patchcmd{\newglobalarray}{\edef}{\xdef}{}{} - -% Set the array to expand the elements -\expandarrayelementtrue - -% AddLogo Command with automatic counter -% Array to store the logos and to be used in pgffor later -\newglobalarray\LogosPaths -\newglobalarray\LogosScales -\newglobalarray\LogosOpacities -\newglobalarray\LogosExtensions -\newcounter{logoCounter} -\setcounter{logoCounter}{0} -% Command to add a logo to the array -% Usage: \AddLogoToArray{}{}{} -\DeclareRobustCommand{\AddLogo}[4]{ -\stepcounter{logoCounter} -\LogosPaths(\thelogoCounter)={#1} -\LogosScales(\thelogoCounter)={#2} -\LogosOpacities(\thelogoCounter)={#3} -\LogosExtensions(\thelogoCounter)={#4} -} - -% Command to get opacity of a logo -\DeclareRobustCommand{\GetLogoOpacity}[1]{ - \expand{\LogosOpacities(#1)} -} - -% Command to add a data line for the title page (key, value) -% Use a token register to store the data -\newtoks\titlePageData -\def\tand{&} -\titlePageData={\tand} -\DeclareRobustCommand{\AddTitlePageDataSpace}[1]{ - % Add vertical space of size #1 - \titlePageData=\expandafter{\the\titlePageData \vspace{#1}} -} -\DeclareRobustCommand{\AddTitlePageDataLine}[2]{ - \titlePageData=\expandafter{\the\titlePageData\\ \textbf{#1}\tand #2} -} - -% Command to get all the data for the title page (to be inserted in tabular) -% ({tabular}{@{} p{40mm} l}) Key is always bold -\DeclareRobustCommand{\GetTitlePageDataTable}{ - \begin{tabular}{@{} p{30mm} p{\textwidth-30mm-2\tabcolsep}} - \the\titlePageData - \end{tabular} -} - -% ============================================================================= -\def\skylinePath{\classPath/Assets/Images/Skyline.svg} - -\newcommand{\footerYShift}{1.5em} -\newcommand{\footerXShift}{0.7em} - -% Define the logo and its position -\AtBeginPage{ - \setlength{\imageHeight}{2cm*\real{\mainLogoScale}*\real{\logosScale}*\real{0.45}} - \begin{tikzpicture}[overlay, remember picture] - % === Main Logo(s) === - \node[anchor=south east, inner sep=0pt, xshift=-\footerXShift, yshift=\footerYShift, opacity=0.0] (logo0) at (current page.south east) { - \strcompare{\thepage}{1}{}{ - \includegraphics[height=\imageHeight]{\imagesPath/DUMMY_FOOT.png} - } - }; - \ifnum\thepage=1 - \else - % For loop to place all logos - \foreach \i in {1,...,\value{logoCounter}} { - % Calculate name for i-1 - \pgfmathtruncatemacro{\prev}{\i-1} - \node[anchor=east, inner sep=0pt, xshift=-0.1cm, opacity=0.3] (logo\i) at (logo\prev.west) { - \makeatletter - \testarray{LogosScales}(\i) - \setlength{\imageHeight}{1.5cm*\real{\temp@macro}*\real{\logosScale}*\real{0.55}} - \testarray{LogosExtensions}(\i) - \let\extension\temp@macro - \testarray{LogosOpacities}(\i) - \let\opacity\temp@macro - \testarray{LogosPaths}(\i) - \ifthenelse{\equal{\extension}{svg}}{ - \begin{tikzpicture} - \node[opacity=\opacity] { - \includesvg[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension} - }; - \end{tikzpicture} - }{ - \begin{tikzpicture} - \node[opacity=\opacity] { - \includegraphics[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension} - }; - \end{tikzpicture} - } - \makeatother - }; - } - \fi - % Skyline - \node[anchor=south west, inner sep=0pt, yshift=0em] at (current page.south west) { - \includesvg[width=1.5\paperwidth]{\skylinePath} - }; - \end{tikzpicture} -} - -%---------------------------------------- -% TITLE PAGE -%---------------------------------------- +% ============================================================================== +% Title Page Configuration +% ============================================================================== \setkomafont{pagenumber}{\color{gray}\blenderfont\selectfont} \fancyhf{} @@ -289,9 +121,9 @@ \newcommand{\decoRule}{\rule{.8\textwidth}{.4pt}} -%---------------------------------------- -% TABLE OF CONTENTS / FIG / TAB -%---------------------------------------- +% ============================================================================== +% Table of Contents Configuration +% ============================================================================== % Page Numbering in the Table of Contents \renewcommand\cftchappagefont{\blenderfont\color{gray}} \renewcommand\cftsecpagefont{\blenderfont\color{gray}} @@ -330,23 +162,34 @@ \counterwithout{table}{chapter} \counterwithout{equation}{chapter} -% ---------------------------------------- -% Local Imports -% ---------------------------------------- +% ============================================================================== +% Module Includes +% ============================================================================== \input{\classPath/Pages/Titlepage.tex} -% ==== Configuration Modules ==== +% ------------------------------------------------------------------------------ +% Configuration Modules +% ------------------------------------------------------------------------------ +\input{\classPath/Config/Fonts} +\input{\classPath/Config/PageSetup} \input{\classPath/Config/GlossarySettings} \input{\classPath/Config/ToC} \input{\classPath/Config/Floats} \input{\classPath/Config/Typography} -% ==== Content Modules ==== +% ------------------------------------------------------------------------------ +% Content Modules +% ------------------------------------------------------------------------------ \input{\classPath/Modules/Content/Listings} -% ==== Layout Modules ==== +% ------------------------------------------------------------------------------ +% Layout Modules +% ------------------------------------------------------------------------------ +\input{\classPath/Modules/Layout/Logos} \input{\classPath/Modules/Layout/InfoBlocks} \input{\classPath/Modules/Layout/Watermark} -% ==== Tool Modules ==== +% ------------------------------------------------------------------------------ +% Tool Modules +% ------------------------------------------------------------------------------ \input{\classPath/Modules/Tools/WordCount} diff --git a/HSRTReport/Modules/Layout/Logos.tex b/HSRTReport/Modules/Layout/Logos.tex new file mode 100644 index 0000000..093e394 --- /dev/null +++ b/HSRTReport/Modules/Layout/Logos.tex @@ -0,0 +1,152 @@ +% !TEX root = ../../HSRTReport.cls +% ============================================================================== +% Logos Module +% ============================================================================== +% Description: Logo management and positioning for title and footer pages +% Author: Frederik Beimgraben +% License: Creative Commons CC BY 4.0 +% ============================================================================== + +% ============================================================================== +% Logo Scale Settings +% ============================================================================== +\newcommand{\logosScale}{1} +\newcommand{\mainLogoScale}{1} +\newlength{\imageHeight} + +% Set the scale for all logos +\DeclareRobustCommand{\SetLogosScale}[1]{ + \renewcommand{\logosScale}{#1} +} + +% ============================================================================== +% Logo Array Management +% ============================================================================== +% Configure array handling for global scope +\let\newglobalarray\newarray +\patchcmd{\newglobalarray}{\edef}{\xdef}{}{} + +% Enable array element expansion +\expandarrayelementtrue + +% ============================================================================== +% Logo Storage Arrays +% ============================================================================== +% Arrays to store logo properties +\newglobalarray\LogosPaths +\newglobalarray\LogosScales +\newglobalarray\LogosOpacities +\newglobalarray\LogosExtensions + +% Counter for number of logos +\newcounter{logoCounter} +\setcounter{logoCounter}{0} + +% ============================================================================== +% Logo Management Commands +% ============================================================================== +% Add a logo to the arrays +% Usage: \AddLogo{}{}{}{} +\DeclareRobustCommand{\AddLogo}[4]{ +\stepcounter{logoCounter} +\LogosPaths(\thelogoCounter)={#1} +\LogosScales(\thelogoCounter)={#2} +\LogosOpacities(\thelogoCounter)={#3} +\LogosExtensions(\thelogoCounter)={#4} +} + +% Get opacity value for a specific logo +\DeclareRobustCommand{\GetLogoOpacity}[1]{ + \expand{\LogosOpacities(#1)} +} + +% ============================================================================== +% Title Page Data Management +% ============================================================================== +% Token register to store title page data +\newtoks\titlePageData +\def\tand{&} +\titlePageData={\tand} + +% Add vertical space to title page data +\DeclareRobustCommand{\AddTitlePageDataSpace}[1]{ + \titlePageData=\expandafter{\the\titlePageData \vspace{#1}} +} + +% Add a data line to title page (key-value pair) +\DeclareRobustCommand{\AddTitlePageDataLine}[2]{ + \titlePageData=\expandafter{\the\titlePageData\\ \textbf{#1}\tand #2} +} + +% Get formatted title page data table +\DeclareRobustCommand{\GetTitlePageDataTable}{ + \begin{tabular}{@{} p{30mm} p{\textwidth-30mm-2\tabcolsep}} + \the\titlePageData + \end{tabular} +} + +% ============================================================================== +% Background Graphics Configuration +% ============================================================================== +% Path to skyline graphic +\def\skylinePath{\classPath/Assets/Images/Skyline.svg} + +% Footer positioning +\newcommand{\footerYShift}{1.5em} +\newcommand{\footerXShift}{0.7em} + +% ============================================================================== +% Logo Placement on Pages +% ============================================================================== +% Define logo positioning at beginning of each page +\AtBeginPage{ + \setlength{\imageHeight}{2cm*\real{\mainLogoScale}*\real{\logosScale}*\real{0.45}} + \begin{tikzpicture}[overlay, remember picture] + % === Main Logo(s) === + \node[anchor=south east, inner sep=0pt, xshift=-\footerXShift, yshift=\footerYShift, opacity=0.0] (logo0) at (current page.south east) { + \strcompare{\thepage}{1}{}{ + \includegraphics[height=\imageHeight]{\imagesPath/DUMMY_FOOT.png} + } + }; + \ifnum\thepage=1 + \else + % For loop to place all logos + \foreach \i in {1,...,\value{logoCounter}} { + % Calculate name for i-1 + \pgfmathtruncatemacro{\prev}{\i-1} + \node[anchor=east, inner sep=0pt, xshift=-0.1cm, opacity=0.3] (logo\i) at (logo\prev.west) { + \makeatletter + \testarray{LogosScales}(\i) + \setlength{\imageHeight}{1.5cm*\real{\temp@macro}*\real{\logosScale}*\real{0.55}} + \testarray{LogosExtensions}(\i) + \let\extension\temp@macro + \testarray{LogosOpacities}(\i) + \let\opacity\temp@macro + \testarray{LogosPaths}(\i) + \ifthenelse{\equal{\extension}{svg}}{ + \begin{tikzpicture} + \node[opacity=\opacity] { + \includesvg[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension} + }; + \end{tikzpicture} + }{ + \begin{tikzpicture} + \node[opacity=\opacity] { + \includegraphics[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension} + }; + \end{tikzpicture} + } + \makeatother + }; + } + \fi + % Skyline + \node[anchor=south west, inner sep=0pt, yshift=0em] at (current page.south west) { + \includesvg[width=1.5\paperwidth]{\skylinePath} + }; + \end{tikzpicture} +} + +% ============================================================================== +% End of Logos Module +% ============================================================================== diff --git a/Main.pdf b/Main.pdf index 89c057d..8d70ced 100644 Binary files a/Main.pdf and b/Main.pdf differ diff --git a/Main.tex b/Main.tex index dc74ebb..13aab9f 100644 --- a/Main.tex +++ b/Main.tex @@ -6,7 +6,7 @@ onecolumn ]{HSRTReport/HSRTReport} -\input{TeX/Preamble} +\input{Preamble} \input{Glossary} % ==== Document ==== @@ -21,5 +21,6 @@ \input{Content/01_content} \input{Content/99_bibliography} +% Add all remaining glossary entries that have not been used \glsaddallunused \end{document} diff --git a/Preamble.tex b/Preamble.tex new file mode 100644 index 0000000..ebd9a1d --- /dev/null +++ b/Preamble.tex @@ -0,0 +1,21 @@ +% !TEX root = ./Main.tex +% ============================================================================== +% Document Preamble +% ============================================================================== +% Description: Document-specific configuration and settings +% ============================================================================== + +% ------------------------------------------------------------------------------ +% Bibliography Configuration +% ------------------------------------------------------------------------------ +\addbibresource{Main.bib} + +% ------------------------------------------------------------------------------ +% Document Settings +% ------------------------------------------------------------------------------ +\input{Settings/General} +\input{Settings/Logos} + +% ============================================================================== +% End of Preamble +% ============================================================================== diff --git a/TeX/Settings/General.tex b/Settings/General.tex similarity index 53% rename from TeX/Settings/General.tex rename to Settings/General.tex index db7135a..f4d6591 100644 --- a/TeX/Settings/General.tex +++ b/Settings/General.tex @@ -1,15 +1,27 @@ -% !TEX root = ../../Main.tex +% !TEX root = ../Main.tex +% ============================================================================== +% Document-Specific General Settings +% ============================================================================== +% Description: Title, author, abstract, and other document metadata +% ============================================================================== +% ------------------------------------------------------------------------------ +% Watermark and Date Configuration +% ------------------------------------------------------------------------------ % Meeting date \newcommand{\waterMarkText}{} % Current date and time \createdon{XX.XX.20XX} -% Title +% ------------------------------------------------------------------------------ +% Document Title +% ------------------------------------------------------------------------------ \title{Vorgaben zur Formatierung der Seminararbeit} -% Data fields for the title page +% ------------------------------------------------------------------------------ +% Title Page Data Fields +% ------------------------------------------------------------------------------ \AddTitlePageDataLine{Thema}{ Thema-XXX: \newline Vorgaben zur Formatierung der Seminararbeit @@ -34,19 +46,32 @@ \AddTitlePageDataLine{Wortanzahl}{\quickwordcount{Content/01_content}} % !!! Only 01_content.tex !!! +% ------------------------------------------------------------------------------ % Abstract +% ------------------------------------------------------------------------------ \newcommand{\titlepageabstract}{% Das Abstract beschreibt in wenigen Sätzen die Zielsetzung und das Ergebnis der Ausarbeitung. Das Abstract muss sich vollständig auf der Titelseite befinden. Die Zeichensatzformatierung wird in einem eigenen Absatz beschrieben Das Abstract soll es den Lesern:innen ermöglichen, innerhalb von wenigen Augenblicken zu erfassen, welcher Inhalt hinter der Überschrift steckt und ob das Thema, aus Sicht der Leser:innen, zur weiteren Bearbeitung lohnt. Das Abstract ist keine verbale Beschreibung des Inhaltsverzeichnisses, sondern gibt kurz und knapp z.B. die Zielsetzung (z.B. Hypothese), die eingesetzten Methoden und die erzielten Ergebnisse / Erkenntnisse bekannt. Weitere Hinweise finden Sie außerdem im Vorlesungsskript. } +% ------------------------------------------------------------------------------ % Keywords +% ------------------------------------------------------------------------------ \newcommand{\titlepagekeywords}{% Seminararbeit, wissenschaftliche Ausarbeitung, Bachelor-Thesis, Studium, Plagiat } -% List of equations +% ------------------------------------------------------------------------------ +% List of Equations Configuration +% ------------------------------------------------------------------------------ \renewcommand{\listequationsname}{Formeln und Gleichungen} \renewcommand{\equationname}{Formel} +% ------------------------------------------------------------------------------ +% Paragraph Configuration +% ------------------------------------------------------------------------------ % Disable indentation \setlength{\parindent}{0pt} + +% ============================================================================== +% End of General Settings +% ============================================================================== diff --git a/Settings/Logos.tex b/Settings/Logos.tex new file mode 100644 index 0000000..e00f974 --- /dev/null +++ b/Settings/Logos.tex @@ -0,0 +1,25 @@ +% !TEX root = ../Main.tex +% ============================================================================== +% Logo Configuration +% ============================================================================== +% Description: Document-specific logo selection and configuration +% ============================================================================== + +% ------------------------------------------------------------------------------ +% Available Logos +% ------------------------------------------------------------------------------ +% STUPA Logo +%\AddLogo{STUPA}{1.1}{0.7}{png} + +% INF Logo (Informatik Kombiniert) +\AddLogo{INF_Kombiniert}{0.9}{1}{svg} + +% HSRT Logo (Hochschule Reutlingen) +% \AddLogo{HSRT}{1.7}{1}{png} + +% METI Logo +% \AddLogo{METI}{1.0}{0.5}{png} + +% ============================================================================== +% End of Logo Configuration +% ============================================================================== diff --git a/TeX/Preamble.tex b/TeX/Preamble.tex deleted file mode 100644 index df6562a..0000000 --- a/TeX/Preamble.tex +++ /dev/null @@ -1,10 +0,0 @@ -% !TEX root = ../Main.tex - -% ==== Document-specific configuration ==== -% Bibliography resource -\addbibresource{Main.bib} - -% ==== Settings ==== -\input{TeX/Settings/General} -\input{TeX/Settings/Logos} -% ==== /Settings ==== diff --git a/TeX/Settings/Logos.tex b/TeX/Settings/Logos.tex deleted file mode 100644 index 1991dbf..0000000 --- a/TeX/Settings/Logos.tex +++ /dev/null @@ -1,13 +0,0 @@ -% !TEX root = ../../Main.tex - -% STUPA Logo -%\AddLogo{STUPA}{1.1}{0.7}{png} - -% INF Logo -\AddLogo{INF_Kombiniert}{0.9}{1}{svg} - -% HSRT Logo -% \AddLogo{HSRT}{1.7}{1}{png} - -% METI Logo -% \AddLogo{METI}{1.0}{0.5}{png}