mmatera / iwolfram

A jupyter kernel for Wolfram Mathematica

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why are there two forms of output:mathjax and plain text?

Singtren opened this issue · comments

How to display only latex output?

The idea to have both outputs is to be able to use the "standard" view as the input on the next cell. I have planned in a future version to "hide" the standard output, and make it appears in a new cell if you double click the formula, but I couldn't implement it yet.

On the other hand, I think a way to avoid printing the standard version would be by finishing each line with a
// Print[TeXForm[#1]]&

Print seems not supported.
And I have another idea.Since we can use %[[...]] or use pattern/rule to replace or exact any specific part of the result,it's not frequent when user need the standard output. I think we can put mathjax in the Out cell and no standard output unless the result is a string(or graph,sound... ). If the result is a string ,display the string as plain text in the Out cell replacing with mathjax.(This have already been implemented.)
And If the user really want to get the standard output,he can use //InputForm//ToString.

Sounds good as a temporary solution. I just implemented it. Anyway, I would like to find a mechanism to recover the input form directly as a new cell, if you double-click the output, or by some keystrokes. It would be nice if you have any idea about how to do that.

I'm not familiar with jupyter development.Maybe you should implemente it as notebook extensions?

Yes, that is more or less the idea, but I am still learning how to do it in that way...