|
35 | 35 | extensions = [
|
36 | 36 | 'sphinx.ext.autodoc',
|
37 | 37 | 'sphinx.ext.autosummary',
|
38 |
| - 'sphinx.ext.mathjax', |
39 | 38 | 'sphinx.ext.viewcode',
|
40 | 39 | 'sphinx.ext.napoleon', # support for NumPy-style docstrings
|
41 | 40 | 'sphinx.ext.intersphinx',
|
|
95 | 94 | }
|
96 | 95 | plot_formats = ['svg', 'pdf']
|
97 | 96 |
|
98 |
| -mathjax_config = { |
| 97 | +# use mathjax2 with |
| 98 | +# https://github.com/spatialaudio/nbsphinx/issues/572#issuecomment-853389268 |
| 99 | +# and 'TeX' dictionary |
| 100 | +# in future we might switch to mathjax3 once the |
| 101 | +# 'begingroup' extension is available |
| 102 | +# http://docs.mathjax.org/en/latest/input/tex/extensions/begingroup.html#begingroup |
| 103 | +# https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html |
| 104 | +mathjax_path = ('https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js' |
| 105 | + '?config=TeX-AMS-MML_HTMLorMML') |
| 106 | +mathjax2_config = { |
| 107 | + 'tex2jax': { |
| 108 | + 'inlineMath': [['$', '$'], ['\\(', '\\)']], |
| 109 | + 'processEscapes': True, |
| 110 | + 'ignoreClass': 'document', |
| 111 | + 'processClass': 'math|output_area', |
| 112 | + }, |
99 | 113 | 'TeX': {
|
100 | 114 | 'extensions': ['newcommand.js', 'begingroup.js'], # Support for \gdef
|
101 | 115 | },
|
|
219 | 233 |
|
220 | 234 | # -- Options for HTML output ----------------------------------------------
|
221 | 235 |
|
222 |
| -def setup(app): |
223 |
| - """Include custom theme files to sphinx HTML header""" |
224 |
| - app.add_stylesheet('css/title.css') |
| 236 | +html_css_files = ['css/title.css'] |
225 | 237 |
|
226 | 238 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
227 | 239 | # a list of builtin themes.
|
|
0 commit comments