You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WARNING: 'myst' cross-reference target not found: 'level-4-header-title' [myst.xref_missing] #885
When internal linking to a fourth level header (#### Fourth Level Header) using the syntax [link text](#fourth-level-header), upon doc compilation myst throws this error the first time during compilation: WARNING: 'myst' cross-reference target not found: 'fourth-level-header' [myst.xref_missing]. However the link works when inspecting and testing the compiled docs.
Expected Behavior
An error will not be thrown.
To Reproduce
Try to compile this file below with a command such as sphinx-build -b html src build:
# First
[link to first](#first)
## Second
[link to second](#second)
### Third
[link to third](#third)
#### Fourth
[link to fourth](#fourth)
results in error:
WARNING: 'myst' cross-reference target not found: 'fourth' [myst.xref_missing]
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
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).
I get the same, not specifically for 4-level headers, but also 2-level headers.
Note: A warning != error. What is happening here does not break any functionality.
I suspect this is the case for all implicit targets. Possibly they are not resolved during Sphinx build time but only in the generated HTML.
Since implicit targets are documented as a feature, I would expect a warning only if I used something incorrectly. If these warnings are inherent to implicit targets, it would be nice to mention this in the documentation (below the "discouraged" block).
I try to care about and resolve warnings so that I don't oversee a new and important one. For that, it is important not to get flooded with irrelevant warnings. It would be great there is something that can be done to avoid emitting this warning at build time.
Activity
welcome commentedon Mar 8, 2024
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
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! 🎉
aeisenbarth commentedon Mar 22, 2024
I get the same, not specifically for 4-level headers, but also 2-level headers.
Note: A warning != error. What is happening here does not break any functionality.
I suspect this is the case for all implicit targets. Possibly they are not resolved during Sphinx build time but only in the generated HTML.
sumezulike commentedon Apr 6, 2024
Increasing the
myst_heading_anchorsvariable to the deepest level could get rid of the warnings, it's currently 0 by default. See MyST Configurationaeisenbarth commentedon Apr 8, 2024
Oh, thanks! That solves it perfectly.
anschweitzer commentedon Jul 2, 2025
That worked for me too. For newcomers to myst such as myself, that change goes in conf.py.