-
Notifications
You must be signed in to change notification settings - Fork 482
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
Request: Allow adding arbitrary anchors to be linked with @ref
#745
Comments
+1 for this, but shouldn't the syntax be |
Yeah, re-using at-id makes sense to me. Currently, we're being extremely conservative about where we try to find at-ids (namely, only only within top-level headings), so generalizing it shouldn't be a problem. I wonder how easy it is to introduce arbitrary anchors into LaTeX though. @odow, you don't happen to have any thoughts on this? |
I believe this should do the job? |
We already use a mix of hyper refs: Documenter.jl/src/Writers/LaTeXWriter.jl Line 317 in 998d26e
Documenter.jl/src/Writers/LaTeXWriter.jl Line 356 in 998d26e
But yeah, some way of labeling and ref-ing to tables and figures would be useful. |
My use case is that I generated thumbnails as previews for plot figures, and I'd like that these thumbnail images be cross-referenced with
@ref
or similar so that when clicked, we can jump to another section in the docs (e.g. to view the full-sized plot or the source code).Currently,
![alt text](figure.png)
inserts a figure and[Some-Header-Title](@ref)
inserts a parsed cross-reference HTML link to the specified header anchor, and[text](URL)
is a hyperlink, but I haven't been able to figure out a way to combine inserting the fig + a cross-referenced link. As far as I can tell,Documenter
only allows@ref
to headers.Therefore, a way of specifying arbitrary anchors on any content so that we can
@ref
them elsewhere in the documentation would be nice!A suggested design could be:
[content](@anchor anchor-name)
in the markdown, which is then outputted with<a>
tags withid
's in the HTML. Then these anchors can be referenced by using@ref
.(thanks to @mortenpi for the suggested design!)
The text was updated successfully, but these errors were encountered: