0

I am writing Julia code in Emacs, which allows the use of unicode characters in the source code. However, some symbols come out looking weird. For example the Greek letter nu:

enter image description here

becomes:

enter image description here

Does anyone know how to fix this to be the correct lowercase nu letter?

  • 1
    What does Emacs say the character information is if you run C-u C-x = (which is the what-cursor-position command) with the point on that character? – D. Gillis Jul 11 at 4:07
  • Char: C-j (10, #o12, #xa) point=4118 of 4204 (98%) column=7 – space_voyager Jul 11 at 4:48
  • 2
    C-j (10) is a newline. You surely want the previous character. – phils Jul 11 at 7:18
  • 1
    ... and add the information to the question: comments can disappear. – NickD Jul 11 at 14:46
  • 1
    @Drew I believe that Julia Mode looks for the escaped name of certain common symbols and then replaces them with their proper unicode character (e.g. \nu gets replaced with ν). There's a file (julia-mode-latexsubs.el) in the Julia Mode source that makes a hashtable of these mappings; the most recent version seems to have the correct mapping for \nu. I wanted to see what the character was that got inserted (in the second screenshot) to see if the correct character is being substituted or if it is just a font issue (or something of a similar nature). – D. Gillis Jul 11 at 21:07
0

C-x 8 RET GREEK SMALL LETTER NU RET

C-x 8 RET lets you enter any Unicode char by name.

The char name you're looking for is GREEK SMALL LETTER NU.


If you use Icicles then you can find this character easily without knowing the exact name, e.g. the order of the components:

  1. Type greek, then S-SPC to add another pattern.

  2. Type nu, to see all matches for both greek and nu, in either order.

  3. Pick the completion GREEK SMALL LETTER NU.

| improve this answer | |
  • 2
    I don't believe this answer addresses the asker's question. On pressing TAB, Julia mode attempts to replace an escaped LaTeX-like name with the unicode symbol that name represents. The asker appears to be getting the wrong symbol inserted when using this process. Or rather the symbol that is inserted does not appear as the asker expected (I think it's possible that the font used here may show its nu character as a small caps N). – D. Gillis Jul 11 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.