To reference a section using reStructuredText in Sphinx, I can do:
.. _my-reference-label:
Section to cross-reference
--------------------------
This is the text of the section.
It refers to the section itself, see :ref:`my-reference-label`.
as explained here.
This results in the section being referenced by title, that is I get the line:
It refers to the section itself, see Section to cross-reference.
(where Section to cross-reference links to the beginning of the corresponding section)
I'd like to get instead:
It refers to the section itself, see 2.1.
where 2.1 is the section's number.
Is there a way to accomplish this using reStructuredText in Sphinx?