publish_plus
publish_plus simply extends the MATLAB-provided publish function and adds support for pdf, ps and dvi files.
Also it extends it to allow for C-preprocessor like INCLUDE statements which make it possible to display function-code in the output. This is very usefull when documenting programs since the inherent limit to Matlab-scripts is not very satisfying.
Installation:
In order to get it to work, the original publish function needs to be somewhat adapted (so it produces pdf-figure output for the pdfLaTeX compiler). (I hope this causes me no problems with TMW...) Furthermore some additional files need to be placed on your system.
To do this, I wrote an installer (install.m) which backups the original files, moves the new ones to their proper locations and updates the search-path. A uninstaller (uninstall.m) is generated.
For pdf-output you need to have a LaTeX distribution installed. The paths to your LaTeX-, dvi-to-ps- and pdfLaTeX- compilers will be asked for during installation, so you have to have it installed beforehand. If not, you can manually update this information in publish_plus.m.
Now you're done and ready to publish your scripts to pdf and ps. Call publish_plus with the m-file name you want to publish, the desired output format and any additional parameters you might want to send to publish.
With the new version of PUBLISH you can also use %#INCLUDE <[function name]|[file name]> statements to include additional text in your output. So far this does not work on HTML output however.
See the README.txt file for further information.
I have only tested it on my WinXP PC. On *ix systems there might be troubles with the quotes I use to get paths containing blanks to work.
Hope it is useful to you.
Cite As
Michael Wild (2023). publish_plus (https://www.mathworks.com/matlabcentral/fileexchange/7505-publish_plus), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
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.
example/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Corrected a typo and added a screen-shot |