Skip to content
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

Can’t get latex render via sympy to work #1119

Closed
renec112 opened this issue Nov 22, 2017 · 12 comments
Closed

Can’t get latex render via sympy to work #1119

renec112 opened this issue Nov 22, 2017 · 12 comments

Comments

@renec112
Copy link

I can’t get latex output from the sympy package. I use the command init_printing(), and i tried updating all my packages (with anaconda). I also have mathjax and matplotlib installed.

I get this unicode output:
387bdb7e-f33f-49b0-af61-0702671d0950

But i’m looking to get rid of the Unicode output and get some clean latex like so:

4f38b3a7-582a-43b7-aff2-7af7c7b481be

Anyone know what I could try? Would love your input

@lgeiger
Copy link
Member

lgeiger commented Nov 22, 2017

@renec112
Copy link
Author

Thank you very much @lgeiger ! somehow pprints messes things up.
Have experinced this error before?
image

Now the latex isn't being rendered, but python understands it's latex.. I tried updating miktex and installed mathjax.. No luck :/

@lgeiger
Copy link
Member

lgeiger commented Nov 22, 2017

You won't need miktex or separately install mathjax. This won't have any effect.

What is the output of the example run in a new file?

import sympy as sp
sp.init_printing(use_latex='mathjax')

x, y, z = sp.symbols('x y z')
f = sp.sin(x * y) + sp.cos(y * z)
sp.integrate(f, x)

@renec112
Copy link
Author

Thank you @lgeiger i really appreciate your suggestions. This is what i get, same error in a brand new file:
image

@lgeiger
Copy link
Member

lgeiger commented Nov 22, 2017

Which versions of Atom, Hydrogen and sympy are you using?

@renec112
Copy link
Author

Atom version:
1.22.1

Hydrogen version:
2.10

Sympy version:
1.1.1

@renec112
Copy link
Author

renec112 commented Nov 24, 2017

Do you have any ideas i could try @lgeiger? I would very much appreciate your tips
edit i tried uninstalling and re-installing, it made no difference

@lgeiger
Copy link
Member

lgeiger commented Nov 24, 2017

Does it work in jupyter notebook?

Could you post a screenshot of the Developer console as shown in our debugging guide

@renec112
Copy link
Author

Thank you @lgeiger.
This is the output from hydrogen:
errors

And running this in jupyter notebook is no problem:
test

strangely i tried installing everything on another computer, and it worked like a charm

@renec112
Copy link
Author

ah i found the error!
apparently my package:
Latex: preview-inline blocks between $$ and $$. I thought this package only worked on .tex files, and was disabled on .py files.

@lgeiger Thank you very much for your help. Checking error messages as you suggested, and seeing the kite package throwing many errors, made me disable all packages too see if it made a difference :) !

@lgeiger
Copy link
Member

lgeiger commented Dec 10, 2017

Glad it's working.

If we go with nteract/nteract#2115 we'll be able to support latex rendering without modifying the global HTML header.

@lgeiger lgeiger closed this as completed Dec 10, 2017
@tribbloid
Copy link

@renec112 good discovery, my tests suggest that it also affects hydrogen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants