Hi, I'm producing lots of documentation via autogenerated rst files with custom directives. One problem I'm facing is references; so far, I've been using the standard docutils references setting a refurl manually; but this seems fragile especially since Sphinx comes with its own cross-document references. In my case, I'm generating IDs for all my references and that makes it trivial to inject labels everywhere; but I'm not sure how to reference them so Sphinx does the right thing at the end. I found the XRefRole, but I'm not sure how to instantiate it manually. What I need is to insert a reference while specifying the link text and the target, corresponding to this syntax: :ref:`Link title <label-name>`. How am I supposed to do this from within an extension? I assume that a standard docutils label can be used as the label.
Cheers, -t -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To view this discussion on the web visit https://groups.google.com/d/msg/sphinx-dev/-/EOANWyu8bc0J. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.