Code covered by the BSD License  

Highlights from
publish_plus

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 361.87 KB File ID: #7505
image thumbnail

publish_plus

by Michael Wild

 

21 Apr 2005 (Updated 26 May 2005)

Extends the PUBLISH function provided by MATLAB to pdf, ps and dvi and all

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements - LaTeX compiler. - dvi to ps converter. - pdfLaTeX compiler. All of them are e.g. included in MiKTeX (www.miktex.org).
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
25 Apr 2005 Matthew Simoneau

Note that the modified version of PUBLISH isn't needed when using R14SP2 or later (which respects the imageFormat for LaTeX output).

This Technical Solution has another variant of publish_plus.m:

http://www.mathworks.com/support/solutions/data/1-OVNVK.html

Please login to add a comment or rating.
Updates
26 Apr 2005

I added a lot of documentation, an example and a published output. The code changes are very minor (in the way the LaTeX processors are called twice to ensure correctness of the output).

24 May 2005

- C-preprocessor like include statements. This way it is possible to "include" function-code into a driver script.- Added installer. It uses matlab to put the files into the right places, updates the search-path etc. Also generates uninstall script.

26 May 2005

Corrected a typo and added a screen-shot

Tag Activity for this File
Tag Applied By Date/Time
publish Michael Wild 22 Oct 2008 07:46:51
pdf Michael Wild 22 Oct 2008 07:46:51
acrobat Michael Wild 22 Oct 2008 07:46:51
latex Michael Wild 22 Oct 2008 07:46:51
postscript Michael Wild 22 Oct 2008 07:46:51
ps Michael Wild 22 Oct 2008 07:46:51
pdf Nilson 27 Jul 2011 22:13:27

Contact us at files@mathworks.com