For the vertical alignment you can use:
http://sphinx-doc.org/ext/math.html#confval-pngmath_use_preview

I am a bit confused about rst2pdf.pdfbuilder AND latexpdf because I think
rst2pdf.pdfbuilder is an alternative to the LaTeX-Builder.

Anyway, you could use two different conf.py (called html.py and epub.py).
In html.py you use mathjax, in epub.py pngmath. Then you call Sphinx via

sphinxbuild -b html -c html.py sourcedir builddir

or

sphinxbuild -b epub -c epub.py sourcedir builddir


2014-02-22 19:02 GMT+01:00 Eric D <[email protected]>:

> I am just trying out Sphinx for the first time (1.1.3 on Ubuntu 13.10) and
> am somewhat frustrated by what appear to be conflicts between certain
> extensions.
>
> When I use 'sphinx.ext.pngmath' to render mathematics, it works for both
> html and epub build targets, but the vertical alignment is painful.
>
> When I use 'sphinx.ext.mathjax' the math renders beautifully in html, but
> not at all in epub.
>
> When I use try to build a pdf version by adding 'rst2pdf.pdfbuilder' to my
> extensions list, and the latexpdf build target, it works great but I can no
> longer build html or epub versions with rendered mathematics.
>
> To sum up, having rst2pdf.pdfbuilder in my extensions list prevents any
> math rendering in html or epub. I suppose the pngmath vs. mathjax question
> isn't a conflict, per se, but I wish I could have *both* extensions and
> have it use the pngmath for epub and mathjax for html.
>
> Is there a way to set up the conf.py so I use only certain extensions with
> each build target? That is, if I am building epub, I only want
> sphinx.ext.pngmath, if html then sphinx.ext.mathjax, and if pdf then
> rst2pdf.pdfbuilder. I can't seem to have all three present at the same time.
>
> Or am I missing some Big Picture concept?
>
> -Eric
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to