a2ps
a2ps -o outfile.ps -2 -A virtual -g -Ematlab4 file1.m file2.m file3.m
listings
, create a document containing essentially the following. (you could add headers to indicate which file you are listing etc…)\documentclass{article} \usepackage{listings} \begin{document} \lstset{language=Matlab,basicstyle=\small,breaklines=true} \lstinputlisting{file1.m} \lstinputlisting{file2.m} \lstinputlisting{file3.m} % etc ... \end{document}
a2ps
is available on this platform via macports and Latex via MacTeX . Here is an application for combining PDFs: PDFLab