MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

ENH: Display source & render simultaneously

Open westurner opened this issue 3 years ago • 6 comments

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?

  • Menu
    • Show Math As
      • [x] MathML (in a new tab)
      • [x] TeX Commands
    • Math settings
      • Math renderer
        • [x] HTML-CSS
        • [x] Plain Source
        • [ ] Plain Source && {HTML-CSS,}
          • [ ] MathML
          • [ ] TeX

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

Describe alternatives you've considered

  • toggle back and forth between Plain Source and e.g. HTML-CSS
  • click/tap and open each rendered ah expression in a new tab each with "Show Math As"

Additional context

  • Jupyter notebooks; which have markdown inputs and variously-mimetype'd obj._repr_mimebundle_() outputs like text/plain and text/html but not yet text/html+rdfa or application/ld+json (which is - as a sidenote - tragic, in terms of symbolic expressions, because these could all be Linked Data expressions that we then also want to review: (source, tex, RDF_with_URIs))

westurner avatar Apr 24 '22 02:04 westurner

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.

dpvc avatar May 01 '22 19:05 dpvc

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

westurner avatar May 02 '22 01:05 westurner

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.

dpvc avatar May 04 '22 12:05 dpvc

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

westurner avatar May 04 '22 13:05 westurner

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

dpvc avatar May 04 '22 13:05 dpvc

  • Use Case: Learning and teaching mathematical notation

westurner avatar May 04 '22 18:05 westurner