Skip to content

[Doc]: Thumbnail title in gallery show rst formatting characters #23884

Closed

Description

@StefRe

Documentation Link

https://matplotlib.org/devdocs/tutorials/index.html#intermediate

Problem

for instance here:

image

This is caused by sphinx-gallery/sphinx-gallery#906. I'm not sure if this can be fixed on matplotlib's side or must be addressed in sg. See also sphinx-gallery/sphinx-gallery#998.

Suggested improvement

The title should be just origin and extent in imshow without *, ~.Axes. prefix and backticks.

Activity

  1. timhoffm commented on Sep 13, 2022

    @timhoffm
    Member

    Agreed that we should not use markup in headings.

    Maybe we can make the wording more explicit though. How about

    imshow(): Behavior of parameters origin and extent

  2. QuLogic commented on Sep 13, 2022

    @QuLogic
    Member

    It would be best if this were fixed in sphinx-gallery; never know if we might accidentally introduce formatting in a title somewhere later, even if we fix them all now.

  3. timhoffm commented on Sep 13, 2022

    @timhoffm
    Member

    The question generally is how? While emphasis may be viable, do you really want to have links, literal code etc in a title?

  4. QuLogic commented on Sep 14, 2022

    @QuLogic
    Member

    We already disallow links in headings, but it's only enforced when we notice it. For the sphinx-gallery cards, it'd be better to strip all formatting.

  5. StefRe commented on Sep 14, 2022

    @StefRe
    ContributorAuthor

    My intention when opening this issue was not so much to change the examples and tutorials but restore the behavior of sg < 0.11.0 where any formatting was stripped from the title, see the old docs:

    grafik

    The question was more if this could be achieved by some CSS voodoo on the part of matplotlib instead of waiting for a fix in sg.

  6. timhoffm commented on Sep 14, 2022

    @timhoffm
    Member

    This would need to be addressed in Sphinx-gallery.

  7. StefRe commented on Sep 14, 2022

    @StefRe
    ContributorAuthor

    I've opened an issue there: sphinx-gallery/sphinx-gallery#1002

  8. StefRe commented on Mar 19, 2023

    @StefRe
    ContributorAuthor

    The original example above has no thumbnail anymore (due to #25395). With Sphinx Gallery 0.12.2 and sphinx-gallery/sphinx-gallery#1108 there's only a single case left which will be fixed by #25508 .

  9. added this to the v3.7.2 milestone on Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions