From 09399855c8f033376f5a7a7e8bc2698263f50630 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 18 Jul 2019 13:05:56 -0400 Subject: [PATCH 1/3] Delete mathjax extension, remove img width 100% This is in preparation for turning on imgmath as a replacement for KaTeX; we must not have width: 100% on images as it causes rendering problems for img math. Signed-off-by: Edward Z. Yang --- docs/conf.py | 1 - js/mathjax.js | 16 ---------------- scss/shared/_article.scss | 4 ---- 3 files changed, 21 deletions(-) delete mode 100644 js/mathjax.js diff --git a/docs/conf.py b/docs/conf.py index 780eed1e..812efcd9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,6 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.autodoc', - 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain', ] diff --git a/js/mathjax.js b/js/mathjax.js deleted file mode 100644 index fe5e04f6..00000000 --- a/js/mathjax.js +++ /dev/null @@ -1,16 +0,0 @@ -if (typeof window.MathJax === "object") { - window.MathJax.Hub.Config({ - messageStyle: "none", - "HTML-CSS": { - showMathMenu: false, - linebreaks: { automatic: true, width: "container" } , - preferredFont: "STIX", - availableFonts: ["STIX","TeX"], - scale: 100, - minScaleAdjust: 100 - }, - SVG: { linebreaks: { automatic: true, width: "container" } } - }); - - window.MathJax.Hub.Configured(); -} diff --git a/scss/shared/_article.scss b/scss/shared/_article.scss index 612938b4..813b3019 100644 --- a/scss/shared/_article.scss +++ b/scss/shared/_article.scss @@ -123,8 +123,4 @@ article.pytorch-article { margin-bottom: rem(40px); width: 65%; } - - img { - width: 100%; - } } From d2f9a1272f8e23307e0c2158ee7a2bfeafeba44c Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 23 Jul 2019 11:18:25 -0400 Subject: [PATCH 2/3] Replace with new css Signed-off-by: Edward Z. Yang --- scss/_sphinx_base.scss | 3 +++ scss/shared/_article.scss | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/scss/_sphinx_base.scss b/scss/_sphinx_base.scss index fe2ecb5c..4640c2ee 100644 --- a/scss/_sphinx_base.scss +++ b/scss/_sphinx_base.scss @@ -777,6 +777,9 @@ article.pytorch-article .caption { article.pytorch-article { .math { color: $not_quite_black; + img { + width: auto; + } } } diff --git a/scss/shared/_article.scss b/scss/shared/_article.scss index 813b3019..612938b4 100644 --- a/scss/shared/_article.scss +++ b/scss/shared/_article.scss @@ -123,4 +123,8 @@ article.pytorch-article { margin-bottom: rem(40px); width: 65%; } + + img { + width: 100%; + } } From 1b767bf86af808c1d8c7ab33c067786de3087004 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 23 Jul 2019 11:38:38 -0400 Subject: [PATCH 3/3] Bugfix for block and inline math Signed-off-by: Edward Z. Yang --- scss/_sphinx_base.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scss/_sphinx_base.scss b/scss/_sphinx_base.scss index 4640c2ee..32919056 100644 --- a/scss/_sphinx_base.scss +++ b/scss/_sphinx_base.scss @@ -777,6 +777,8 @@ article.pytorch-article .caption { article.pytorch-article { .math { color: $not_quite_black; + width: auto; + text-align: center; img { width: auto; }