Friday 14 November 2008 18:16:17 Fredrik Johansson
> On Fri, Nov 14, 2008 at 5:44 PM, Sebastian Wiesner
>
> <[EMAIL PROTECTED]> wrote:
> > Friday 14 November 2008 17:17:26 Fredrik Johansson
> >
> >> 1. Inline equations need proper vertical alignment.
> >
> > Proper vertical alignment is supported by Sphinx, but depends on the
> > latex- preview package.  Since this package is not available everywhere,
> > Sphinx does not use it by default.   But if you're sure, that the package
> > is installed, set "pngmath_use_preview" to True in conf.py, and rebuild
> > the docs.  This will result in proper image alignment.
>
> As I said in the followup, vertical-align:middle would work in most
> cases. Certainly, it is a better default. If no one agrees, at least
> give me a CSS class for formulas so I can vertical-align:middle them
> myself :-)

I doubt, that vertical-align:middle works as expected.  The baseline is not 
necessarily located in the vertical center of the image.

Image a formula containing only lowercase letters (e.g. "a + c").  Centering 
such an image would center the lowercase "a" on the line, which is certainly 
not, what you want.  Even more problematic are formulas like "g + a", which 
contain letters reaching below the baseline.  Centering this image would 
center "g" on line, making it look more like "9" than like "g".

> > You can change the fonts used by the math extension through the
> > "pngmath_latex_preamble" option.  For instance,
> >
> >    pngmath_latex_preamble = """\\usepackage{mathpazo}"""
> >
> > would result in Palatino being used.
>
> The problem is rather with the dvipng options. I looked at the options
> Wikipedia (MediaWiki) uses for dvipng, and it can be expressed as
> follows in Sphinx:
>
> pngmath_dvipng_args = ['-gamma 1.5', '-D 120']
>
> How about making these settings default? 

On my system, these options worsen the readability of the rendered formulas, 
as they become overly large compared with surrounding text.  The effect of "-
gamma 1.5" isn't really clear to me, I didn't notice any real difference.

> If not, I strongly suggest mentioning the font readability problem (and the
> above command that solves it) in the pngmath documentation.

Write up a little documentation patch (probably mentioning this in a .. note:: 
directive) ;)

-- 
Freedom is always the freedom of dissenters.
                                      (Rosa Luxemburg)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to