Browse Source

improve table layout and stuff

Eren Yilmaz 5 years ago
parent
commit
0b80d83063
3 changed files with 111 additions and 97 deletions
  1. 77 70
      doc/chapter/2architecture.tex
  2. 30 23
      doc/chapter/3ui.tex
  3. 4 4
      doc/chapter/appendix.tex

+ 77 - 70
doc/chapter/2architecture.tex

@@ -51,44 +51,47 @@ Advantages of this architecture include:
 
 
 \section{System Requirements and Software Dependencies}\label{sec:systemRequirements}
-{
-\centering
-\small
-\begin{longtable}{l l p{6cm}}
-    \rowcolor{gray!50}
-    \textbf{Requirement} & \textbf{Minimum} & \textbf{Recommended} \\
-    Free disk space & 150MB & 150MB \\
-    \rowcolor{gray!25}
-    Free RAM & 300MB (single window) & More for multiple windows/graphs \\
-    \rowcolor{gray!25}
-    & & At least 2 GB for running the automatic tests. \\
-    Display & $1024 \times 768$ resolution & $1920 \times 1080$ resolution \\
-    \rowcolor{gray!25}
-    CPU & capable of running java applications & faster is better \\
-    GPU & capable of 2D rendering & rendering in $1920 \times 1080$ resolution\\
-    \rowcolor{gray!25}
-    Internet connection & not any & not any\\
-    \\
-    \caption{System Requirements}
-    \label{table:systemRequirements}
-\end{longtable}
-}
-
-{
-\centering
-\small
-\begin{longtable}{l p{1cm} p{6cm}}
-    \rowcolor{gray!50}
-    \textbf{Dependency} && \textbf{Version} \\
-    Java && $\geq8$ \\
-    \rowcolor{gray!25}
-    JSON-java~\cite{leary_json-java:_2018} && \\
-    Eclipse Layout Kernel~\cite{noauthor_elk:_2018} && \\
-    \\
+The software \appname relies on is listed in table~\ref{table:softwareDependencies}.
+The requirements to any system running \appname are demanded in table~\ref{table:systemRequirements}.
+
+\begin{table}[htp]
+    \centering
+    \small
+    \begin{tabular}{l p{1cm} p{6cm}}
+        \rowcolor{gray!50}
+        \textbf{Dependency} && \textbf{Version} \\
+        Java && $\geq8$ \\
+        \rowcolor{gray!25}
+        JSON-java~\cite{leary_json-java:_2018} && \\
+        Eclipse Layout Kernel~\cite{noauthor_elk:_2018} && \\
+        \\
+    \end{tabular}
     \caption[Software Dependencies]{Software Dependencies. If no version is given, all should work and the latest is recommended.}
     \label{table:softwareDependencies}
-\end{longtable}
-}
+\end{table}
+
+\begin{table}[htp]
+    \centering
+    \small
+    \begin{tabular}{l l p{6cm}}
+        \rowcolor{gray!50}
+        \textbf{Requirement} & \textbf{Minimum} & \textbf{Recommended} \\
+        Free disk space & 150MB & 150MB \\
+        \rowcolor{gray!25}
+        Free RAM & 300MB (single window) & More for multiple windows/graphs \\
+        \rowcolor{gray!25}
+        & & At least 2 GB for running the automatic tests. \\
+        Display & $1024 \times 768$ resolution & $1920 \times 1080$ resolution \\
+        \rowcolor{gray!25}
+        CPU & capable of running java applications & faster is better \\
+        GPU & capable of 2D rendering & rendering in $1920 \times 1080$ resolution\\
+        \rowcolor{gray!25}
+        Internet connection & not any & not any\\
+        \\
+    \end{tabular}
+    \caption{System Requirements}
+    \label{table:systemRequirements}
+\end{table}
 
 \section{Input File Format}\label{sec:inputFileFormat}
 The input to \appname\ is a JSON file.
@@ -105,51 +108,55 @@ For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is
 The classes for reading and writing those JSON files are displayed in figure~\ref{fig:io}.
 The internal representation of graphs is further explained in the section~\ref{sec:graph}.
 
