Hi,
There is no way officially, however I wrote a simple helper function
for conf.py as:
def update_page_context(app, pagename, templatename, context, doctree):
def linkto(label):
docname, labelid =
app.env.domains['std'].data['anonlabels'].get(label, ('', ''))
if docname == pagename:
url = '#' + labelid
else:
url = app.builder.get_relative_uri(pagename, docname) +
'#' + labelid
return url
context['linkto'] = linkto
def setup(app):
app.connect('html-page-context', update_page_context)
(there is a full version:
https://gist.github.com/shimizukawa/37e26f6353327dad3f9d )
Please try it.
Note that it is tested only with HTML builder and it has no error handling.
Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sphinx-users...@googlegroups.com.
> To post to this group, send email to
sphinx...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/sphinx-users.
> For more options, visit
https://groups.google.com/d/optout.