Open CrepeGoat opened 2 years ago
One thing I'm trying to keep in mind when considering a solution: docstrings are also accessible programmatically via the help
function. So if we simply add LaTeX expressions to a docstring, the raw LaTeX code will be shown when calling help
, which is not especially legible. So ideally we find a solution to accommodate both the rendered docs and the Python console printed docstrings.
The LaTeX also will not render in IDE popup text. I think the LaTeX would be better left in Sphinx documents.
I just grabbed a random numpy function and they seem to do it in docstrings. But to @StokesMIDE 's point, they added the .. math::
thing before the equations so it only renders in the docs not in the IDE popup text. Can we do something similar? I do really like the equations in the docs.
https://numpy.org/doc/stable/reference/generated/numpy.corrcoef.html
@shanlyMIDE That popup behavior isn't standard; most environments just display it verbatim (or something close).
Currently, many of the docstrings (especially for the
shock.py
module) include mathematical equations that would be better rendered in LaTeX, but are currently written in unicode. It'd be nice to formally render these equations in LaTeX.