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.
> 3. The formulas should be rendered with a larger/thicker font. The
> default output from dvipng is hard to read, especially on some
> monitors (such as my laptop); in fact subscripts and superscripts can
> get impossible to read. There is no particular stylistic reason to
> have equations so small since Sphinx by default uses a rather large
> font for the surrounding text anyway.
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.
> 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:
some text with some `5 + 5` inline formula
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
signature.asc
Description: This is a digitally signed message part.
