Replies: 1 comment
-
I think you would have to make a custom role, but even they advise against using counters, especially across pages like you want to. I think you'll find you will run into several issues, especially building in parallel. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've been searching the web quite painstakingly for this with no luck, so I ask you!
Is there a way to create some custom counters using rst/Sphinx, as in Asciidoctor (https://docs.asciidoctor.org/asciidoc/latest/attributes/counters/)?
I have a bunch of files, one per section, whose section names contain a number.
I may have to reorganize those files, add or remove some, but I want the numbering in the section names to still be consistent without having to re-edit everything.
eg. I have rst files with content like
a.rst
b.rst
and so on, you get the picture.
In the
index.rst
all file are declared in the toctree block.I'd love to replace all the hardcoded numbers with some automatic counter (which is not the section number).
Any tip?
Thanks for you help. :)
Beta Was this translation helpful? Give feedback.
All reactions