Skip to content

Using References in (sub)section titles #85

Open
@schwabts

Description

@schwabts

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` 
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions