Group Abstract Group Abstract

Message Boards Message Boards

5
|
9.8K Views
|
5 Replies
|
15 Total Likes
View groups...
Share
Share this post:

DocumentationTools in version 13.0: creating documentation from usage

With the introduction of the new DocumentationTools in Mathematica 13 I would love to generate my documentation with the new tools since workbench has been getting too annoying to use.

I have been experimenting with the new tools and functionality. However I have came along an issues that the documentation that is generated automatically from the Function::usage is not properly formatted which was the case in the old DocumentationTools.

When I create a paclet with

CreatePaclet["test2"]

And then add some usage notes

BeginPackage["test2`"]

(* Declare your package's public symbols here. *)

SayHello::usage = "SayHello[x, y] message 1 with x and y."

SayHello1::usage = "SayHello1[x, y] message 1 with x and y.
SayHello1[x, y, n] message 1 with x and y and n."

SayHello2::usage = "SayHelloBla[x, y] message 1 with x and y.
SayHelloBla[x, y, n] message 1 with x and y and n."

Begin["`Private`"]

End[] (* End `Private` *)

EndPackage[]

i can now add this paclet to the new documentation tools.

enter image description here

and the usage notes can be called when the package is loaded.

enter image description here

If I create a new function page for one of the functions using the button "New Function Page" or automatically generate all function pages using "Tools">"Generate Function Pages" the templates generated are not correct. For the three Function::usage I had defined only the first is properly formatted. The moment when multiple variants are defined all goes wrong. Furthermore, in the previous version, I would get a warning in the 3rd case that the usage text is not starting with the correct function name.

enter image description here enter image description here enter image description here

With the pages generated, I can now build the packet however the 2nd and 3rd are not formatted correctly.

enter image description here

with the build from the workbench, I did always get proper formatting and splitting of multiple usages for the same function.

enter image description here

The same way it looks for the build-in documentation.

enter image description here

I have been digging into the DocumentationTools.m file where I guess the magic happens and did see some changes to AuxiliaryCreateReferencePages which I guess is the function called to generate the pages. However, I have not been able to figure out what is going wrong.

For small projects one could fix the layout, however, I usually build a few hundred documentation files when releasing new versions. Has anyone encountered the same issue or knows of a quick fix other than waiting for a new update?

Thanks, Martijn

POSTED BY: Martijn Froeling
5 Replies
Posted 3 years ago
POSTED BY: Andrew Meit
POSTED BY: Martijn Froeling

This definitely helps! Will try it asap and let you know how things work out. Thanks for the feedback!

POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard