theoretical-physics icon indicating copy to clipboard operation
theoretical-physics copied to clipboard

Build a version with mathjax

Open certik opened this issue 10 years ago • 4 comments

Perhaps at /dev-mathjax. The png based image math is hard to read on a high resolution (retina) display.

certik avatar Nov 22 '14 22:11 certik

It's trivial to do

diff --git a/src/conf.py b/src/conf.py
index 8725f11..4c651a7 100644
--- a/src/conf.py
+++ b/src/conf.py
@@ -23,7 +23,7 @@ sys.path.append(os.path.abspath('../exts'))

 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.pngmath', "math_dollar"]
+extensions = ['sphinx.ext.mathjax', "math_dollar"]

 latex_preamble = r"""
 \usepackage{dsfont}

When I did this, no the complex page, there were some math errors with \atan2.

asmeurer avatar Nov 23 '14 00:11 asmeurer

I guess you must have some preamble or something, which isn't being passed to mathjax. It's the same with \d and \half, which aren't even real latex.

asmeurer avatar Nov 23 '14 00:11 asmeurer

Oh wow, you have quite the preamble. I think for mathjax all the \newcommands have to be defined in the file. I don't know about the rest.

asmeurer avatar Nov 23 '14 00:11 asmeurer

well the rest is to put the preamble inside layout.html and put a if there to make sure these only works for the case of building using mathjax.

emptymalei avatar Nov 23 '14 04:11 emptymalei