From a78a554a3f1441813362143f3746536680c892cc Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 4 Oct 2022 20:05:51 +0200 Subject: [PATCH] fix example galleries in documentation * exclude sphinx-gallery==0.11.0 * fix CSS * Update docs/requirements.txt --- docs/requirements.txt | 2 +- docs/source/_static/css/custom_torchvision.css | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1ff0c828042..09a11359ae7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,7 @@ matplotlib numpy sphinx-copybutton>=0.3.1 -sphinx-gallery>=0.9.0 +sphinx-gallery>=0.11.1 sphinx==5.0.0 tabulate -e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme diff --git a/docs/source/_static/css/custom_torchvision.css b/docs/source/_static/css/custom_torchvision.css index bdc4071c1aa..07346d7b03f 100644 --- a/docs/source/_static/css/custom_torchvision.css +++ b/docs/source/_static/css/custom_torchvision.css @@ -21,3 +21,15 @@ article.pytorch-article .reference.download.internal, article.pytorch-article .s .table-weights p { margin-bottom: 0.2rem !important; } + +/* Fix for Sphinx gallery 0.11 +See https://github.com/sphinx-gallery/sphinx-gallery/issues/990 +*/ +article.pytorch-article .sphx-glr-thumbnails .sphx-glr-thumbcontainer { + width: unset; + margin-right: 0; + margin-left: 0; +} +article.pytorch-article div.section div.wy-table-responsive tbody td { + width: 50%; +}