Open Omikhleia opened 3 years ago
EDIT: proposed tasks moved to the issue description as per alerque's tip below.
Yes to all points above.
An \autodoc:package
command would be especially useful if it did things like link the package name to the corresponding location in the manual.
c.f. #1337 for a related idea that has been kicking around in my head for a while do document internal Lua API stuff rather than just end user facing commands.
Also re information extraction, note our SILE.registerCommand()
function has help strings for lots of functions that we basically don't utilize. That might be a jumping off point for more information too. c.f. #1195
An
\autodoc:package
command would be especially useful if it did things like link the package name to the corresponding location in the manual.
Neat idea indeed. I have added it to my proposed task list above (slightly re-ordered, this is the most probable ordering I'll consider).
Just a GitHub tip: can I suggest you edit the task list above into the original first post in this thread? If you do that GitHub will show the number of complete/incomplete tasks and a progress bar when the issue is references, especially in places such as milestones.
Greetings
SILE 0.10.15 on Ubuntu 20.04
In order to properly document my own package, I tried understanding the autodoc package, and have several concerns.
First, I couldn't find any documentation about it, some made test and trial attempt looking at the SILE manual code. I ended up with the following kind of script (for illustration):
Main issues:
All in all, it summarizes to "how to get working documentation for existing packages", and "how should package authors make working documentation"
Secondary issues:
I do feel that enforcing (to some extent) packages to be properly documented improves maintainability and usability. The current autodoc packages looks (no offense intended) as a quick "hack" for the SILE manual. Are there plans or ideas how to correctly handle package documentation? That could include:
SILE.settings.declare
andSILE.registerCommand
both have support for help details, so these should be put to use)Regards.
EDIT: Beyond the (small) initial step proposed in PR #1335 ("stage 0"), here is how I would consider subsequent stages... At a slow pace... from simplest ideas to the more complex or challenging:
\autodoc:command
to typeset commands in a clever and consistent way. First, there are a lot of inconsistencies in the documentation (in the way parameters are presented, etc.). Secondly, it's a bit annoying to have all these escape sequences where we could just rely on the AST parsing to do the job for us... (+ indirect benefits, syntax check)\autodoc:package
command for typesetting package names and possibly style them differently. There's no reason they'd always be typeset as "code"...\autodoc:package
could link to the corresponding location in the manual.\line
,\examplefont
\note
.\code
is problematic and has to be reconsidered: It is defined in the url package, but re-defined in the Manual with a less-than-general definition (hard-coded 9pt, etc.). The situation is a bit messy; one may want URLs in regular font but keep the code-formatting option elsewhere, and it's hard to make right currently. (Redefining\url
to temporarily kill the\code
command is one possible way, but it's not that nice.)