Ver código fonte

improve tables, make them figures and somehow try to fix that bug where a page is too long

Eren Yilmaz 6 anos atrás
pai
commit
266f3549c7
3 arquivos alterados com 59 adições e 48 exclusões
  1. 41 33
      doc/chapter/2architecture.tex
  2. 14 11
      doc/chapter/3ui.tex
  3. 4 4
      doc/doc.tex

+ 41 - 33
doc/chapter/2architecture.tex

@@ -28,43 +28,48 @@ The classes for reading and writing those JSON files are displayed in figure~\re
 The internal representation of graphs is further explained in the section~\ref{sec:model}.
 
 \centering
-\begin{longtable}{|p{1.8cm}|p{2.3cm}|p{1.7cm}|p{8.5cm}|}
+\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 or smaller if the layout does not fit on the screen.
+    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 undercut.
     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 or smaller if the layout does not fit on the screen.
+    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 undercut.
     Default 40.\\\hline
     dummy & boolean & yes & Iff this is set to yes, then the node is a dummy node. \\\hline
-    layers & list of lists of nodes & yes & The layers of nodes inside this node (Hierarchy). \\\hline
-    edges & list of edges & yes & The edges between nodes whose parent node is this node. \\\hline
-    \caption{Node Attributes}
+    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. < \emph{element type} > is a list.}
     \label{table:node-attributes}
 \end{longtable}
+\raggedright
 
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth, trim={0 20cm 0 0}, clip]{img/io.pdf}
+    \includegraphics[width=\linewidth,trim=0 20cm 0 0,clip]{img/io.pdf}
     \caption[Class diagram of the \enquote{io} package]{Class diagram of the \enquote{io} package, containing utilities for reading and writing graphs.}
     \label{fig:io}
 \end{figure}
 
-\begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
-    \hline
-    Attribute & Type & Optional & Explanation \\\hline\hline
-    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 \enquote{target} attribute. \\\hline
-    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 \enquote{source} attribute. \\\hline
+\begin{table}[htp]
+    \centering
+    \begin{longtable}{|l|l|l|p{8.5cm}|}
+        \hline
+        Attribute & Type & Optional & Explanation \\\hline\hline
+        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 \enquote{target} attribute. \\\hline
+        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 \enquote{source} attribute. \\\hline
+    \end{longtable}
     \caption{Edge Attributes}
     \label{table:edge-attributes}
-\end{longtable}
-\raggedright
+\end{table}
 
-%\begin{figure}[tp]
+%\begin{figure}[htp]
 %    \centering
 %    \includegraphics[width=0.9\textwidth]{img/json.png}
 %    \caption[Input file format]{Input file format illustrated as a HERM diagram}
@@ -99,26 +104,29 @@ Similarly, edges have additional attributes:
 
 A class diagram of the package \enquote{model} is displayed in figure~\ref{fig:model}.
 
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth, trim={0 6cm 0 0}, clip]{img/model.pdf}
+    \includegraphics[width=\linewidth,trim=0 6cm 0 0,clip]{img/model.pdf}
     \caption{Class diagram of the \enquote{model} package.}
     \label{fig:model}
 \end{figure}
 
-\begin{longtable}{|p{2.8cm}|p{10cm}|}
-    \hline
-    Attribute & Explanation \\\hline\hline
-    root & The root node of the block of this node.
-    Unique for all nodes in the same block. \\\hline
-    sink & The topmost sink in the block graph that can be reached from the block that this node belongs to.
-    Only used for nodes that are the root of a block.
-    Unique for all nodes in the same class. \\\hline
-    shift & The shift of the class that this node belongs to.
-    Only used for nodes that are a sink of a class. \\\hline
+
+\begin{table}[htp]
+    \begin{longtable}{|l|p{10cm}|}
+        \hline
+        Attribute & Explanation \\\hline\hline
+        root & The root node of the block of this node.
+        Unique for all nodes in the same block. \\\hline
+        sink & The topmost sink in the block graph that can be reached from the block that this node belongs to.
+        Only used for nodes that are the root of a block.
+        Unique for all nodes in the same class. \\\hline
+        shift & The shift of the class that this node belongs to.
+        Only used for nodes that are a sink of a class. \\\hline
+    \end{longtable}
     \caption{Variables also used by Brandes and Köpf~\cite{brandes_fast_2001}}
     \label{table:bk-variables}
-\end{longtable}
+\end{table}
 
 \section{The actual algorithm}\label{sec:theActualAlgorithm}
 This section expects the reader to be familiar with the node placement algorithm by Brandes and Köpf~\cite{brandes_fast_2001}.
@@ -143,9 +151,9 @@ This works the following:
     \item The algorithm potentially calls the step function of other alogrithms while executing one step.
 \end{enumerate}
 
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
-    \includegraphics[width=\linewidth, trim={0 9cm 0 0}, clip]{img/algorithms_animated.pdf}
+    \includegraphics[width=\linewidth,trim=0 9cm 0 0,clip]{img/algorithms_animated.pdf}
     \caption{Class diagram of the package \enquote{algorithms.animated}.}
     \label{fig:animated}
 \end{figure}

+ 14 - 11
doc/chapter/3ui.tex

@@ -16,7 +16,7 @@ Note that since the application is still under construction, so not all screensh
     \end{subfigure}\\\vspace{4mm}
     \begin{subfigure}{\textwidth}
         \centering
-        \includegraphics[width=0.5\linewidth]{img/bk-example-ours}
+        \includegraphics[width=0.4\linewidth]{img/bk-example-ours}
         \caption[The same graph as~\ref{fig:theirs}, displayed by \appname.]{The same graph as~\ref{fig:theirs}, displayed by \appname.
         The layouts are leftmost (first column), rightmost (second column), lower (first row) and upper (second row), respectively.}
         \label{fig:ours}
@@ -25,7 +25,7 @@ Note that since the application is still under construction, so not all screensh
     \label{fig:originalpapergraph}
 \end{figure}
 
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
     \includegraphics[width=0.6\linewidth]{img/example}
     \caption[A simple graph with 5 nodes]{A simple graph with 5 nodes after the four extremal layout have been computed, but not balanced yet.
@@ -38,7 +38,7 @@ Note that since the application is still under construction, so not all screensh
     \label{fig:example}
 \end{figure}
 
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
     \includegraphics[width=\linewidth]{img/skizze}
     \caption[First sketch of the planned layout]{A first sketch of the planned layout, created with Microsoft Paint.
@@ -50,14 +50,17 @@ Note that since the application is still under construction, so not all screensh
 \section{User interface}\label{sec:userInterface}
 Currently the only way to interact with the application is by keyboard events.
 It is planned to add both additional commands as well as some kind of graphical interface, see chapter~\ref{ch:progress}.
+The possible inputs are listed in table~\ref{table:keys}.
 
-\begin{longtable}{|l|l|}
-    \hline
-    Key & Action \\\hline\hline
-    Left arrow key & Perform one forward step of the algorithm. \\\hline
-    Right arrow key & Perform one backward step (\enquote{undo one step}) of the algorithm. \\\hline
-    P & Pause/unpause the automatic execution. Initially paused. \\\hline
-    D & Print a debug table to standard out. \\\hline
+\begin{table}[htp]
+    \begin{longtable}{|l|l|}
+        \hline
+        Key & Action \\\hline\hline
+        Left arrow key & Perform one forward step of the algorithm. \\\hline
+        Right arrow key & Perform one backward step (\enquote{undo one step}) of the algorithm. \\\hline
+        P & Pause/unpause the automatic execution. Initially paused. \\\hline
+        D & Print a debug table to standard out. \\\hline
+    \end{longtable}
     \caption{Overview of the currently available keyboard commands.}
     \label{table:keys}
-\end{longtable}
+\end{table}

+ 4 - 4
doc/doc.tex

@@ -142,7 +142,7 @@ frame=tb}
 % \usepackage{scrhack} % Vermeidung einer Warnung
 
 %\newcommand{\svgfigure}[3]{
-%\begin{figure}[tp]
+%\begin{figure}[htp]
 %    \centering
 %    \includesvg{#1}
 %    \caption{#2}\label{#3}
@@ -150,7 +150,7 @@ frame=tb}
 %}
 
 \newcommand{\svgfigurewidth}[5]{
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
     \fontsize{8}{10}\selectfont
     \includesvg[width = #5]{#1}
@@ -159,7 +159,7 @@ frame=tb}
 }
 
 \newcommand{\svgfigurefullwidth}[4]{
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
     \includesvg[width = \textwidth]{#1}
     \caption[#2]{#3}\label{#4}
@@ -167,7 +167,7 @@ frame=tb}
 }
 
 \newcommand{\graphicsfigure}[3]{
-\begin{figure}[tp]
+\begin{figure}[htp]
     \centering
     \includegraphics[width=\linewidth]{#1}
     \caption{#2}\label{#3}