breaking lines in listings enviroment
I am trying to make listing enviroment brake lines. Unfortunately
breaklines=true does not work for me. Here is my code:
\usepackage{listings}
\begin{document}
\lstset{language=matlab,breaklines=true, extendedchars=true, numbers=left,
numberstyle=\tiny, stepnumber=1, numbersep=5pt, basicstyle=\footnotesize,
frame=lines, keywordstyle=\bfseries\color{blue},
commentstyle=\color{green!50!black}}
\lstset{emph={classdef, properties,
methods},emphstyle={\color{blue}\bfseries}}
\renewcommand{\lstlistingname}{Algorytm}
\begin{lstlisting}[caption=Funkcja \emph{createFoR} klasy \emph{row}.,
label=func_createFoR, float=ht]
classdef row < handle
properties
rp %promien rownoleznika
end
methods
function [T1 T2] = createFoR(obj,hT,Alpha,Beta,DeltaAlpha,DeltaBeta)
P1(1,1) = obj.r * cosd(Beta);
P1(1,2) = obj.r * cosd(90 - Beta);
P1(1,3) = obj.r * tand(90 - (Alpha + DeltaAlpha));
P1(2,:) = hT.P(1,:);
%hT - trojkat z wyzszego wiersza
P1(3,1) = obj.r * cosd(Beta + DeltaBeta);
P1(3,2) = obj.r * cosd(90 - (Beta + DeltaBeta));
P1(3,3) = obj.r * tand(90 - (Alpha + DeltaAlpha));
T1 = triangle(P1);
P2(1,:) = hT.P(1,:);
P2(2,:) = hT.P(3,:);
P2(3,:) = P1(3,:);
T2 = triangle(P2);
end
end
\end{lstlisting}
This is how it looks:
May I kindly ask you for help?
No comments:
Post a Comment