Skip to content

Fix PDF contents #21659

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 4 commits into from
Nov 29, 2021
Merged

Fix PDF contents #21659

merged 4 commits into from
Nov 29, 2021

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Nov 17, 2021

PR Summary

This fixes:

  • the top-level document of the PDF, contents was removed in DOC: more site re-org #21251.
  • the tree for the installation docs, which had Source/FAQ before the Installation Guide
  • add Chapters to the ToC, which previously (in 3.5) showed only the handful of Parts
  • swaps tutorials/examples and general sections in user guide

Fixes #21655

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@QuLogic QuLogic added this to the v3.5-doc milestone Nov 17, 2021
@QuLogic QuLogic changed the base branch from v3.5.0-doc to main November 23, 2021 09:07
@QuLogic QuLogic marked this pull request as ready for review November 23, 2021 09:11
@jklymak jklymak mentioned this pull request Nov 23, 2021
6 tasks
@@ -0,0 +1,3 @@
.. redirect-from:: /users/installing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves /users/installing/index.html a blank page except for the heading "Installation" Did we want to un-hide the toctree?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yea, that's annoying. The problem is that including INSTALL.rst directly causes duplicate labels and other weirdness. I guess showing the toc might be the easiest fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think a problem here is the include. Seems like it would be preferable for INSTALL.rst to simply refer to the correct place in the documentation, rather than have canonical information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I ended up moving things into doc/users/installing.rst for multiple reasons. Having it separate caused weirdness in the toctree of the PDF, moving it to INSTALL.rst breaks the redirects, and putting things in doc/users/installing/install.rst like I did before makes empty pages without tocs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not have it in doc/users/installing/index.rst? Other than the fact that maybe installing doesn't have any subfiles now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also used to be there in <=3.4, so it seemed best to move it back with it being only one file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but moving it was deliberate. Currently from https://matplotlib.org/stable/users/index under "General" each of the sections (Getting Started, Installation, etc) goes to its own subdirectory in users/getting_started etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I can revert that. I wonder if we could end up keeping the file split, if we only got rid of the include stuff, but this is probably fine.

This order seems to make more sense in the PDF, and it's probably okay
in the webpage too. The end of the Quick start (which is the first page
of General points to Installation, Plot types, and Tutorials, so you can
navigate to those parts that used to be first quite easily.
This ensures that the ToC as generated in the PDF makes sense, and
doesn't appear in the wrong order.

Also fixes the redirect to come from the right place.
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the PDF is good...

@jklymak
Copy link
Member

jklymak commented Nov 27, 2021

...by which I meant feel free to self merge if the Pdf is good. 😉

@QuLogic QuLogic merged commit 425cc77 into matplotlib:main Nov 29, 2021
@QuLogic QuLogic deleted the fix-pdf branch November 29, 2021 21:40
@lumberbot-app
Copy link

lumberbot-app bot commented Nov 29, 2021

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.5.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -m1 425cc7729ac9f9c562f2f9654bfd0730abf5eb62
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #21659: Fix PDF contents'
  1. Push to a named branch:
git push YOURFORK v3.5.x:auto-backport-of-pr-21659-on-v3.5.x
  1. Create a PR against branch v3.5.x, I would have named this PR:

"Backport PR #21659 on branch v3.5.x (Fix PDF contents)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@lumberbot-app
Copy link

lumberbot-app bot commented Nov 29, 2021

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.5.0-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -m1 425cc7729ac9f9c562f2f9654bfd0730abf5eb62
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #21659: Fix PDF contents'
  1. Push to a named branch:
git push YOURFORK v3.5.0-doc:auto-backport-of-pr-21659-on-v3.5.0-doc
  1. Create a PR against branch v3.5.0-doc, I would have named this PR:

"Backport PR #21659 on branch v3.5.0-doc (Fix PDF contents)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Nov 29, 2021
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Nov 29, 2021
@QuLogic
Copy link
Member Author

QuLogic commented Nov 29, 2021

Backports in #21804 and #21805

QuLogic added a commit that referenced this pull request Nov 29, 2021
Backport PR #21659 on branch v3.5.x (Fix PDF contents)
QuLogic added a commit that referenced this pull request Nov 29, 2021
Backport PR #21659 on branch v3.5.0-doc (Fix PDF contents)
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.

[Doc]: 3.5.0 PDF is unavailable
2 participants