How to get "the tab sequence" of a unicode as we enter in the REPL in Julia code?

Thank you for pointing to the right direction. I found the exact function what I am looking for:

julia> using REPL
julia> REPL.symbol_latex("β")
"\\beta"

With this funciton, my function becomes

function unicodesymbol2string(us::Symbol)
    return REPL.symbol_latex(String(us))[2:end]
end
8 Likes