-{
-\centering
-\small
-\begin{longtable}{|l|l|l|p{8.5cm}|}
-    \hline
-    Attribute & Type & Optional & Explanation \\\hline\hline
-    name & string & yes & If not omitted, this must be unique for a given parent node. \\\hline
-    width & integer & yes & The minimum width of the node.
-    The node can be wider if it contains other nodes that need more space.
-    If the whole layout is too large, it is resized, such that all nodes are proportionately shrunk: In that case the minimum width can be exceeded after the shrinking.
-    Default 40.\\\hline
-    height & integer & yes & The minimum height of the node.
-    The node can be higher if it contains other nodes that need more space.
-    If the whole layout is too large, it is resized, such that all nodes are proportionately shrunk: In that case the minimum height can be exceeded after the shrinking.
-    Default 40.\\\hline
-    dummy & boolean & yes & Iff this is explicitly set to true, then the node is a dummy node. This attribute is necessary, because we expect previous stages to have eliminated multilayer edges, see section~\ref{sec:assumptions}. \\\hline
-    layers & < < node > > & yes & The layers of nodes inside this node (Hierarchy). \\\hline
-    edges & < edge > & yes & The edges between nodes whose parent node is this node. \\\hline
-    \caption[Node Attributes]{Node Attributes. < \emph{element type} > is a list.}
-    \label{table:node-attributes}
-\end{longtable}
-}
-
-\begin{figure}[htp]
-    \centering
-    \includegraphics[width=\linewidth,trim=0 26cm 0 0,clip]{img/io.pdf}
-    \caption[Class diagram of the \code{graph.io} package]{Class diagram of the \code{graph.io} package, containing utilities for reading and writing graphs.}
-    \label{fig:io}
-\end{figure}
-
 \begin{table}[htp]
     \centering
     \small
-    \begin{longtable}{|l|l|l|p{8.5cm}|}
-        \hline
-        Attribute & Type & Optional & Explanation \\\hline\hline
+    \begin{tabular}{l l l p{8.5cm}}
+        \rowcolor{gray!50}
+        \textbf{Attribute} & \textbf{Type} & \textbf{Optional} & \textbf{Explanation} \\
         source & string & no & The name of the source of this edge.
         Must be a node with the same parent node as the node specified by the \code{target} attribute. \\\hline
+        \rowcolor{gray!25}
         target & string & no & The name of the target of this edge.
         Must be a node with the same parent node as the node specified by the \code{source} attribute. \\\hline
-    \end{longtable}
+    \end{tabular}
     \caption{Edge Attributes}
     \label{table:edge-attributes}
 \end{table}
 
+\begin{table}[htp]
+    \centering
+    \small
+    \begin{tabular}{l l l p{8.5cm}}
+        \rowcolor{gray!50}
+        \textbf{Attribute} & \textbf{Type} & \textbf{Optional} & \textbf{Explanation} \\
+        name & string & yes & If not omitted, this must be unique for a given parent node. \\
+        \rowcolor{gray!25}
+        width & integer & yes & The minimum width of the node.
+        The node can be wider if it contains other nodes that need more space.
+        If the whole layout is too large, it is resized, such that all nodes are proportionately shrunk: In that case the minimum width can be exceeded after the shrinking.
+        Default 40.\\
+        height & integer & yes & The minimum height of the node.
+        The node can be higher if it contains other nodes that need more space.
+        If the whole layout is too large, it is resized, such that all nodes are proportionately shrunk: In that case the minimum height can be exceeded after the shrinking.
+        Default 40.\\
+        \rowcolor{gray!25}
+        dummy & boolean & yes & Iff this is explicitly set to true, then the node is a dummy node. This attribute is necessary, because we expect previous stages to have eliminated multilayer edges, see section~\ref{sec:assumptions}. \\
+        layers & < < node > > & yes & The layers of nodes inside this node (Hierarchy). \\
+        \rowcolor{gray!25}
+        edges & < edge > & yes & The edges between nodes whose parent node is this node. \\\\
+    \end{tabular}
+    \caption[Node Attributes]{Node Attributes. < \emph{element type} > is a list.}
+    \label{table:node-attributes}
+\end{table}
+
+\begin{figure}[htp]
+    \centering
+    \includegraphics[width=\linewidth,trim=0 26cm 0 0,clip]{img/io.pdf}
+    \caption[Class diagram of the \code{graph.io} package]{Class diagram of the \code{graph.io} package, containing utilities for reading and writing graphs.}
+    \label{fig:io}
+\end{figure}
+
 %\begin{figure}[htp]
 %    \centering
 %    \includegraphics[width=0.9\textwidth]{img/json.png}

+ 30 - 23
doc/chapter/3ui.tex

@@ -72,32 +72,39 @@ Currently the two main ways to interact with the application are keyboard events
 The possible keyboard inputs are listed in table~\ref{table:keys}.
 To improve the user experience even further, these can also be used by clicking on one of the buttons displayed in figure~\ref{fig:full-application-example}.
 
