nbsphinx icon indicating copy to clipboard operation
nbsphinx copied to clipboard

nbgallery thumbnails fill width with sphinx-gallery 0.11

Open hakonanes opened this issue 2 years ago • 7 comments

This nbsphinx gallery:

Reference frames
================

These tutorials cover the relevant reference frames in EBSD and how to determine the
detector-sample geometry, also known as the projection/pattern center (PC).

.. nbgallery::

    reference_frames
    pc_calibration_moving_screen_technique

looks like this with sphinx-gallery 0.10.1:

image

and like this with sphinx-gallery 0.11:

image

I'm afraid I don't know the reason for this. Are anyone else seeing this as well?

As a temporary solution, I'm pinning sphinx-gallery to < 0.11 in my projects.

hakonanes avatar Jul 28 '22 17:07 hakonanes

Yes seeing the same here, also pinning sphinx-gallery < 0.11 for now.

kburns avatar Jul 30 '22 01:07 kburns

Thanks for reporting this!

I can reproduce the problem, but I will only have time to look into this after next week.

If somebody has any additional information, please let me know!

I'm of course also open for a pull request!

mgeier avatar Aug 05 '22 07:08 mgeier

I will only have time to look into this after next week.

That would be great! However, there is no rush to amend this behaviour with sphinx-gallery v0.11 from my side, at least.

hakonanes avatar Aug 05 '22 07:08 hakonanes

I've made a first attempt for solving this at #666.

mgeier avatar Aug 28 '22 13:08 mgeier

I'm leaning towards creating custom HTML and CSS for nbsphinx and to stop being compatible with Sphinx Gallery (https://github.com/sphinx-gallery/sphinx-gallery/pull/1005#issuecomment-1289433992).

See https://github.com/mgeier/nbsphinx/pull/2 for a discussion, feel free to chime in!

mgeier avatar Jan 08 '23 11:01 mgeier

I'm working on a potential solution in #706, please review!

mgeier avatar Jan 21 '23 09:01 mgeier

I built my documentation locally with the changes in #706, and found the changes to solve my issue.

The gallery tiles look very nice. And I like that the tooltip shows the full notebook description. Thank you!

hakonanes avatar Jan 21 '23 17:01 hakonanes