mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.08k stars 1.16k forks source link

ENH: Display source & render simultaneously #2865

Open westurner opened 2 years ago

westurner commented 2 years ago

Is your feature request related to a problem? Please describe.

Users can read the source and the render simultaneously; at the same time, in order to learn the symbols.

Describe the solution you'd like

New menu options?

It could say: "show source and render" or something more usable

Describe alternatives you've considered

Additional context

dpvc commented 2 years ago

While we will continue to make updates to version 2 for another year at least, no feature development for v2 is planned. There is currently no "Plain Source" output format in MathJax v3, so there would be more work involved in adding the feature to v3. Still, I have added this as a feature request, though there are still a number of critical features to be added to v3, so I would not expect to see it in the near future.

westurner commented 2 years ago

Is the Plain Source input stored as e.g. obj._inputstr? Sorry I'd need to read the tests

dpvc commented 2 years ago

I don't know anything about Jupyter's object structures, or what obj is in your example. But you can obtain the original input form from any DOM element el in the MathJax output for a typeset expression using

MathJax.Hub.getJaxFor(el).originalText

if that helps.

westurner commented 2 years ago

But there's no widget that'll show that next to the rendered expression?

dpvc commented 2 years ago

No, that is not a common use case, and there is nothing built into MathJax to provide that.

westurner commented 2 years ago