executablebooks / sphinx-proof

A Sphinx extension for producing proof, theorem, lemma, definition, remark, conjecture, corollary and algorithm directives.
https://sphinx-proof.readthedocs.io/en/latest/
MIT License
32 stars 17 forks source link

Using References in (sub)section titles #85

Open schwabts opened 2 years ago

schwabts commented 2 years ago

Describe the bug

context When I write a subsection with title

## Sharpening {prf:ref}`weak-lemma`

expectation I expected the section title to be generated as

Sharpening Lemma 3

and Lemma 3 to become a link to the Lemma which actually happened. So far so good!

But I also expected it to show up the same way in the contents of the respective page on the right hand side where I essentially get a list of sections.

bug But instead the unresolved label of the reference is written into the contents.

problem This is a problem for people reading Jupyter Books because they should not (need to) know anything about the label authors use.

Reproduce the bug

  1. Edit a markdown file of a chapter of a Jupyter Book
  2. Add a section with the title
    ## Sharpening {prf:ref}`weak-lemma` 
  3. Build the Jupyter Book, e.g. jb build book

List your environment

Jupyter Book : 0.13.0 External ToC : 0.2.4 MyST-Parser : 0.15.2 MyST-NB : 0.13.2 Sphinx Book Theme : 0.3.3 Jupyter-Cache : 0.4.3 NbClient : 0.5.3

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: