Closed eric-wieser closed 3 years ago
Apologies for not having responded to this yet. It's a nice idea, but currently I have no idea as to how to implement this. It's not built into sphinx. I did find another extension which provides tooltips on references:
https://github.com/readthedocs/sphinx-hoverxref
It is still in beta. I'll leave this issue open as it would be a nice feature to have eventually.
Just to note here that I experimented with hoverxref. Unfortunately it does not yet support custom domains (besides py
), so it cannot be used to configure tooltips on sphinxcontrib-bibtex citations, at least as of now. When it supports custom domains, I'd be happy to look at it again.
I now found a much simpler solution. The tooltip will be rendered as plain text rather than displaying a full text preview (as with hoverxref) but I think that should be more than enough.
Should work now in develop. Thanks again for requesting, it's pretty neat to have this!
Hmm... Any way of disabling or tweaking the tooltip? I'm using a custom extension to render math inside titles with MathJax, and that doesn't work with plaintext, of course, so my tooltips appear with LaTeX commands. Maybe some "shorthand" format for tooltips (e.g. without title)?
Sure, easiest would be to simply disable them, and/or configure the renderer used for tooltips. I've set up a new issue for it.
It would be great if when hovering over an
[ABC123]
style citation with the cursor, the full title of the referenced document was shown as htmltitle
tooltip text.