-{
-\centering
-\small
-\begin{longtable}{|l|p{12cm}|}
-    \hline
-    Key & Action \\\hline\hline
-    Alt + Left arrow key & Perform one forward step of the algorithm, \enquote{step into}. \\\hline
-    Alt + Right arrow key & Perform one \enquote{step into} in backwards direction---i.e.\ undo one step of the algorithm. \\\hline
-    Alt + Up arrow key & Perform one \enquote{step over} in backwards direction. \\\hline
-    Alt + Down arrow key & Perform one \enquote{step over} in forwards direction. \\\hline
-    Alt + Page down & Perform one \enquote{step out} in forwards direction. \\\hline
-    Alt + Page up & Perform one \enquote{step out} in backwards direction. \\\hline
-    Alt + P & Activate automatic forwards execution. \\\hline
-    Alt + R & Activate automatic backwards execution. \\\hline
-    Alt + Pause & Pause automatic execution. \\\hline
-    Alt + G & Generate a random graph (opens dialog window~\ref{fig:random-graph-dialog}).
-    Ensures that the generated graph is connected.\\\hline
-    Alt + S & Save the current graph to a file (opens a dialog window). \\\hline
-    Alt + L & Load a graph from a file (opens a dialog window). \\\hline
-    Alt + D & Show a debug table (opens window~\ref{fig:debug-table}) and also printlines its content. \\\hline
-    Alt + O & Opens the preferences dialog~\ref{fig:preferences}. \\\hline
+\begin{table}[htp]
+    \centering
+    \small
+    \begin{longtable}{l p{12cm}}
+        \rowcolor{gray!50}
+        \textbf{Key} & \textbf{Action} \\
+        Alt + Left arrow key & Perform one forward step of the algorithm, \enquote{step into}. \\
+        \rowcolor{gray!25}
+        Alt + Right arrow key & Perform one \enquote{step into} in backwards direction---i.e.\ undo one step of the algorithm. \\
+        Alt + Up arrow key & Perform one \enquote{step over} in backwards direction. \\
+        \rowcolor{gray!25}
+        Alt + Down arrow key & Perform one \enquote{step over} in forwards direction. \\
+        Alt + Page down & Perform one \enquote{step out} in forwards direction. \\
+        \rowcolor{gray!25}
+        Alt + Page up & Perform one \enquote{step out} in backwards direction. \\
+        Alt + P & Activate automatic forwards execution. \\
+        \rowcolor{gray!25}
+        Alt + R & Activate automatic backwards execution. \\
+        Alt + Pause & Pause automatic execution. \\
+        \rowcolor{gray!25}
+        Alt + G & Generate a random graph (opens dialog window~\ref{fig:random-graph-dialog}).
+        Ensures that the generated graph is connected.\\
+        Alt + S & Save the current graph to a file (opens a dialog window). \\
+        \rowcolor{gray!25}
+        Alt + L & Load a graph from a file (opens a dialog window). \\
+        Alt + D & Show a debug table (opens window~\ref{fig:debug-table}) and also printlines its content. \\
+        \rowcolor{gray!25}
+        Alt + O & Opens the preferences dialog~\ref{fig:preferences}. \\
+    \end{longtable}
     \caption[Overview of the available keyboard commands]{Overview of the available keyboard commands.
     The lazy user might not want to learn these by rote but instead use the buttons displayed in figure~\ref{fig:full-application-example}.}
     \label{table:keys}
-\end{longtable}
-}
+\end{table}
 
 The decision to open new windows was made to save room in each single window.
 For example the fields for generating a random graph are rarely used, so the were chosen to be displayed in a separate dialog when needed.

+ 4 - 4
doc/chapter/appendix.tex

@@ -1,7 +1,7 @@
 \begin{table}[htp]
     \centering
     \small
-    \begin{longtable}{p{7cm} p{7cm}}
+    \begin{tabular}{p{7cm} p{7cm}}
         \rowcolor{gray!50}
         \textbf{Competency} & \textbf{Contributor} \\
         Producer & Eren Bora Yilmaz \\
@@ -28,7 +28,7 @@
         Black-Box Testing & Eren Bora Yilmaz \\
         \\\\\rowcolor{gray!25}
         Special Thanks & Jens Burmeister \\\\
-    \end{longtable}
+    \end{tabular}
     \caption{Contributors}
     \label{table:contributors}
 \end{table}
@@ -36,7 +36,7 @@
 \begin{table}[ht]
     \centering
     \small
-    \begin{longtable}{p{4cm} p{7cm} l}
+    \begin{tabular}{p{4cm} p{7cm} l}
         \rowcolor{gray!50}
         \textbf{Term} & \textbf{Explanation} & \textbf{Example} \\
         Phase & One phase of the Sugiyama approach~\cite{sugiyama_methods_1981} & Node Placement \\
@@ -54,7 +54,7 @@
         It can actually be executed, although we call it pseudocode. & see figure~\ref{fig:full-application-example} \\
         Processor & See section~\ref{sec:theActualAlgorithm}. & \\
         \\\\
-    \end{longtable}
+    \end{tabular}
     \caption{Glossary for the most difficult terms as we use them.}
     \label{table:glossary}
 \end{table}