You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
TeX
35 lines
1.0 KiB
TeX
\SelectInputMappings{adieresis={ä}, germandbls={ß}}
|
|
|
|
\definecolor{MyDarkGreen}{rgb}{0.0,0.4,0.0}
|
|
\definecolor{MyBeautyfulPurple}{rgb}{0.72,0.33,0.82}
|
|
\definecolor{MyBeautyfulBlue}{RGB}{072,118,255}
|
|
|
|
\lstdefinestyle{Matlabcode}{
|
|
language=Matlab,
|
|
belowcaptionskip=1\baselineskip,
|
|
breaklines=true, %Schaltet Zeilenumbruch ein
|
|
frame=L, %Erzeugt Strich links oder Rahmen mit single
|
|
xleftmargin=0pt,
|
|
breaklines=true,
|
|
showstringspaces=false,
|
|
basicstyle=\footnotesize\ttfamily,
|
|
keywordstyle=\bfseries\color{MyBeautyfulBlue},
|
|
keywordstyle=\color{black},%
|
|
identifierstyle=\color{black},%
|
|
commentstyle=\usefont{T1}{pcr}{m}{sl}\color{MyDarkGreen}\small,
|
|
stringstyle=\color{MyBeautyfulPurple},
|
|
emph=[1]{function,for,end,break},emphstyle=[1]\color{MyBeautyfulBlue}
|
|
}
|
|
%Im Hauptfile unter begin{document} folgendes einfügen
|
|
% \input{matlab.tex}
|
|
|
|
|
|
%Um nun Inline Code zu schreiben
|
|
% \begin{lstlisting}[style=Matlabcode]
|
|
% Code here
|
|
% \end{lstlisting}
|
|
|
|
|
|
%Um Code aus einer MatlabL-Datei zu importieren
|
|
% \lstinputlisting[style=Matlabcode]{matlab.m}
|