You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider this example for adding equations written in LaTeX to docstrings, which was taken from Documenter.jl
"""
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.
"""
func(x) = x
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:
"""
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.
"""
func(x) = x
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.
The text was updated successfully, but these errors were encountered:
This seems to be a bug in Jupyter, because I can reproduce it in IPython as well (the Jupyter Python kernel):
fromIPython.displayimportdisplay, Markdowndisplay(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).
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.
The text was updated successfully, but these errors were encountered: