I want to include some code from MATLAB and I'm using the mcode package. But the problem I encounter with it is that it doesn't break long lines automatically and since I load the file and not the code.
The problem will be solved if I put ... in the end of long lines, but I wondered is there any option in this package by which long lines be broken automatically?
Revision : here is the code :
\documentclass{book}
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{caption}
\usepackage{color,xecolor}
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
\begin{document}
\begin{figure}
\caption{My program for plotting the above formula in 2 different conditions}
\lstinputlisting{technique.m}
\end{figure}
\end{document}
where technique.m is a matlab file and what I get from that is :

and it's out of the frame. I actually get the warning that autolinebreaks is an unknown option but I have no idea what should I do to solve the problem.


matlab-prettifierpackage; see this answer. – jub0bs Apr 28 '14 at 15:32