-
Notifications
You must be signed in to change notification settings - Fork 687
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
Add a high level feature for creating in-page anchors #689
Comments
Note that #683 is still a valid issue currently, I've only closed it because until we have a legitimate high level interface to support, it's a bug in the internals rather than in something that is officially part of Prawn's external API. A patch is still welcome, and I will reopen #683 when we find a solution for this ticket. |
Should also consider adding a higher level interface for making external links to, particularly for use w. images |
Bumping this just because I've ran into the problem myself several times. |
I can also add that many users of Asciidoctor PDF are requesting a feature that depends on it. See asciidoctor/asciidoctor-pdf#56. I've hacked in some support for linking to sections, but references are not generally available atm. |
Here's how I implemented cross-references in a small project I'm currently working on: add_dest "LinkedSection", dest_xyz(bounds.absolute_left, y)
# somewhere else in the document
text '<link anchor="LinkedSection">Click me!</link>', :inline_format => true So... we have the raw tools in place, they're just awkward to use. I'll give some thought into how to wrap them nicely, but proposals are welcome. |
Great! Thanks! As I work on the feature, I'll let you know if any instincts about an API |
RIght now using anchors in Prawn relies on digging down into the very low level PDF::Core::Destinations code, and it shouldn't have to. For this reason, I actually undocumented anchors in our manual and API docs.
I started an experiment to implement higher level functionality in #684, but then realized I'd rather someone who has a practical use case for anchors take a stab at building an API for them. Until then, our support for anchors should be considered mostly unsupported.
Suggestions are welcome on this, and it might be an easy patch for someone new to the project.
The text was updated successfully, but these errors were encountered: