Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As suggested by the answer to my question here, I am using the Sphinx tool in order to multi-target PDF and HTML output. For HTML, I'm using the pngmath extension.

The vertical alignment of inline math in the HTML output is very bothersome. The math equations are positioned below where they should and this causes the entire rendered page to look bad because none of the equations are lined-up properly.

Does anyone know how this can be fixed?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

See my question about exactly that, in short the solution is to add to conf.py:

pngmath_latex_preamble=r'\usepackage[active]{preview}' # + other custom stuff for inline math, such as non-default math fonts etc.
pngmath_use_preview=True

This "feature" is explained in sphinx docs.

share|improve this answer
    
Thanks! That fixed it. Why anyone would want that "feature" escapse me. –  3Sphere Jul 30 '11 at 19:01
    
They say it is because the preview package does not come installed with LaTeX in all distributions. Personally I think it would be better to force people install it, because it really looks horrible without it. –  eudoxos Jul 31 '11 at 8:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.