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

LaTeX render wrong #2686

Closed
asukaminato0721 opened this issue Nov 22, 2019 · 8 comments
Closed

LaTeX render wrong #2686

asukaminato0721 opened this issue Nov 22, 2019 · 8 comments
Assignees

Comments

@asukaminato0721
Copy link

Environment data

  • VS Code version: 1.40
  • Extension version (available under the Extensions sidebar): 2019.11.50794
  • OS and version: win10 1803
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0 32-bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: jupyter 1.0.0
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): XXX

Expected behaviour

img

this is from chrome

Imgur

Actual behaviour

img

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. open a new ipynb file

run

from sympy import init_printing
init_printing()
import sympy
x=sympy.symbols('x')
sympy.integrate(sympy.Si(x)/x,x)

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXX

Besides , someone told me that python 3.6.7 can solve this problem(that ideal photo is from him). Which maybe helpful.

@jmew
Copy link
Contributor

jmew commented Nov 22, 2019

Thanks for the bug. I believe this is a known issue right now that we are currently fixing.

CC @rchiodo

@rchiodo
Copy link
Contributor

rchiodo commented Nov 22, 2019

@jmew this is actually separate issue. The other fix was for markdown. This is in a code cell. This has never worked actually.

@onyukim
Copy link

onyukim commented Dec 29, 2019

I have been troubled by the same issue. As @wuyudi said, Python 3.6.7 can solve this problem.
Workaround for the problem is passing the option latex_mode='equation' to init_printing:

init_printing(latex_mode='equation')

@rchiodo rchiodo self-assigned this Feb 11, 2020
@ruilvo
Copy link

ruilvo commented Feb 12, 2020

I've had this problem with Python 3.8.1. With the fix by @onyukim I've had the LaTeX render on a light grey raster. Using mathjax I got it to work:

sy.init_printing(use_latex="mathjax", latex_mode="equation")

@asukaminato0721
Copy link
Author

from sympy import *
init_printing(latex_mode='equation')
x=symbols('x')
integrate(Ci(x)/x,x)

I get this.

image

to fix this, I use @ruilvo 's way, init_printing(use_latex="mathjax", latex_mode="equation")

which gives a better effect.

image

@IanMatthewHuff IanMatthewHuff self-assigned this Feb 14, 2020
@IanMatthewHuff
Copy link
Member

Validated the original example with master bits.

@nielsgl
Copy link

nielsgl commented Feb 19, 2020

@wuyudi what color scheme are you using? For me the fonts are all simply white, it doesn't show any syntax highlighting for variables, arguments, functions. etc.

@asukaminato0721
Copy link
Author

@nielsgl Maybe One Dark Pro ?

I turn it off , and it looks like this:

image

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants