Browse Source

use eclipse-style inline code instead of enquote blocks

Eren Yilmaz 6 years ago
parent
commit
e62b46d441
2 changed files with 33 additions and 28 deletions
  1. 27 28
      doc/chapter/2architecture.tex
  2. 6 0
      doc/doc.tex

+ 27 - 28
doc/chapter/2architecture.tex

@@ -61,7 +61,7 @@ The internal representation of graphs is further explained in the section~\ref{s
 \begin{figure}[htp]
 \begin{figure}[htp]
     \centering
     \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{graph.io} package]{Class diagram of the \enquote{graph.io} package, containing utilities for reading and writing graphs.}
+    \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}
     \label{fig:io}
 \end{figure}
 \end{figure}
 
 
@@ -71,9 +71,9 @@ The internal representation of graphs is further explained in the section~\ref{s
         \hline
         \hline
         Attribute & Type & Optional & Explanation \\\hline\hline
         Attribute & Type & Optional & Explanation \\\hline\hline
         source & string & no & The name of the source of this edge.
         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
+        Must be a node with the same parent node as the node specified by the \code{target} attribute. \\\hline
         target & string & no & The name of the target of this edge.
         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
+        Must be a node with the same parent node as the node specified by the \code{source} attribute. \\\hline
     \end{longtable}
     \end{longtable}
     \caption{Edge Attributes}
     \caption{Edge Attributes}
     \label{table:edge-attributes}
     \label{table:edge-attributes}
@@ -94,35 +94,34 @@ The internal representation of graphs is further explained in the section~\ref{s
 \end{figure}
 \end{figure}
 
 
 
 
-\section{Internal graph representation, \enquote{graph}}\label{sec:graph}
+\section{Internal graph representation, \code{graph}}\label{sec:graph}
 One feature that is important to us, is to be able to work with hierarchical graphs (cf.\ chapter~\ref{ch:progress}).
 One feature that is important to us, is to be able to work with hierarchical graphs (cf.\ chapter~\ref{ch:progress}).
 Therefore a node not only has edges to other nodes, but also it can contain other nodes and edges.
 Therefore a node not only has edges to other nodes, but also it can contain other nodes and edges.
 So far this is similar to what we described in section~\ref{sec:inputFileFormat}.
 So far this is similar to what we described in section~\ref{sec:inputFileFormat}.
 Additionally, there are multiple attributes that are used during the computation or as output variables.
 Additionally, there are multiple attributes that are used during the computation or as output variables.
 \begin{itemize}
 \begin{itemize}
-    \item The attributes \enquote{shift},  \enquote{sink},  \enquote{root} and  \enquote{align} correspond to the variables used by Brandes and Köpf~\cite{brandes_fast_2001}.
+    \item The attributes \code{shift},  \code{sink},  \code{root} and  \code{align} correspond to the variables used by Brandes and Köpf~\cite{brandes_fast_2001}.
     They are summarized in table~\ref{table:bk-variables}.
     They are summarized in table~\ref{table:bk-variables}.
-    \item The \enquote{parent} of a node is the node that contains it in the hierarchy.
-    \item The attributes $x$ and $y$ are the coordinates of the node relative to its parent node.
+    \item The \code{parent} of a node is the node that contains it in the hierarchy.
+    \item The attributes \code{x} and \code{y} are the coordinates of the node relative to its \code{parent}.
     There is one coordinate for each of the four extremal layouts and on coordinate for the combined layout.
     There is one coordinate for each of the four extremal layouts and on coordinate for the combined layout.
 \end{itemize}
 \end{itemize}
 Similarly, edges have additional attributes:
 Similarly, edges have additional attributes:
 \begin{itemize}
 \begin{itemize}
-    \item \enquote{dummy} specifies whether they are dummy edges.
-    \item \enquote{conflicted} corresponds to the variable used by Brandes and Köpf~\cite{brandes_fast_2001} and indicates that this edge won't be drawn vertically.
-    \item \enquote{bindPoints} is a list of bend points for the edge, including the beginning and end point of the edge.
+    \item \code{dummy} specifies whether they are dummy edges.
+    \item \code{conflicted} corresponds to the variable used by Brandes and Köpf~\cite{brandes_fast_2001} and indicates that this edge won't be drawn vertically.
+    \item \code{bindPoints} is a list of bend points for the edge, including the beginning and end point of the edge.
 \end{itemize}
 \end{itemize}
 
 
-A class diagram of the package \enquote{graph} is displayed in figure~\ref{fig:graph}.
+A class diagram of the package \code{graph} is displayed in figure~\ref{fig:graph}.
 
 
 \begin{figure}[htp]
 \begin{figure}[htp]
     \centering
     \centering
     \includegraphics[width=\linewidth,trim=0 7.5cm 0 0,clip]{img/graph.pdf}
     \includegraphics[width=\linewidth,trim=0 7.5cm 0 0,clip]{img/graph.pdf}
-    \caption{Class diagram of the \enquote{graph} package.}
+    \caption{Class diagram of the \code{graph} package.}
     \label{fig:graph}
     \label{fig:graph}
 \end{figure}
 \end{figure}
 
 
-
 \begin{table}[htp]
 \begin{table}[htp]
     \begin{longtable}{|l|p{10cm}|}
     \begin{longtable}{|l|p{10cm}|}
         \hline
         \hline
@@ -144,29 +143,29 @@ A class diagram of the package \enquote{graph} is displayed in figure~\ref{fig:g
 This section expects the reader to be familiar with the node placement algorithm by Brandes and Köpf~\cite{brandes_fast_2001}.
 This section expects the reader to be familiar with the node placement algorithm by Brandes and Köpf~\cite{brandes_fast_2001}.
 We recommend section 3.2.1 of Carstens~\cite{carstens_node_2012} for a detailed explanation.
 We recommend section 3.2.1 of Carstens~\cite{carstens_node_2012} for a detailed explanation.
 
 
-A \enquote{stage} of the algorithm, interface \enquote{AlgorithmStage}, is an interval during which each step of the algorithm is performed in a similar way.
+A stage of the algorithm, interface \code{AlgorithmStage}, is an interval during which each step of the algorithm is performed in a similar way.
 Each time such a step is performed it returns whether the stage is already finished.
 Each time such a step is performed it returns whether the stage is already finished.
-For example, a forward step in the stage of calculating one extremal layout, class \enquote{ExtremalLayoutCalc}, consists of either a step of calculating the blocks, class \enquote{BlockCalc}, or a step of compacting the layout, class \enquote{Compaction}.
+For example, a forward step in the stage of calculating one extremal layout, \code{ExtremalLayoutCalc}, consists of either a step of calculating the blocks, \code{BlockCalc}, or a step of compacting the layout, \code{Compaction}.
 All the stages are displayed in class diagram~\ref{fig:animation_and_bk}.
 All the stages are displayed in class diagram~\ref{fig:animation_and_bk}.
 
 
 To be able to undo a step each stage needs to implement methods for both forward and backward steps.
 To be able to undo a step each stage needs to implement methods for both forward and backward steps.
 
 
-Note that the \enquote{AnimationController} is not a controller in the MVC sense that it processes user input, but in the sense that it \enquote{controls} the execution of steps/stages.
+Note that the \code{AnimationController} is not a controller in the MVC sense that it processes user input, but in the sense that it \emph{controls} the execution of steps/stages.
 This works the following:
 This works the following:
 \begin{enumerate}
 \begin{enumerate}
-    \item The main view creates a node placement algorithm (only \enquote{BKNodePlacement} available).
-    It sends a controller as a parameter for the constructor.
-    \item The algorithm concurrently asks the AnimationController if it should do a forward or backward step.
-    \item The AnimationController waits until it knows which action to take (for example if the user pressed the right arrow key).
-    Alternatively, if the animation is not paused, then it waits until a specific delay has passed.
+    \item The \code{MainView} creates a node placement algorithm (only \code{BKNodePlacement} available).
+    It sends an \code{AnimationController} as a parameter for the constructor.
+    \item The algorithm concurrently asks the \code{AnimationController} if it should do a forward or backward step.
+    \item The \code{AnimationController} waits until it knows which action to take (for example if the user pressed the right arrow key).
+    Alternatively, if the animation is not paused, it waits until a specific delay has passed.
     Then it returns to the algorithm which step to take next.
     Then it returns to the algorithm which step to take next.
-    \item The algorithm potentially calls the step function of other alogrithms while executing one step.
+    \item The algorithm potentially calls one the step methods of other stages while executing one step.
 \end{enumerate}
 \end{enumerate}
 
 
 \begin{figure}[htp]
 \begin{figure}[htp]
     \centering
     \centering
     \includegraphics[width=\linewidth,trim=0 13cm 0 0,clip]{img/animation_and_bk.pdf}
     \includegraphics[width=\linewidth,trim=0 13cm 0 0,clip]{img/animation_and_bk.pdf}
-    \caption{Class diagram of the packages \enquote{bk} and\enquote{animation}.}
+    \caption{Class diagram of the packages \code{bk} and\code{animation}.}
     \label{fig:animation_and_bk}
     \label{fig:animation_and_bk}
 \end{figure}
 \end{figure}
 
 
@@ -177,16 +176,16 @@ For an explanation of what is actually displayed, see chapter~\ref{ch:ui}
 
 
 The distinguish two kinds of views:
 The distinguish two kinds of views:
 \begin{itemize}
 \begin{itemize}
-    \item The main window displays four regions for the different extremal layouts while also forwarding keyboard commands to the AnimationController.
-    For this we use a JFrame from the Swing library.
-    \item \enquote{EdgeView} and \enquote{NodeView} are JPanels, which means they can be drawn onto the JFrame.
+    \item The main window displays four regions for the different extremal layouts while also forwarding keyboard commands to the \code{AnimationController}.
+    For this we use a \code{JFrame} from the Swing library.
+    \item \code{EdgeView} and \code{NodeView} are \code{JPanel}s, which means they can be drawn onto the \code{JFrame}.
     For this they have to know about which part of the graph and which layout they belong to.
     For this they have to know about which part of the graph and which layout they belong to.
 \end{itemize}
 \end{itemize}
-A class diagram of the packages \enquote{view} and \enquote{main} is displayed in figure~\ref{fig:view}.
+A class diagram of the packages \code{view} and \code{main} is displayed in figure~\ref{fig:view}.
 
 
 \begin{figure}[htp]
 \begin{figure}[htp]
     \centering
     \centering
     \includegraphics[width=\linewidth,trim=0 11cm 0 0,clip]{img/view.pdf}
     \includegraphics[width=\linewidth,trim=0 11cm 0 0,clip]{img/view.pdf}
-    \caption{Class diagram of the packages \enquote{view} and \enquote{main}.}
+    \caption{Class diagram of the packages \code{view} and \code{main}.}
     \label{fig:view}
     \label{fig:view}
 \end{figure}
 \end{figure}

+ 6 - 0
doc/doc.tex

@@ -73,6 +73,8 @@
 \newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}\hspace{-2.5pt}}
 \newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}\hspace{-2.5pt}}
 \newcommand{\progress}{\partialsquare}
 \newcommand{\progress}{\partialsquare}
 
 
+\newcommand{\code}[1]{\lstinline[basicstyle=\ttfamily]|#1|}
+
 % \toprule and other commands
 % \toprule and other commands
 \usepackage{booktabs}
 \usepackage{booktabs}
 
 
@@ -84,6 +86,10 @@
 % Quellcode
 % Quellcode
 % für Formatierung in Quelltexten, hier im Anhang
 % für Formatierung in Quelltexten, hier im Anhang
 \usepackage{listings}
 \usepackage{listings}
+
+% same code font as in eclipse
+\usepackage{inconsolata}
+
 \usepackage{color, colortbl} % Farben
 \usepackage{color, colortbl} % Farben
 
 
 \colorlet{punct}{red!60!black}
 \colorlet{punct}{red!60!black}