different LaTeX in interact labels behaves differently

53 views
Skip to first unread message

kcrisman

unread,
Jan 23, 2017, 10:53:41 PM1/23/17
to sage-cell
I can't explain this:

@interact
def _(a_1=('\(a_1\)',3),a_2=('$a_2$',2)):
    print a_1^2,a_2^2


The \(\) style LaTeX looks fine, but the $$ version keeps them.  I don't typically label these, but it happens here.  I don't *think* this occurs in the various notebooks, though I haven't tried lately... anyway, curious if anyone has ideas on this behavior.  I could work around it for my use case because I don't usually need it, but it does look much nicer if one were to have a fairly complicated interact with layout etc.

Andrey Novoseltsev

unread,
Jan 23, 2017, 11:05:43 PM1/23/17
to sage-cell

I don't quite understand the problem you are describing. What I do see, however, that occasionally LaTeX is not processed correctly. The first time I opened you link I saw something rendered and then some "span..." in both labels. Re-evaluating fixed it. Refreshing the page completely sometimes works and sometimes shows spans again. So it looks like some race condition with doing MathJax processing...

kcrisman

unread,
Jan 24, 2017, 8:12:47 PM1/24/17
to sage-cell

I don't quite understand the problem you are describing. What I do see, however, that occasionally LaTeX is not processed correctly. The first time I opened you link I saw something rendered and then some "span..." in both labels. Re-evaluating fixed it. Refreshing the page completely sometimes works and sometimes shows spans again. So it looks like some race condition with doing MathJax processing...

And yes, I see it processed right this time too.  I wonder if it's only with certain groups of pages ... anyway, for some reason it was very consistently doing this for me only on input boxes yesterday.  This one seems to be working ok today. Huh; I'll let you know if I can find something more reliable - I haven't been watching the loading of resources in the developer tools.
Reply all
Reply to author
Forward
0 new messages