Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to type x̂ or ŷ in Julia?

Tags:

julia

I was reading through a tutorial and it makes use of x hat and y hat. I am unable to create those characters locally and they do not appear in the unicode character list I saw. Usually I would do \xhat to create the unicode character but that again does not seem to exist in this case.

like image 368
logankilpatrick Avatar asked Mar 01 '23 10:03

logankilpatrick


1 Answers

Type x\hat and press tab to get what you want. You can also search the character in the Julia REPL:

help?> x̂
"x̂" can be typed by x\hat<tab>

Note that in this case this sequence consists of two characters:

julia> collect("x̂")
2-element Vector{Char}:
 'x': ASCII/Unicode U+0078 (category Ll: Letter, lowercase)
 '̂': Unicode U+0302 (category Mn: Mark, nonspacing)

Of which the second is a combining diacritical mark.

like image 106
Bogumił Kamiński Avatar answered May 12 '23 16:05

Bogumił Kamiński