Mathematica 的 Doxygen 等效项?
如何将附加信息放入 Mathematica 包文件中,例如
- 参数规范
- doctests/示例用法?
到目前为止,我只找到了 ::usage 字符串和一些关于如何编写的信息文档笔记本。我正在寻找一个选项来通过内省包文件生成这些文档笔记本。
How do you put additional information into a Mathematica package file, like
- parameter specification
- doctests/example usage?
Up to now, I only found the ::usage string and some information on how to write documentation notebooks. I am looking for an option to generate these documentation notebooks from introspecting package files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道mathematica中内置了doxygen等任何机制。如果您想将文档笔记本嵌入到您的包中,我将按以下步骤进行:
您可以使用 跳过外部笔记本的创建Notebook[] 而不是字符串,用于将文档笔记本存储在包文件中。
与 Mathematica 自己的帮助系统集成有点困难(正如您提供的链接所解释的那样)。当然,您仍然可以在包加载时写入包并将适当的文件移动到位。
I don't know that there is any mechanism such as doxygen built into mathematica. If you want to embed a documentation notebook into your package I would proceed as follows
You might be able to skip the creation of the external notebook by using Notebook[] instead of a character string for storing the documentation notebook inside your package file.
Integrating with Mathematica's own Help system is a bit more difficult (as the link you gave explains). Of course, you could still have the package write and move the appropriate files into place when the package loads.