diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-13 22:03:32 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-13 22:54:01 +0900 |
commit | e5ddc36fd1997e2425477d9a9f1379adb6c3cf91 (patch) | |
tree | 8b256e050b2bcc62c3f073500de0e03f08a82f67 /sphinx/ext/jsmath.py | |
parent | 1c3eadcf61ab2725801218b207640bc7634b0f8f (diff) | |
download | sphinx-git-e5ddc36fd1997e2425477d9a9f1379adb6c3cf91.tar.gz |
Fix mathjax is not loaded
Diffstat (limited to 'sphinx/ext/jsmath.py')
-rw-r--r-- | sphinx/ext/jsmath.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py index dc00273a7..809ce0424 100644 --- a/sphinx/ext/jsmath.py +++ b/sphinx/ext/jsmath.py @@ -64,7 +64,8 @@ def builder_inited(app): if not app.config.jsmath_path: raise ExtensionError('jsmath_path config value must be set for the ' 'jsmath extension to work') - app.add_js_file(app.config.jsmath_path) + if app.builder.format == 'html': + app.builder.add_js_file(app.config.jsmath_path) # type: ignore def setup(app): |