Closed MG-dkfz closed 10 months ago
This seems to be a bug in Jupyter, because I can reproduce it in IPython as well (the Jupyter Python kernel):
from IPython.display import display, Markdown
display(Markdown('''
func(x)
Here's some inline maths: $\sqrt[n]{1 + x + x^2 + \ldots}$.
Here's an equation:
$\frac{n!}{k!(n - k)!} = \binom{n}{k}$
This is the binomial coefficient.
'''))
fails to show the equations, but succeeds if I remove the fenced func(x)
block at the beginning.
I've filed a Jupyter notebook issue (linked below).
This was reportedly fixed upstream in Jupyter notebook version 7.
Consider this example for adding equations written in LaTeX to docstrings, which was taken from Documenter.jl
In this form, calling
?func
in a Jupyter Notebook nicely renders the equations, as expected. However, including the signature of the function in the docstring, and indenting it by four spaces, as recommended in the Julia Documentation, no longer renders the equations. Consider this minimal extension of above example:Calling
?func
now, just displays plain text.I'm not sure of this is specific to IJulia or a more general issue – my apologies if this is the wrong place for this.
I'm using Julia 1.9.3 and IJulia v1.24.2.