Index: doc/theses/colby_parsons_MMAth/style/style.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/style/style.tex	(revision e41c4c6c0aac6b2ea35512edc89eee3a327050f2)
+++ doc/theses/colby_parsons_MMAth/style/style.tex	(revision fdc042d752e4d0d4e27f8bb544c73f0b9a8296cc)
@@ -1,12 +1,73 @@
-\input{common}                                          % bespoke macros used in the document
-\input{cfa-format}
+\input{common}
 
-% \CFADefaultStyle
+\lstdefinestyle{defaultStyle}{
+    escapeinside={@@},
+    %  basicstyle=\linespread{0.9}\tt\footnotesize,		% reduce line spacing and use typewriter font
+      basicstyle=\linespread{0.9}\sf,		% reduce line spacing and use typewriter font
+    %  keywordstyle=\bfseries\color{blue},
+    %  keywordstyle=[2]\bfseries\color{Plum},
+    %  commentstyle=\sf\itshape\color{OliveGreen},		  % green and italic comments
+    %  identifierstyle=\color{identifierCol},
+    %  stringstyle=\sf\color{Mahogany},			          % use sanserif font
+      stringstyle=\tt,			          % use sanserif font
+      mathescape=true,
+    %  columns=fixed,
+      columns=fullflexible,
+    %  aboveskip=4pt,                                  % spacing above/below code block
+    %  belowskip=3pt,
+      keepspaces=true,
+      tabsize=4,
+      % frame=lines,
+      literate=,
+      showlines=true,                                 % show blank lines at end of code
+      showspaces=false,
+      showstringspaces=false,
+      showlines=true,							% show blank lines at end of code
+      escapechar=\$,
+      xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
+      moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
+      morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil},
+      abovecaptionskip=5pt,
+}
 
-% \lstset{
-% morekeywords=[2]{nomutex,mutex,thread,wait,wait_release,signal,signal_block,accept,monitor,suspend,resume,coroutine},
-% keywordstyle=[2]\color{blue},				% second set of keywords for concurency
-% basicstyle=\linespread{0.9}\tt\small,		% reduce line spacing and use typewriter font
-% stringstyle=\sf\color{Mahogany},			% use sanserif font
-% commentstyle=\itshape\color{OliveGreen},		% green and italic comments
-% }%
+\lstdefinestyle{cfaStyle}{
+  escapeinside={@@},
+  basicstyle=\linespread{0.9}\sf,		% reduce line spacing and use typewriter font
+  stringstyle=\tt,			          % use sanserif font
+  mathescape=true,
+  columns=fullflexible,
+  keepspaces=true,
+  tabsize=4,
+  literate=,
+  showlines=true,                                 % show blank lines at end of code
+  showspaces=false,
+  showstringspaces=false,
+  showlines=true,							% show blank lines at end of code
+  escapechar=\$,
+  xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
+  moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
+  morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil},
+  abovecaptionskip=5pt,
+}
+
+\lstnewenvironment{cfacode}[1][]{
+  \lstset{
+    language = CFA,
+    style=cfaStyle,
+    captionpos=b,
+    #1
+  }
+}{}
+
+\lstnewenvironment{cppcode}[1][]{
+  \lstset{
+    language = c++,
+    style=defaultStyle,
+    captionpos=b,
+    #1
+  }
+}{}
+
+\newcommand{\code}[1]{\lstinline[language=CFA,style=cfaStyle]{#1}}
+\newcommand{\uC}{$\mu$\CC}
+
