Publish M-file in LaTeX

Convert m-files (or code in general) to LaTeX input that numbers lines, etc.
2,3K download
Aggiornato 5 nov 2004

Nessuna licenza

This function was written specifically for importing algorithms quickly into LaTeX with little user interaction. It automatically numbers each line and maintains indenting. The user can optionally pass a cell array of keywords and a LaTeX command to apply to each of them (I usually use \textbf), and a shortcut exists for specifying MATLAB flow control commands as keywords. Output is stored in a file with a .tab extension.

Cita come

Tim Popham (2025). Publish M-file in LaTeX (https://it.mathworks.com/matlabcentral/fileexchange/6104-publish-m-file-in-latex), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14SP1
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0

After receiving several emails reporting incompatability with older MatLab versions, I revised the code to use an older data import function. The new implementation is slower so I have included both functions.