Closed gianlucadetommaso closed 1 year ago
I wasn't aware of this option. So I guess it is currently not supported.
@gianlucadetommaso can you please clarify what you mean by "thumbnail size"?
The thumbnail feature of nbsphinx
only links to existing image files, it doesn't create separate thumbnail image files, therefore (2) cannot be changed (except by changing the original image).
(1) could be easily changed via CSS.
Can you please elaborate about what you want to achieve?
I still don't understand.
The link you provided says:
The gallery uses various CSS classes to display these thumbnails, which default to maximum 160x112px.
This means that however large you make the thumbnails with thumbnail_size
, they will still not be displayed larger than 160x112px.
I'm not really a user of Sphinx Gallery, but looking at the example gallery at https://sphinx-gallery.github.io/stable/auto_examples/index.html#general-examples confirms that:
From that I have to conclude that thumbnail_size
would only change (2).
If you want to change (1), you can use your own custom CSS for that.
Please note that the CSS for galleries will likely change in future nbsphinx
versions, see (and participate in!) the discussion at https://github.com/mgeier/nbsphinx/pull/2.
Now that I better read through you replies, I think what I was expecting to change with thumbnail_size
was actually 2), not 1) - sorry about that. Yet, the reason why I felt the need of changing the image file size was very related to spatialaudio#655: the horizontal layout of the newer version of Sphinx generated images far too small with respect to the size of their canvas. Personally, I found the grid-based layout given by the older version of Sphinx more appealing to the eye.
related to spatialaudio#655: the horizontal layout of the newer version of Sphinx generated images
This is not an intentional change, this is a bug!
The short-term work-around is to restrict the Sphinx Gallery version (see #691):
sphinx-gallery<0.11
The long-term solution is maybe to come up with new HTML and CSS, see e.g. https://github.com/mgeier/nbsphinx/pull/2#issuecomment-1356751019
Got it, thanks a lot for your answers!
I think this can be closed. If you have further questions, please let me know!
Hi, is there a way to add thumbnail size when adding
nbsphinx-thumbnail
as cell metadata fornbgallery
? Is there any way in general to change the thumbnail size? Thethumbnail_size
option from Sphinx Gallery is not working for me.