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

Insertion of greek letters #202

Closed
dhoegh opened this issue Jun 24, 2014 · 12 comments
Closed

Insertion of greek letters #202

dhoegh opened this issue Jun 24, 2014 · 12 comments

Comments

@dhoegh
Copy link
Contributor

dhoegh commented Jun 24, 2014

Hi, since Julia is fully capable of assigning values to unicode letters and no one has greek letters on their keyboard, it could be a great feature if the insertion of greek letters could be made as autocompletion just like code completion. I’m visualizing something like:
\theta press ctrl+space to get: θ.
So when you want to insert a greek letter you write \ in front just like latex, you could maybe also just skip the backslash. I tried to take a look in custom.js where it probably should be implemented, but my javascript skills is not sufficient:(

@timholy
Copy link
Member

timholy commented Jun 24, 2014

Just hit the tab key after typing \alpha

@timholy timholy closed this as completed Jun 24, 2014
@dhoegh
Copy link
Contributor Author

dhoegh commented Jun 24, 2014

Thanks:)

@stevengj
Copy link
Member

Yes, this was implemented in JuliaLang/julia#6911. It is available in both the REPL and IJulia interfaces, and also works in the Julia mode of the Emacs and vim editors.

@luminnate
Copy link

well, it don't work for me in the repl windows french canadian default . it turns it into ''a'' then gives me an error. a not defined.

@stevengj
Copy link
Member

@luminnate, there are two things here:

  • First, if α displays as a in the REPL, that is likely just a font issue (the Windows console sucks)—that is, your font doesn't have an alpha glyph in it. Have you tried it in the IJulia (web browser) interface? (Web browsers usually have a default font that at least supports Greek letters.)
  • Second, if you type α (via \alpha<tab>) and then hit return, of course it will give an α not defined error, because you haven't defined a value for α. Try typing α = 5, for example, to use α as an identifier.

@luminnate
Copy link

changed windows console properties font from raster fonts to lucida and it now turns \alpha to Greek
ijulia turns Greek as well
thank you

as a sidenote when installing ijulia i went by this: https://github.com/stevengj/julia-mit/blob/master/README.md which reccommends anaconda, but it makes no mention of how many manual installs would be needed for ipython, so by the second one I was wondering how many more there would be.

this doc has good info on the manual installs:
https://github.com/JuliaLang/IJulia.jl

@stevengj
Copy link
Member

@luminnate, if you install IPython using Anaconda, no manual installations should be required: Anaconda includes all of the necessary IPython components.

If you found yourself doing manual installs of jinja etcetera, then probably you weren't using the Anaconda Python.

@Suckhwan
Copy link

thanks a lot!

@albz
Copy link

albz commented Nov 28, 2018

Can anyone explain me the following: on a mac you can write the most common Greek letter, eg pi, by pressing alt+p. I am wondering whether this sort of shortcuts cannot be used on a Windows console. What's the issue?

@stevengj
Copy link
Member

@albz, that's a feature of the Mac keyboard (true across all programs, not just Jupyter): there are special key combinations for typing accented Latin characters and a few other symbols like π. Windows doesn't have this.

@dnabanita7
Copy link

It is not working on colab.

@sx-meng
Copy link

sx-meng commented Aug 1, 2022

Just hit the tab key after typing \alpha

It does not seem to work in nterat with Julia kernel. How to type a Greek letter in nterat with IJulia? Thanks.

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

8 participants