latex - Mathjax expression in sphinx python not rendering correclty -


i've been trying figure out what's wrong expression in docstring. i'm using sphinx.ext.mathjax extension in python sphinx v1.2b. docstring:

.. math::      w_k^* = \min_{w_k} \ell_k(w_k) + \lambda\left(\alpha||w_k||_1      + \frac{1}{2}(1-\alpha) ||w_k||^2\right) 

this appears: enter image description here

but continues generate strange warning , not render expression @ all:

warning: block quote ends without blank line; unexpected unindent. 

strangely enough, if remove \alpha, \left, \right, \frac symbols, expression renders fine without warnings. not sure why \lambda supported , not \alpha.

from sphinx documentation:

keep in mind when put math markup in python docstrings read autodoc, either have double backslashes, or use python raw strings (r"raw").

this needed latex commands, such \alpha, interpreted correctly (\a , few other sequences have special meaning in string literal).


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -