-
Notifications
You must be signed in to change notification settings - Fork 500
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
Cross references don't jump to linked section #56
Comments
I don't think this is implemented yet, or it has gaps if it is. |
Ok, wasn't sure because cross references are mentioned in the notable features section of the readme |
Aha, I remember what it is. I think cross references to sections works, but not to custom anchor points. The reason is, we add an anchor for sections when producing the toc and outline. However, I haven't yet implemented the logic to insert an inline anchor. |
But the example above is trying to link to a (non-custom) section, is it not? I'm having the same issue: cross references to sections appear as links but do not function in converted pdfs. Is it really the case that cross references to sections works, and if so - what is the required preamble and "code" for the .adoc? PS. Great project you've got going here! |
@NewtSalamander I have to dig into the code again to figure out where we stand. When I fix it, I'll be sure to implement it fully. |
I just ran into this also using Asciidoctor 1.5.2 [http://asciidoctor.org] So here is a +1 for a fix. ;-) |
In fact, linking to section IDs does not work for me either. |
The David Gamba's quick fix works for the most part except it doesn't work if you make a cross reference to a table. The link to the table shows but when you click it, it doesn't work. |
We'll need to implement the same anchor logic for blocks as we are currently doing for sections. Then, with the fix by @DavidGamba, all the xrefs should start working. Definitely a top priority item to get addressed as soon as I get into Asciidoctor PDF work again (soonish). |
David's patch made me realize that we are using the wrong attribute to get the xref target. We have to use a combination of what we use for the DocBook and HTML5 backend to get what we want. I'll submit a patch shortly. |
I'd like to scope this issue to xrefs to sections and deal with the xrefs to arbitrary blocks in a separate issue. |
- retrieve the anchor name from the fragment attribute - handle inter-document xrefs by consulting the path attribute - honor the reftext of the destination - warn if an xref cannot be resolved
- retrieve the anchor name from the fragment attribute - handle inter-document xrefs by consulting the path attribute - honor the reftext of the destination - warn if an xref cannot be resolved - don't inherit when resolving attributes on anchor node
resolves #56 fix xref to sections
I believe this is now fixed (for sections). Please check using git master. Feel free to reopen if there are still issues. |
I am still facing some issues with this. #809 |
Same issue here... Asciidoctor 1.5.7.1 [https://asciidoctor.org] |
This issue has already been resolved. Therefore, if you feel that you have found a case that it doesn't cover, you'll need to provide the details in a new issue. Thanks! |
I tried asciidoctor-pdf today. It's looking really nice on my sample document!
One thing I noticed is that cross references are clickable within the pdf, but the user isn't taken to the target. I'm not 100% sure if cross references should already work or not.
Using asciidoctor-pdf-1.5.0.alpha.5 and a slightly modified example.adoc, see below.
The text was updated successfully, but these errors were encountered: