How to represent any unicode character in Julia?

Viewed 209

I am trying to figure out if there is a list or any documentation which states all the possible unicode characters I can represent and access with \ commands. I know I can do things like \sin or the like but is there a robust list? I tried searching around but didn't find anything. I was specifically looking to see if there was a x hat character or not.

2 Answers

As it turns out, there is a robust list of all possible unicode characters near the bottom of the Julia manual. According to the docs:

You can also get information on how to type a symbol by entering it in the REPL help, i.e. by typing ? and then entering the symbol in the REPL

which is how I figured out how to represent x hat!

In addition to logankilpatrick's answer, if you need them in a program, you can access all the REPL completions directly from the REPL package:

julia> import REPL

julia> REPL.REPLCompletions.latex_symbols
Dict{String, String} with 2500 entries:
  "\\1/8"                => "⅛"
  "\\bscra"              => ""
  "\\guilsinglright"     => "›"
  "\\blacktriangleright" => "▶"
  ⋮                      => ⋮

julia> REPL.REPLCompletions.emoji_symbols
Dict{String, String} with 829 entries:
  "\\:ghost:"              => ""
  "\\:metro:"              => ""
  "\\:children_crossing:"  => ""
  "\\:suspension_railway:" => ""
  ⋮                        => ⋮
Related