# Weaving MATLAB m-file into a LaTeX File

Hopefully this is a simple question: is there a simple, fast, and general method of porting the the text of an m-file verbatim into LaTeX and have it appear as it does in VI, i.e. ignore all of the MATLAB nomenclature, like % and so on, to appear as standard text consistent with whatever package I am using?

-
I;m not sure perhaps you simply want \begin{verbatim}...\end{verbatim} or if you need fancier formatting look at the fancyvrb or listings packages/ – David Carlisle Jan 13 at 21:38
There are a couple of packages that can help you directly. The minted package as is described in the question and answer: tex.stackexchange.com/q/84777/19384 and the m-code package as explained on this question and answer: tex.stackexchange.com/q/85764/19384 – Peter Jansson Jan 13 at 21:40
Yeah, that I was it. I just found it. Thanks so much for your reply. Have a good day... – John Sevic Jan 13 at 21:50
Another more sophisticated question: is there a method that treats an arbitrary .txt like, say, and .eps file, with a LT command that allows the .txt to be read in and compiled, like we treat figures. This would automate the entire process. – John Sevic Jan 13 at 21:51
@JohnSevic Perhaps you should take this comment and add it as a new question. However, please, check first if something similar has been posted already. – Peter Jansson Jan 13 at 21:54