How to see variables denoted by Greek letters in viscode's interactive window?

Question:

I’m currently using Python3.73 on VSCode. I execute the code on interactive window with Jupiter notebook. The problems are:

  1. I can’t type Greek letters in notebook cells while I can type them in editor using LaTeX syntax;
  2. Even if I copy a Greek letter from somewhere else and paste it in a cell in interactive window and denote it as the name of a variable, I can’t find this variable in the interactive data viewer. But I’m sure it’s stored somewhere because I can still call it again.

e.g.
example code
, but the eigenvalues can’t be seen after clicking the
"Show variable in data viewer button"

So how can I type Greek letters in interactive cells directly? and how can I see variables denoted by Greek letters?

Asked By: Steve

||

Answers:

how can I type Greek letters in interactive cells directly?

Jupyter Notebook can recognize Greek letters, after typing alpha, pressing Tab, you’ll get α, which you can try in JupyterLab. But it’s not achievable in VS Code.

Although Greek letters’ English name are stored in Jupyter in VS Code, but it couldn’t be turned into α automatically in VS Code. Furthermore, to Tab Complete Greek Letters, the production group vscode-jupyter does’t have plans on adding this functionality at this time.

how can I see variables denoted by Greek letters?

The default encoding format is UTF-8. Not only Greek, but also Cyllic and other non-english language can’t be shown in Variables Viewer. So there’s no way to do that.

Answered By: Molly Wang-MSFT

I was also missing this feature from vscode. Luckily, there is now the tablatex extension, that does exactly what you want:

https://marketplace.visualstudio.com/items?itemName=andyljones.tablatex

enter image description here

Answered By: billjoie
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.