have sphinx configuration switch math formula renderer for epub

this still needs work, that has to be done after we switched to RST
This commit is contained in:
Axel Kohlmeyer
2019-10-18 04:47:18 -04:00
parent 24b54026e2
commit bb21847f8a

View File

@ -30,7 +30,7 @@ import os
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'sphinx.ext.mathjax', 'sphinx.ext.mathjax', 'sphinx.ext.imgmath'
] ]
# 2017-12-07: commented out, since this package is broken with Sphinx 16.x # 2017-12-07: commented out, since this package is broken with Sphinx 16.x
# yet we can no longer use Sphinx 15.x, since that breaks with # yet we can no longer use Sphinx 15.x, since that breaks with
@ -201,6 +201,11 @@ htmlhelp_basename = 'LAMMPSdoc'
html_add_permalinks = '' html_add_permalinks = ''
if 'epub' in sys.argv:
html_math_renderer = 'imgmath'
else:
html_math_renderer = 'mathjax'
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
latex_elements = { latex_elements = {