Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pdf: Support setting URLs on Text objects #17832

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

Merged
merged 2 commits into from
Oct 7, 2020
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jul 4, 2020

PR Summary

This is the minimum needed to get what I wanted , but it still needs some work to be fully implemented. It currently only works for plain text, and not text that goes through draw_tex, as I don't yet know how to get the text bounding box in that path.

Also needs tests and documentation.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [n/a] Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

@jkseppan
Copy link
Member

Looks like a good idea to me, and likely to be useful even if it doesn't work for usetex strings. I think including pdf files in pdftex (which I suppose is the main use case for usetex with pdf) breaks links in any case, or at least it did when I last tried which may have been 10+ years ago.

@QuLogic
Copy link
Member Author

QuLogic commented Jul 31, 2020

Oh, I think I got that working as well, just didn't update the description. Still need to figure out how to test though.

@QuLogic
Copy link
Member Author

QuLogic commented Aug 12, 2020

Tests and documentation added.

@jklymak
Copy link
Member

jklymak commented Aug 14, 2020

... test failures are real on mac and windows - doesn't like the string parsing...

@QuLogic
Copy link
Member Author

QuLogic commented Aug 14, 2020

Ah, because we don't have LaTeX on those systems.

@QuLogic
Copy link
Member Author

QuLogic commented Aug 14, 2020

I split that test in two, so it could get the needs_usetex decorator on one of them.

@jklymak jklymak closed this Aug 24, 2020
@jklymak jklymak reopened this Aug 24, 2020
This allows annotations which depend on layout of the page to be added.
@tacaswell tacaswell added this to the v3.4.0 milestone Oct 7, 2020
@tacaswell tacaswell merged commit 327cfcf into matplotlib:master Oct 7, 2020
@QuLogic QuLogic deleted the pdf-url branch October 7, 2020 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants