Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathJax does not render after HTMLMath widget is created #568

Closed
parkey opened this issue Apr 3, 2020 · 0 comments · Fixed by #1496
Closed

MathJax does not render after HTMLMath widget is created #568

parkey opened this issue Apr 3, 2020 · 0 comments · Fixed by #1496

Comments

@parkey
Copy link

parkey commented Apr 3, 2020

HTMLMath: MathJax is not rendered in voila preview or standalone.

This happens if the markdown is loaded after the widget is rendered.
Please see example below.

from ipywidgets import *

b = Button(description='press')
t = HTMLMath()

def click(obj):
    t.value = '$$\int x \, dx$$'
    
b.on_click(click)

VBox((t,b))

When the button is pressed, the latex string shows up in raw format in edit field instead of being rendered as maths.
It works fine, though, in JLab and notebook.

@parkey parkey changed the title MathJax does not render after HTMLMath widgets is created. MathJax does not render after HTMLMath widget is created Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant