Skip to content

Commit

Permalink
feat: tikz-uml and a user defined flow chart
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Dünkelmann <[email protected]>
  • Loading branch information
MartinX3 committed Jun 20, 2024
1 parent ad3a61a commit 21e3a39
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:
steps:
- name: Install TeX Live
run: sudo apt update && sudo apt install biber latexmk texlive texlive-bibtex-extra texlive-lang-german texlive-latex-extra texlive-luatex
- name: Install tikz-uml
run: |
wget https://perso.ensta-paristech.fr/~kielbasi/tikzuml/var/files/src/tikzuml-v1.0-2016-03-29.tbz -P /tmp
tar -xjf /tmp/tikzuml-v1.0-2016-03-29.tbz -C /tmp
mkdir -p ~/texmf/tex/latex/tikz-uml/
cp /tmp/tikzuml-v1.0-2016-03-29/tikz-uml.sty ~/texmf/tex/latex/tikz-uml/
texhash ~/texmf
- name: Install the arial font
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
Expand Down
59 changes: 53 additions & 6 deletions abschnitte/Auswertung.tex
Original file line number Diff line number Diff line change
@@ -1,9 +1,56 @@
\chapter{Auswertung}\label{ch:auswertung}


\section{Flowchart-Diagramm}\label{sec:flowchart-diagramm}
\enquote{Prozesse sollten wann immer möglich grafisch modelliert werden!}
Um textuell beschriebene Prozesse mit zugehörigen Varianten und Negativfällen besser zu verstehen, werden diese visualisiert und durch Beschreibungen ergänzt.
Dazu eignen sich \enquote{Swimlane}-Diagramme.
Diese gehören zur Gruppe der Prozessablaufdiagramme.


\begin{figure}[H]
Hier wird ein beispielhaftes Flussdiagramm aufgezeigt.
\begin{center}
\begin{tikzpicture}[node distance=2cm]
\node (start) [startstop] {Start};
\node (in1) [io, below of=start] {Input};
\node (pro1) [process, below of=in1] {Process 1};
\node (dec1) [decision, below of=pro1, yshift=-0.5cm] {Decision 1};

\node (pro2a) [process, below of=dec1, yshift=-1cm] {Process 2a
text text text text
text text text
text text text};

\node (pro2b) [process, right of=dec1, xshift=2cm] {Process 2b};
\node (out1) [io, below of=pro2a] {Output};
\node (stop) [startstop, below of=out1] {Stop};

\draw [arrow] (start) -- (in1);
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (dec1);
\draw [arrow] (dec1) -- node[anchor=east] {yes} (pro2a);
\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
\draw [arrow] (pro2b) |- (pro1);
\draw [arrow] (pro2a) -- (out1);
\draw [arrow] (out1) -- (stop);
\end{tikzpicture}
\caption{Beispiel Flowchart}\label{fig:beispiel-flowchart}
\end{center}
\end{figure}

\begin{landscape}
\section{Flowchart-Diagramme}\label{sec:flowchart-diagramme}
\enquote{Prozesse sollten wann immer möglich grafisch modelliert werden!}
Um textuell beschriebene Prozesse mit zugehörigen Varianten und Negativfällen besser zu verstehen, werden diese visualisiert und durch Beschreibungen ergänzt.
Dazu eignen sich \enquote{Swimlane}-Diagramme.
Diese gehören zur Gruppe der Prozessablaufdiagramme.
\end{landscape}
\begin{figure}[H]
\begin{center}
\begin{tabular}{|c|c||c|c|c|c|c|c|c|c|c||c||c|c|}
\hline
P & Q & $\neg$ & ( P & $\vee$ & Q ) & $\vee$ & ( $\neg$ & P & $\wedge$ & Q ) & $\equiv$ & $\neg$ & P \\ \hline \hline
0 & 0 & 1 & 0 & 0 & 0 & $\mathbf{1}$ & 1 & 0 & 0 & 0 & & $\mathbf{1}$ & 0 \\ \hline
0 & 1 & 0 & 0 & 1 & 1 & $\mathbf{1}$ & 1 & 0 & 1 & 1 & & $\mathbf{1}$ & 0 \\ \hline
1 & 0 & 0 & 1 & 1 & 0 & $\mathbf{0}$ & 0 & 1 & 0 & 0 & & $\mathbf{0}$ & 1 \\ \hline
1 & 1 & 0 & 1 & 1 & 1 & $\mathbf{0}$ & 0 & 1 & 0 & 1 & & $\mathbf{0}$ & 1 \\ \hline
\end{tabular}
\caption{Wahrheitstabelle: $\neg$ ( P $\vee$ Q ) $\vee$ ( $\neg$ P $\wedge$ Q ) $\equiv$ $\neg$ P}\label{fig:figureFormulaTable0}
\end{center}
\end{figure}
\end{landscape}
35 changes: 35 additions & 0 deletions aussehen/hbrs-inf-diagrams.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{aussehen/hbrs-inf-diagrams}[2024/06/20 hbrs-inf-diagrams theming Package]

% Not in ctan, you need to install it yourself.
\RequirePackage{tikz-uml}

% Flussdiagramme konfigurieren
\usetikzlibrary{shapes.geometric, arrows}
\tikzstyle{startstop} = [rectangle, rounded corners,
minimum width=3cm,
minimum height=1cm,
text centered,
draw=black,
fill=red!30]
\tikzstyle{io} = [trapezium,
trapezium stretches=true, % A later addition
trapezium left angle=70,
trapezium right angle=110,
minimum width=3cm,
minimum height=1cm, text centered,
draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle,
minimum width=3cm,
minimum height=1cm,
text centered,
text width=3cm,
draw=black,
fill=orange!30]
\tikzstyle{decision} = [diamond,
minimum width=3cm,
minimum height=1cm,
text centered,
draw=black,
fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
5 changes: 4 additions & 1 deletion aussehen/hbrs-inf.sty
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{aussehen/hbrs-inf}[2024/03/26 hbrs-inf theming Package]
\ProvidesPackage{aussehen/hbrs-inf}[2024/06/20 hbrs-inf theming Package]

% Enable the arial font
\RequirePackage{fontspec}
Expand Down Expand Up @@ -30,6 +30,9 @@
% Verbessert den gesamten Textfluss und behebt die meisten unschönen "Overflow"-Warnungen im Fließtext
\RequirePackage{microtype}

% Diagramme erstellen
\RequirePackage{aussehen/hbrs-inf-diagrams}

% Quellcode einfügen und highlighten
\RequirePackage[outputdir=out]{minted} % Needs python installed and to be loaded before csquotes

Expand Down

0 comments on commit 21e3a39

Please sign in to comment.