Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Prevent double entries in navigation panel of Using Matplotlib#26262

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
StefRe wants to merge1 commit intomatplotlib:mainfromStefRe:doc/users_navigation

Conversation

StefRe
Copy link
Contributor

PR summary

Prevent double entries in navigation panel of Using Matplotlib.

closes#26261.

PR checklist

@StefRe
Copy link
ContributorAuthor

Renaming README.txt to index.rst solved the double entries issue but it also removed to sphinx gallery thumbnails. Do we need the thumbnails?

OLD:
grafik



NEW:
grafik

@tacaswell
Copy link
Member

I would prefer the thumbnails over the headings, but that is a mild preference. If getting that is hard this is 👍

@jklymak
Copy link
Member

Ha ha. OK, we are whack-a-moling sphinx/sphinx-gallery weirdness here.

#26141 added the manual TOC so that the cards inhttps://matplotlib.org/devdocs/users/explain/index.html would have subsections (see the Color card). If you remove the manual TOC, then the sphinx-gallery TOC is hidden and doesn't show up as a subsection. However, it appears that the left bar is somehow able to parseboth the hidden and the visible TOC.

There seem to be a few ways to fix this

  1. make the cards ourselves, and don't let sphinx gallery make the index.rst (basically this PR).
  2. sphinx gallery optionally allows the TOC they generate to be visible instead of "hidden"
  3. pydata sphinx theme could respect "hidden" (however I expect they don't respect "hidden" because folks want sphinx gallery to work).
  4. Somehow make TOC entries for user/explain/index include hidden index.

@jklymak
Copy link
Member

Ah, 3 is probably the best bet

.. toctree::   :includehidden:

So the todo here is 1) remove the manual TOC entries in#26141 and fix users/explain/index entries to have:include hidden:.@StefRe happy for you to do this, or I'm happy to do it.

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

See comments for what I think is the right path here.

@StefRe
Copy link
ContributorAuthor

StefRe commentedJul 5, 2023
edited
Loading

@jklymak I would be grateful if you could finish this. I tried several things but I admit didn't fully understand what I'm doing actually, so it would be great if you could make this work so maybe I can learn how things work here.
Maybe it's easier to close this PR and you make a new one - I'm happy with any solution.

@jklymak
Copy link
Member

Sure, if OK it'll be easier for me to just open a new PR. Thanks for noticing the issue!

StefRe reacted with thumbs up emoji

@StefReStefRe closed thisJul 5, 2023
@StefReStefRe deleted the doc/users_navigation branchJuly 5, 2023 18:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[Doc]: Double entries in navigation menu of Using Matplotlib
3 participants
@StefRe@tacaswell@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp