Matthias Geier
2018-03-19 17:28:38 UTC
Hello list.
I want to write RST files that use links to reference labels like this_.
.. _this: a-reference-label
The resulting document has <reference> nodes and corresponding
<target> nodes. The <target> node for the above example has an
attribute refuri="a-reference-label".
I would like to create a Transform that changes the <target> node in a
way that the link that is created in the end points to the reference
named "a-reference-label".
The result should look as if I had used :ref:`a-reference-label` in
the first place.
Is that possible?
If not, I think I'll have to traverse all <reference> nodes, search
for their corresponding <target> nodes and replace each <reference>
node with a <pending_xref> node with the appropriate "refuri"
attribute.
But for this, I have yet another question:
Is there somewhere a list/dict with all the <target> nodes in the
current document?
cheers,
Matthias
I want to write RST files that use links to reference labels like this_.
.. _this: a-reference-label
The resulting document has <reference> nodes and corresponding
<target> nodes. The <target> node for the above example has an
attribute refuri="a-reference-label".
I would like to create a Transform that changes the <target> node in a
way that the link that is created in the end points to the reference
named "a-reference-label".
The result should look as if I had used :ref:`a-reference-label` in
the first place.
Is that possible?
If not, I think I'll have to traverse all <reference> nodes, search
for their corresponding <target> nodes and replace each <reference>
node with a <pending_xref> node with the appropriate "refuri"
attribute.
But for this, I have yet another question:
Is there somewhere a list/dict with all the <target> nodes in the
current document?
cheers,
Matthias
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.