-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render citation from docs also in in REPL #21
Comments
I don't think this would be possible without adding DocumenterCitation as a dependency to your package, and then use a docstring hook from DocStringExtensions to replace the link. DocStringExtensions is very lightweight, but DocumenterCitations is HEAVY, so probably you don't want to do this. One alternative that would be possible to explore is to replace it with a url to the documenter generated bibliograpy perhaps. |
But can that maybe be done generically in DocumenterCitations for all these? I do not see why I would have to do it for just my package (and again for the next) |
I don't think so -- DocumenterCitations isn't available when you just use the package and view docstrings. |
Ah, I see, that is a bit unfortunate. It would be great to have something lightweight for this display then. |
@mortenpi this is another example where it would be good to be able to use the base doc hooks differently based on the context. In the repl it could then be replaced by a URL, and in Documenter just keep the link as |
I don't think I fully realized until now that the Julia REPL processes the markdown of docstrings. I guess this is part of Base, but I don't think I'm a fan of this behavior. Given how light-weight markdown is, it would seem preferable to just show the unprocessed docstrings in the REPL. Oh well. Maybe we can submit a patch to Julia Base that it should recognize certain types of links and handle them differently. It looks to me like My preferred formatting would be very simple:
A completely separate issue is that Documenter also mutates docstrings when it runs, which screws up citations in particular, but that should be fixed in #3. |
Don't worry I also only noticed that when Frederik answered here. Sure, with shorter keys this would be shorter, but I prefer these little longish keys, since that is what a lot of my co-authors use. |
This seems to be fixed in Julia 1.11, it I s rendered as The tangent vector X can be written in the form X = \bar{\Omega}p
BendokatZimmermann:2021 (@cite), with nice! |
In this section
https://juliadocs.org/DocumenterCitations.jl/stable/syntax/#Citations-in-docstrings
there is a very nice description, that I already follow in my docs as well. In html this looks really nice. Would it be possible to render it that nice on REPL as well? Currently a link like
renders on REPL like
and has no collar markup like usually links do omitting the bracket and collaring it would be super nice.
The text was updated successfully, but these errors were encountered: