8000 [Doc]: Multipage PDF: unclear which backend supports and which does not support attach_note() · Issue #29428 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[Doc]: Multipage PDF: unclear which backend supports and which does not support attach_note() #29428

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

Closed
jaskij opened this issue Jan 7, 2025 · 4 comments · Fixed by #29433
Closed
Milestone

Comments

@jaskij
Copy link
jaskij commented Jan 7, 2025

Documentation Link

https://matplotlib.org/stable/gallery/misc/multipage_pdf.html

Problem

The issue is in the first two paragraphs of the page.

This is a demo of creating a pdf file with several pages, as well as adding metadata and annotations to pdf files.

If you want to use a multipage pdf file using LaTeX, you need to use from matplotlib.backends.backend_pgf import PdfPages. This version however does not support attach_note.

Reading, it is unclear whether "this" in the last sentence refers to pdf backend (as suggested by it being on the page for it) or pgf (as suggested by it being in the paragraph about pgf).

Only after clickking on the hyperlinked attach_note do I have to notice that it is a documentation page for a specific backend (which isn't obvious, being sent to an anchor in the middle of the document without header visible). From there, seeing that pdf has attach_note() I can infer that pgf doesn't. That string of logic is quite long for something that should have been clearly stated.

Suggested improvement

Change "this" to "that" in the last quoted sentence would probably make it clearer it is referring to the backend not used in the example. Or perhaps a different change in wording.

@Khushikela29
Copy link
Contributor

I've raised a PR for the issue, check if the results suite your issue

@anntzer
Copy link
Contributor
anntzer commented Jan 9, 2025

As far as I can see, the note in the docstring regarding latex support is simply wrong and should just be deleted: backend_pdf.PdfPages supports latex just fine. In fact the example showcases just that on page two...

@Khushikela29
Copy link
Contributor

So should I just remove the sentence ?

@anntzer
Copy link
Contributor
anntzer commented Jan 9, 2025

Yes.

@rcomer rcomer linked a pull request Jan 11, 2025 that will close this issue
2 tasks
@rcomer rcomer closed this as completed in 685ea2b Jan 11, 2025
@rcomer rcomer added this to the v3.11.0 milestone Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0