3

I want to generate a complete help for a Matlab toolbox I have developped.

I have seen how to Display custom documentation by making a helptoc.xml file, but I do not understand how you can add the pages generated when you type doc My_class.

Is there a way to save the result of doc My_class to HTML pages with all links for properties and methods pages?

Hentold
  • 853
  • 7
  • 11
  • I'm not sure this is exactly what you are looking for but you could try [M2HTML](http://www.artefact.tk/software/matlab/m2html/). If you are trying to get a copy of the doc page the only way I know to do it is to right click on it and get the page source (which would be annoying if you have to do it for many files). – ioums Feb 20 '13 at 20:08
  • I guess I do not have choice to copy the page source as you suggest. M2HTML would be what i want but it does not seems to really support classes and anyway it's only a copy of the "help function" content with no page layout. Thank you anyway – Hentold Feb 20 '13 at 20:55
  • Related http://stackoverflow.com/questions/4912829/matlab-documentation-function/20014162#20014162 – 0 _ Nov 16 '13 at 03:10

1 Answers1

2

You can use help2html which is not very documented but it works.

Calling:

html = help2html(mfilename);

returns verbatim the HTML file that gets displayed by doc as a 1XN char array. mfilename is the full path to the m-file you want to document. Though as an undocumented function, its interface isn't guaranteed to stay constant, the copyright notice is from 2008. So it looks like the file isn't being touched often and you can probably trust it to keep working for a while.

chadsgilbert
  • 390
  • 1
  • 13
Ninjasam
  • 101
  • 3
  • If indeed `help2html` is not well documented, would you care to elaborate on it a bit here? – Shai Feb 21 '13 at 06:56