Report to Latex (R2L)
The idea behind Report to Latex is to be able to create documents (e.g. test reports) from Matlab. Many other MATLAB/LATEX related scripts and functions focus on the documentation of MATLAB code. R2L does NOT do that.
R2L focusses on the creation of reports that are totally independent from the underlying MATLAB code. In principle you could write a thesis with R2L, although i would not recommend that. Aside from the general latex support it is specifically designed to support glossaries and PDF links. It was born from the desire to have a MATLAB script that eases and automates figure insertion into reports. Report to Latex consists of five functions. Every R2L report starts by creating a .tex file with the R2L_writeheader function. From there you can insert content - i.e. text (tex code) or figures. Text (tex code) is added by two methods. The R2L_Append2TexOutput appends a cell array of tex code to the .tex file. For large tex sections R2L_Append2TexOutput is unhandy. Therefore the second method R2L_GetTexFromComment was implemented. To use R2L_GetTexFromComment you simply write your tex code into the matlab editor. Once finished you comment it out five times and call R2L_GetTexFromComment
in the specified way. The main purpose of R2L is however the automated insertion of figure with R2L_insertfigure. R2L_insertfigure will do everything from saving the figure to inserting it into the tex code including labels and captions. Once done make sure to add \end{document} to close the document and then call R2L_compile to compile.
R2L was inspired by https://de.mathworks.com/matlabcentral/fileexchange/41207-publish2latex
Cite As
JR (2024). Report to Latex (R2L) (https://www.mathworks.com/matlabcentral/fileexchange/65580-report-to-latex-r2l), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: publish2latex
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | updated descripton |