File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 55
55
# Add any Sphinx extension module names here, as strings. They can be
56
56
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
57
57
# ones.
58
- extensions = ['sphinx.ext.mathjax' , 'sphinx_copybutton' ,
59
- 'sphinx_gallery.gen_gallery' ]
58
+ extensions = [
59
+ 'sphinxcontrib.katex' ,
60
+ 'sphinx_copybutton' ,
61
+ 'sphinx_gallery.gen_gallery' ,
62
+ ]
60
63
61
64
62
65
# -- Sphinx-gallery configuration --------------------------------------------
242
245
243
246
244
247
def setup (app ):
248
+ # NOTE: in Sphinx 1.8+ `html_css_files` is an official configuration value
249
+ # and can be moved outside of this function (and the setup(app) function
250
+ # can be deleted).
251
+ html_css_files = [
252
+ 'https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.min.css'
253
+ ]
254
+ # In Sphinx 1.8 it was renamed to `add_css_file`, 1.7 and prior it is
255
+ # `add_stylesheet` (deprecated in 1.8).
256
+ add_css = getattr (app , 'add_css_file' , app .add_stylesheet )
257
+ for css_file in html_css_files :
258
+ add_css (css_file )
259
+
245
260
# Custom CSS
246
261
# app.add_stylesheet('css/pytorch_theme.css')
247
262
# app.add_stylesheet('https://fonts.googleapis.com/css?family=Lato')
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ ray[tune]
23
23
24
24
ipython
25
25
26
+ sphinxcontrib.katex
26
27
# to run examples
27
28
boto3
28
29
pandas
You can’t perform that action at this time.
0 commit comments