-
Notifications
You must be signed in to change notification settings - Fork 0
latex output would be nice #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I agree that this is desirable. It would also to be useful to be able to catch the string as somethings like W2Tex(x::MathLink.WExpr) = weval(W`ToString@TeXForm[#]&`(x))
import Base.show
Base.show(io,::MIME"text/latex",x::MathLink.WExpr) = print(io,W2Tex(x)) @hammerfunctor: Could you provide med with some documentation about how jupyter communicates the request for latex output? |
You can find some docs here and here. for m in mimearray
if showable(m,x)
print(io, m, format_m(x))
break
end
end So once you add a MIME output for some julia type, it can automatically be utilized without extra work. Try out these codes in a jupyter notebook struct Pow
base::Number
exp::Number
end
import Base: show
Base.show(io,::MIME"text/latex",p::Pow) = print(io,"\$$(p.base) ^ {$(p.exp)}\$")
Pow(2,3) |
Implemented and will come in the next release ;) |
I found that our directly
Maybe we should merge them and add some fine-grained control against symbol head? |
Merging MathLinkExtras into MathLink has been on my wish-list for a while, but MathLink is not very actively maintained at the moment. Do you have a suggestion for workaround one could put in MathLinkExtras for the time being? |
Basically, we can add some heads to a whitelist, say, It's also possible to make another repository utilizing Clang.jl, which helps to build a robuster wrapper. I've made a minimal running example but I have not much time. If you are willing to try something, it's my pleasure to send them to you. |
If you send me the minimal examples I will see what I can do. ;) |
You can download a text file containing all the information here, which is a armor-encrypted file of the tar ball of the directory. On Linux, just
On other platform the process is similar. Note that the passphrase is Install |
@hammerfunctor Sorry for not getting back to this earlier. I'm trying to understand what the conflict is. I noticed that if i try W |
@fremling Exactly, |
@hammerfunctor There are still some things to be fixed for the future. For instance is there graphics elements are in a list (or not called with |
Merged into the Julia repository as of 26d7813. |
Sometimes people use julia behind a jupyter server and it would be nice to add latex output for Mathematica outout.
The text was updated successfully, but these errors were encountered: