From 349a7e9c22b536639f28cb5dd78b7a1301cac1d9 Mon Sep 17 00:00:00 2001 From: Frederik Beimgraben Date: Sun, 17 Nov 2024 20:47:49 +0000 Subject: [PATCH] Move any Settings-Section to own "Module" File --- Content/01_content.tex | 6 +- TeX/{Tools => Modules}/Floats.tex | 0 TeX/{Tools => Modules}/InfoBlocks.tex | 82 +++++++++++++++++++++- TeX/{Tools => Modules}/Listings.tex | 0 TeX/{Tools => Modules}/MeetingPresence.tex | 0 TeX/Modules/ToC.tex | 16 +++++ TeX/Modules/Typography.tex | 6 ++ TeX/Modules/Watermark.tex | 16 +++++ TeX/Report.tex | 57 ++------------- 9 files changed, 131 insertions(+), 52 deletions(-) rename TeX/{Tools => Modules}/Floats.tex (100%) rename TeX/{Tools => Modules}/InfoBlocks.tex (69%) rename TeX/{Tools => Modules}/Listings.tex (100%) rename TeX/{Tools => Modules}/MeetingPresence.tex (100%) create mode 100644 TeX/Modules/ToC.tex create mode 100644 TeX/Modules/Typography.tex create mode 100644 TeX/Modules/Watermark.tex diff --git a/Content/01_content.tex b/Content/01_content.tex index 381faa5..9f8632c 100644 --- a/Content/01_content.tex +++ b/Content/01_content.tex @@ -41,4 +41,8 @@ \begin{CustomBox}{\faIcon{user}}{blue} \textbf{Info:} \lipsum[1] -\end{CustomBox} \ No newline at end of file +\end{CustomBox} + +\begin{VotingResults}{3}{2}{3} + \textbf{Abstimmung:} \lipsum[75] +\end{VotingResults} \ No newline at end of file diff --git a/TeX/Tools/Floats.tex b/TeX/Modules/Floats.tex similarity index 100% rename from TeX/Tools/Floats.tex rename to TeX/Modules/Floats.tex diff --git a/TeX/Tools/InfoBlocks.tex b/TeX/Modules/InfoBlocks.tex similarity index 69% rename from TeX/Tools/InfoBlocks.tex rename to TeX/Modules/InfoBlocks.tex index 2833f4c..0f75427 100644 --- a/TeX/Tools/InfoBlocks.tex +++ b/TeX/Modules/InfoBlocks.tex @@ -1,5 +1,13 @@ % !TEX root = ../../Main.tex +% ==== Colors ==== +\definecolor{britishracinggreen}{rgb}{0.0, 0.26, 0.15} +\definecolor{eggplant}{rgb}{0.38, 0.25, 0.32} +\definecolor{hanblue}{rgb}{0.27, 0.42, 0.81} +\definecolor{navyblue}{rgb}{0.0, 0.0, 0.5} +\definecolor{pansypurple}{rgb}{0.47, 0.09, 0.29} +\definecolor{shockingpink}{rgb}{0.99, 0.06, 0.75} + % ==== Base Case ==== % Define a counter to track nesting level \newcounter{coloredBoxLevel} @@ -176,4 +184,76 @@ \cBODY \end{ColoredBox} } -% ==== /Simpler Custom Boxes ==== \ No newline at end of file +% ==== /Simpler Custom Boxes ==== + +% ==== Voting results Environment ==== +% Using vote-yea Icon from fontawesome +\NewEnviron{VotingResultsBox}[1]{ + \let\VotingResultsBODY\BODY + \begin{ColoredBox}[ + icon={\faVoteYea}, + icon.color={#1}, + icon.prefix={}, + icon.fontsize={24pt}, + icon.offset.x={-0.2cm}, + icon.offset.y={0pt}, + background.color={#1} + ] + \VotingResultsBODY + \end{ColoredBox} +} +% ==== /Voting results Environment ==== + +% ==== Voting Results ==== +% Derived from `VotingResultsBox` +\NewEnviron{VotingResults}[3]{ + \let\voteBODY\BODY + + % Choose the color based on the vote results + \ifnum#1>#2 + \def\voteColor{britishracinggreen} + \else + \ifnum#1<#2 + \def\voteColor{red} + \else + \def\voteColor{eggplant} + \fi + \fi + + \begin{VotingResultsBox}{\voteColor} + \voteBODY + + \begin{multicols}{3} + \begin{CustomBox}{\faThumbsUp}{britishracinggreen} + \textbf{Ja:} #1 + \end{CustomBox} + \columnbreak + \begin{CustomBox}{\faThumbsDown}{red} + \textbf{Nein:} #2 + \end{CustomBox} + \columnbreak + \begin{CustomBox}{\faQuestion}{eggplant} + \textbf{Enthaltung:} #3 + \end{CustomBox} + \end{multicols} + \end{VotingResultsBox} +} +% ==== /Voting Results ==== + +% ==== Discussion Box ==== +% Derived from `ColoredBox` +\NewEnviron{DiscussionBox}[1][ + icon={\faComments}, + icon.color={hanblue}, + icon.prefix={}, + icon.fontsize={24pt}, + icon.offset.x={0pt}, + icon.offset.y={0pt}, + background.color={hanblue} +]{ + \let\dBODY\BODY + \begin{ColoredBox}[#1] + \dBODY + \end{ColoredBox} +} +% ==== /Discussion Box ==== \ No newline at end of file diff --git a/TeX/Tools/Listings.tex b/TeX/Modules/Listings.tex similarity index 100% rename from TeX/Tools/Listings.tex rename to TeX/Modules/Listings.tex diff --git a/TeX/Tools/MeetingPresence.tex b/TeX/Modules/MeetingPresence.tex similarity index 100% rename from TeX/Tools/MeetingPresence.tex rename to TeX/Modules/MeetingPresence.tex diff --git a/TeX/Modules/ToC.tex b/TeX/Modules/ToC.tex new file mode 100644 index 0000000..48b7006 --- /dev/null +++ b/TeX/Modules/ToC.tex @@ -0,0 +1,16 @@ +% !TEX root = ../../Main.tex +% ==== TOC ==== +% Set the toc page style to fancy +\tocloftpagestyle{fancy} + +% Page Numbering in the Table of Contents +\renewcommand\cftchappagefont{\blenderfont\color{gray}} +\renewcommand\cftsecpagefont{\blenderfont\color{gray}} +\renewcommand\cftsubsecpagefont{\blenderfont\color{gray}} +\renewcommand\cftsubsubsecpagefont{\blenderfont\color{gray}} + +% Chap/Sec/... Title in the Table of Contents +\renewcommand\cftchapfont{\blenderfont\color{gray}} +\renewcommand\cftsecfont{\blenderfont\color{gray}} +\renewcommand\cftsubsecfont{\blenderfont\color{gray}} +\renewcommand\cftsubsubsecfont{\blenderfont\color{gray}} \ No newline at end of file diff --git a/TeX/Modules/Typography.tex b/TeX/Modules/Typography.tex new file mode 100644 index 0000000..1162c8e --- /dev/null +++ b/TeX/Modules/Typography.tex @@ -0,0 +1,6 @@ +% !TEX root = ../../Main.tex +% ==== Page Style ==== +\pagestyle{fancy} + +% Line spacing +\renewcommand{\baselinestretch}{1.5} \ No newline at end of file diff --git a/TeX/Modules/Watermark.tex b/TeX/Modules/Watermark.tex new file mode 100644 index 0000000..a31f888 --- /dev/null +++ b/TeX/Modules/Watermark.tex @@ -0,0 +1,16 @@ +% !TEX root = ../../Main.tex +% ==== Watermark ==== +\newcounter{it} +\DraftwatermarkOptions{ + scale=0.08, + angle=45, + text={\begin{tabular}{c}% + \setcounter{it}{1}% + \whiledo{\theit<100}{% + \foreach \col in {0,...,15}{\color{black!5}\BeginAccSupp{ActualText=}\waterMarkText~~\EndAccSupp{}}\\% + \stepcounter{it}% + } + \end{tabular} + }, + color=black!12, +} \ No newline at end of file diff --git a/TeX/Report.tex b/TeX/Report.tex index 424c02e..4cd7876 100644 --- a/TeX/Report.tex +++ b/TeX/Report.tex @@ -9,56 +9,13 @@ \inputrelative{Settings/Logos} % ==== Tools ==== -\inputrelative{Tools/Listings} -\inputrelative{Tools/Floats} -\inputrelative{Tools/MeetingPresence} -\inputrelative{Tools/InfoBlocks} - -% ==== TOC ==== -% Set the toc page style to fancy -\tocloftpagestyle{fancy} - -% Page Numbering in the Table of Contents -\renewcommand\cftchappagefont{\blenderfont\color{gray}} -\renewcommand\cftsecpagefont{\blenderfont\color{gray}} -\renewcommand\cftsubsecpagefont{\blenderfont\color{gray}} -\renewcommand\cftsubsubsecpagefont{\blenderfont\color{gray}} - -% Chap/Sec/... Title in the Table of Contents -\renewcommand\cftchapfont{\blenderfont\color{gray}} -\renewcommand\cftsecfont{\blenderfont\color{gray}} -\renewcommand\cftsubsecfont{\blenderfont\color{gray}} -\renewcommand\cftsubsubsecfont{\blenderfont\color{gray}} - -% ==== Colors ==== -\definecolor{britishracinggreen}{rgb}{0.0, 0.26, 0.15} -\definecolor{eggplant}{rgb}{0.38, 0.25, 0.32} -\definecolor{hanblue}{rgb}{0.27, 0.42, 0.81} -\definecolor{navyblue}{rgb}{0.0, 0.0, 0.5} -\definecolor{pansypurple}{rgb}{0.47, 0.09, 0.29} -\definecolor{shockingpink}{rgb}{0.99, 0.06, 0.75} - -% ==== Page Style ==== -\pagestyle{fancy} - -% Line spacing -\renewcommand{\baselinestretch}{1.5} - -% ==== Watermark ==== -\newcounter{it} -\DraftwatermarkOptions{ - scale=0.08, - angle=45, - text={\begin{tabular}{c}% - \setcounter{it}{1}% - \whiledo{\theit<100}{% - \foreach \col in {0,...,15}{\color{black!5}\BeginAccSupp{ActualText=}\waterMarkText~~\EndAccSupp{}}\\% - \stepcounter{it}% - } - \end{tabular} - }, - color=black!12, -} +\inputrelative{Modules/Listings} +\inputrelative{Modules/Floats} +\inputrelative{Modules/MeetingPresence} +\inputrelative{Modules/InfoBlocks} +\inputrelative{Modules/Watermark} +\inputrelative{Modules/ToC} +\inputrelative{Modules/Typography} % ==== Glossary ==== \input{Content/99_glossary.tex}