Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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
3  
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
1  
@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
show 3 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.