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

Skip to content

DOC: Fix thumbnail title for sphinx gallery #25508

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
Mar 22, 2023

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Mar 19, 2023

PR Summary

Sphinx Gallery 0.11.0 left RST formatting characters in the thumbnail titles. This was fixed in version 0.12.2 for most cases by sphinx-gallery/sphinx-gallery/pull/1005, which doesn't cover default roles. So to restore the previous behavior we need to explicitely specify a role.

Closes #23884.

PR Checklist

Documentation and Tests

  • [N/A] Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Sphinx Gallery 0.11.0 left RST formatting characters in the thumbnail
titles. This was fixed in version 0.12.2 for most cases by
github.com/sphinx-gallery/sphinx-gallery/pull/1005, which doesn't
cover default roles. So to restore the previous behavior we need
to explicitely a role.
Co-authored-by: Elliott Sales de Andrade <[email protected]>
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.

I don't suppose there is appetite for linking to the main library way of doing these things while we are on this page? Eg https://matplotlib.org/stable/gallery/subplots_axes_and_figures/colorbar_placement.html

@ksunden ksunden added this to the v3.7-doc milestone Mar 21, 2023
@StefRe
Copy link
Contributor Author

StefRe commented Mar 22, 2023

I don't suppose there is appetite for linking to the main library way of doing these things while we are on this page?

@jklymak I didn't look at the content of the example, just the way the title displays in the thumbnail. So I'd prefer not to change the content of the example in this PR. This is mainly because I've never used the axes_grid1 toolkit myself and frankly speaking don't know what parts of the toolkit could not also be more or less easily covered by the main library. Looking at https://matplotlib.org/devdocs/api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.html#module-mpl_toolkits.axes_grid1.axes_grid, it also seems that the docs could use a little makeover.

@timhoffm timhoffm merged commit 4b42d7f into matplotlib:main Mar 22, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 22, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 22, 2023
@StefRe StefRe deleted the fix/thumbnail_text branch March 22, 2023 13:51
rcomer added a commit that referenced this pull request Mar 22, 2023
…508-on-v3.7.1-doc

Backport PR #25508 on branch v3.7.1-doc (DOC: Fix thumbnail title for sphinx gallery)
rcomer added a commit that referenced this pull request Mar 22, 2023
…508-on-v3.7.x

Backport PR #25508 on branch v3.7.x (DOC: Fix thumbnail title for sphinx gallery)
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]: Thumbnail title in gallery show rst formatting characters
6 participants