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.
and the usage notes can be called when the package is loaded.
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.
With the pages generated, I can now build the packet however the 2nd and 3rd are not formatted correctly.
with the build from the workbench, I did always get proper formatting and splitting of multiple usages for the same function.
The same way it looks for the build-in documentation.
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