Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia: How to deal with special unicode characters

Tags:

unicode

julia

I am working with the Distributions package which uses special unicode characters for many of the variables within types. The normal distribution, for instance, uses μ and σ. If I want to edit the standard deviation, I need to somehow type:

n.σ = 5.0

Is it possible to type these values into the repl (outside of using copy-paste)? How does one create these characters with one's keyboard?

Thank you

like image 825
Mageek Avatar asked Aug 25 '14 21:08

Mageek


1 Answers

At the REPL, use LaTeX shortcuts, e.g. type \sigma and press tab to autocomplete. Note you need to using Julia 0.3 or higher for this to work.

Many text editors have add-ins to do something similar, e.g. https://github.com/mvoidex/UnicodeMath for SublimeText.

like image 88
IainDunning Avatar answered Sep 19 '22 01:09

IainDunning