[docs] Intersphinx Linking to Anchors in Python Docs

Alexander Rudy alex.rudy at gmail.com
Sat Sep 28 22:12:48 CEST 2013


Hi,

I'm working on some documentation for the `astropy <http://astropy.org>`` project where I'd like to use inter sphinx to link to python documentation. Intersphinx creates the links without a problem, and includes anchors (I'm trying to link to the following: http://docs.python.org/library/string.html#formatstrings which I am linking with the following reST: :ref:`python:formatstrings`). However, in the redirection from this link to the final destination (http://docs.python.org/2/library/string.html) the anchor (part after the #) is lost. This feels broken. Is there something I can do, or something the python docs generation can do to fix this problem? It is annoying to send users looking for "format string syntax" to the top of the string module page. I can hardlink, but that seems silly, when I have intesrphinx. I could also always send them to the python 2 or python 3 version, but that too seems unfortunate.

Any help would be appreciated!

Thanks,
~Alex


More information about the docs mailing list