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 :-)

> 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? If not, I strongly suggest
mentioning the font readability problem (and the above command that
solves it) in the pngmath documentation.

>> By the way, would it be possible to optionally support the less
>> intrusive $...$ markup for inline formulas? I've never used a $ sign
>> in a Python docstring, so it shouldn't cause any problems.
>
> It's most likely impossible to easily add a new syntax feature, because the
> actual ReST parsing is done by docutils and not by Sphinx.  But you may find
> the "default_role" config option helpful.  You can set the math role as 
> default
> role.  This way inline math can be included by using two single accents:

Good idea, thanks.

Oh, and another point:

4. pngmath should set the source for each image as alt text.

Fredrik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to