iwolfram icon indicating copy to clipboard operation
iwolfram copied to clipboard

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

Open Singtren opened this issue 6 years ago • 5 comments

How to display only latex output?

Singtren avatar Oct 06 '18 15:10 Singtren

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]]&

mmatera avatar Oct 09 '18 11:10 mmatera

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.

Singtren avatar Oct 11 '18 05:10 Singtren

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.

mmatera avatar Oct 11 '18 10:10 mmatera

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

Singtren avatar Oct 12 '18 03:10 Singtren

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

mmatera avatar Oct 12 '18 19:10 mmatera