|
[Date Index]
[Thread Index]
[Author Index]
Re: Automated documentation (like javadoc) for packages?
- To: mathgroup at smc.vnet.net
- Subject: [mg81240] Re: Automated documentation (like javadoc) for packages?
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Mon, 17 Sep 2007 03:35:04 -0400 (EDT)
- References: <fcio8g$4o$1@smc.vnet.net>
Kentaroh Takagaki wrote:
> Hello,
>
> I have a Mathematica package for graphing specialized data, and I plan to
> share this code with others. I am wondering if there is any way to
> automatically generate documentation for the package (similar to javadoc for
> Java), which will parse the .m files for symbol::usage statements,
> Options[symbol] statements, scope, etc.
This would probably not be as useful for Mathematica as for C++, Java,
etc. because Mathematica already provides easy ways to read usage messages:
When I come across package with scarce external documentation, I load
the package
<< PackageName`
and then ask for all the symbol names in the package with
? PackageName`*
This gives a list of clickable names.
> Even a rudimentary script would be of great help, and just .nb or html
> output is fine. (It doesn't have to use the Help Browser or new
> Documentation Center). Please let me know if anybody has or knows of a way.
You could start by getting the names of all public symbols with
Names["PackageName`*"]. Note that this evaluates to a list of Strings
that need to be converted to symbols using Symbol before e.g.
#::"usage"& or Options can be applied. After that you'll just need some
formatting functions to create a pretty notebook document from this list.
--
Szabolcs
Prev by Date:
Re: LegendreP error (bug?) in Mathematica
Next by Date:
Re: Automated documentation (like javadoc) for packages?
Previous by thread:
Automated documentation (like javadoc) for packages?
Next by thread:
Re: Automated documentation (like javadoc) for packages?
|