From 95874b949233105cf2ae2ec42c8dc8137cfb4fe9 Mon Sep 17 00:00:00 2001 From: Warrick Lo Date: Wed, 11 Feb 2026 10:16:14 -0800 Subject: Update code listings in appendix Signed-off-by: Warrick Lo --- general.cls | 7 +++++++ master.tex | 25 +++++++++++++++++++++++-- report.pdf | Bin 1611585 -> 1619339 bytes 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/general.cls b/general.cls index dc67d63..a58b819 100644 --- a/general.cls +++ b/general.cls @@ -29,6 +29,7 @@ % Code listings. \RequirePackage{listings} \RequirePackage{matlab-prettifier} +\RequirePackage{xcolor} \setmainfont{Minion3}[ Path=fonts/, @@ -51,6 +52,12 @@ separate-uncertainty=true } +\lstset{ + numbers=left, + numbersep=8pt, + frame=single +} + \titleformat{\section}{\Large\bfseries}{}{0pt}{} \renewcommand{\arraystretch}{1.25} diff --git a/master.tex b/master.tex index a175da0..4fc53ff 100644 --- a/master.tex +++ b/master.tex @@ -388,11 +388,16 @@ and thus, \phantomsection \addcontentsline{toc}{section}{Appendix} -\addcontentsline{toc}{subsection}{MATLAB Code} -\section*{Appendix A. MATLAB Code} +\addcontentsline{toc}{subsection}{Code Listings} +\section*{Appendix A. Code Listings} \lstinputlisting[ style=Matlab-editor, + basicstyle=\ttfamily, + numberstyle=\ttfamily\small\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{gray}, + stringstyle=\color{red}, caption={Frequency spectrum analysis code.}, captionpos=b ]{matlab/specan.m} @@ -401,10 +406,26 @@ and thus, \lstinputlisting[ style=Matlab-editor, + basicstyle=\ttfamily, + numberstyle=\ttfamily\small\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{gray}, + stringstyle=\color{red}, caption={Phasor plot code.}, captionpos=b ]{matlab/phasor.m} +\lstinputlisting[ + language=bash, + basicstyle=\ttfamily, + numberstyle=\ttfamily\small\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{gray}, + stringstyle=\color{red}, + caption={Shell script for preparing data.}, + captionpos=b +]{matlab/prep.sh} + \newpage \phantomsection diff --git a/report.pdf b/report.pdf index 800ea40..ef09241 100644 Binary files a/report.pdf and b/report.pdf differ -- cgit v1.2.3