-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image/figure can not use :target: from other document #4351
Comments
@jessetan thank you. |
I like this idea, but we have to consider before supporting this.
So it is a bit strange to support only the |
Would enabling |
Is there still no solution for this? I tried adding target to document B as in the OP, still the same. |
Hi there, @darebgd said:
We just ran into the same problem where we wanted to do something like
However, that croaks with
With kind regards, |
Hey, I just wanted to put a comment here to keep this issue running and to note that using Here's a link to my associated stackoverflow question that brought me here. |
Problem
Consider two files:
A.rst
B.rst
The figure in
A.rst
can be clicked to jump to the header inA.rst
. ProcessingB.rst
will printERROR: Unknown target name: "my-header"
and the figure will not be clickable.It seems that it is a docutils limitation that the hyperlink target
my-header
is not searched for across files. Is it possible to add this in Sphinx (e.g. inpatches.py
) so that these internal targets are checked across all documents, just like using:ref:
would?A workaround is to use a URL in the target in
B.rst
:But this is bad because it requires the author to know the exact output filename. It is also marked as an external link by docutils.
Environment info
The text was updated successfully, but these errors were encountered: