There is the following piece of code on the official Sphinx documentation:
.. math::
:nowrap:
\begin{eqnarray}
y & = & ax^2 + bx + c \\
f(x) & = & x^2 + 2xy + y^2
\end{eqnarray}
I tried for a long time to get it to work, until I changed it to:
.. math::
:nowrap:
$$
\\begin{eqnarray}
y & = & ax^2 + bx + c \\\\
f(x) & = & x^2 + 2xy + y^2
\\end{eqnarray}
$$
How could it be that the official Sphinx documentation is wrong?
Or is something obscure happening here? Even Sagemath documentation seems to suggest that $$
need to be used (see "If you wish to explicitly not wrap the MATH block [...]")
Or is this a bug?
(I use Sphinx 2.2.0 and in my index.rst
file I use autofunction
for the function whose docstring contains the equation above.)