-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate_Matlab_Template.tex
38 lines (38 loc) · 1.58 KB
/
template_Matlab_Template.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
\usepackage{listings} % Package for highlight text
\usepackage{color}
\definecolor{MyDarkGreen}{rgb}{0.0,0.4,0.0}
\lstset{
language=Matlab,
frame=single, % Single frame around code
keywordstyle=[1]\color{blue}\bfseries, % MATLAB functions bold and blue
keywordstyle=[2]\color{purple}, % MATLAB function arguments purple
keywordstyle=[3]\color{blue}\underbar, % User functions underlined and blue
identifierstyle=,
% Comments small dark green courier
commentstyle=\usefont{T1}{pcr}{m}{sl}\color{MyDarkGreen}\small,
stringstyle=\color{purple}, % Strings are purple
showstringspaces=false, % Don't put marks in string spaces
tabsize=1,
%
%%% Put standard MATLAB functions not included in the default
%%% language here
morekeywords={xlim,ylim,var,alpha,factorial,poissrnd,normpdf,normcdf,ones,double},
% Add keywords from Computer Vision Toolbox by MathWorks
morekeywords={medfilt2,imhist,imread,imshow,rgb2gray,uint8,makecform,applycform,imnoise,imwrite,histeq,imresize,imrotate},
%
%%% Put MATLAB function parameters here
morekeywords=[2]{on, off, interp},
%
%%% Put user defined functions here
morekeywords=[3]{FindESS, homework_example},
%
morecomment=[l][\color{blue}]{...}, % Line continuation (...) like blue comment
numbers=left, % Line numbers on left
firstnumber=1, % Line numbers start with line 1
numberstyle=\color{blue}, % Line numbers are blue
stepnumber=2
}
\begin{document}
\begin{lstlisting}
\end{lstlisting}
\end{document}