0

I have generic reST style labels (declared eg., .. _mylabel:) that I'd like to use in a sphinx toctree

But toctree manual entry syntax seems limited to document names, despite the fact that auto-generated toctrees will nest links from within those documents.

I've tried the obvious label <mylabel>; this does not work, nor does plain mylabel. I've also tried using the more general syntax:

:ref:`label <mylabel>`

Ironically, the only place this seems not to work is when you want to add it to a TOC >_<

Am I out of luck here?

CodeClown42
  • 11,194
  • 1
  • 32
  • 67
  • Even if you achieve this it's hackish. `.. toctree:` entries are `.rst` files, I've seen a few threads were folks were able to include an URL as entry (with some kind of file at the end of that address), and there's the example linked above. However, those 2 alternatives aren't clearly referenced in the documentation. The `.. toctree:` is, mostly, limited to listing headings (sections) of the `.rst` files it links, that's its intended functionality and, that's it. – bad_coder Oct 24 '20 at 17:25
  • Yeah, that is definitely not worth the bother in this case... – CodeClown42 Oct 24 '20 at 17:31

0 Answers0