Is there a way of customizing the output of coqdoc's table of contents? (emitted when passing --toc
)
For instance re-ordering the files, and indicating a title for each. I would like to have it as the entrypoint to the docs, but it's a bit dry as is.
IIRC the file order comes from _CoqProject/the argument order.
On customizing the toc otherwise, http://adam.chlipala.net/cpdt/html/toc.html seems tolerable
(but others might have better answers!)
Coqrst/alectryon are better in many other ways, but today they're not made to replace coqdoc
Cpdt's TOC just looks like it's hand written, right? That would be an option indeed.
I hadn't realized that the order came from _CoqProject, that's helpful already, thanks
For what it's worth, I'd use --toc
together with --short
to suppress the "Library" headers. Then one can use document comments such as (** * H1 *)
and (** ** H2 *)
to obtain a hierarchical ToC. This is for instance what I do here: https://coq-community.org/reglang/docs/latest/coqdoc/toc.html. (I also use CoqDocJS to obtain nicely hyperlinked documentation with foldable proofs, but that's orthogonal.)
Armaël Guéneau said:
I hadn't realized that the order came from _CoqProject, that's helpful already, thanks
The order in the ToC has been dependent on the order in the _CoqProject file for a long time, but in 8.4 (or something similar) it used to be the reverse of the order in that file. Imagine my surprise when I had totally garbled ToCs after an update to Coq. :grinning:
Ah, those title documentation comments look exactly like what I was looking for.
(but too lazy to make changes 10 min before the deadline now.. :p)
Last updated: Oct 13 2024 at 01:02 UTC