I probably misused it but that what I get (before I add it and checkout)

Sorry

Henri


julia> to_fraction("α² ⋅ α²⁺³ ≡ α⁷", " ℝ: 𝐴𝐯 = λᵢ𝐯")
ERROR: Char ² doesn't have a unicode superscript
in to_superscript(::Char) at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:156 in to_superscript(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::String) at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:13 in to_fraction at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:178 [inlined] in (::UnicodeFun.##5#6{String,String})(::Base.AbstractIOBuffer{Array{UInt8,1}}) at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:173 in #sprint#304(::Void, ::Function, ::Int64, ::Function) at ./strings/io.jl:37 in to_fraction(::String, ::String) at /home/pi/.julia/v0.5/UnicodeFun/src/sub_super_scripts.jl:172

julia>


Le 28/09/2016 à 13:40, Simon Danisch a écrit :
I added the to_fraction function:

to_fraction("α² ⋅ α²⁺³ ≡ α⁷", " ℝ: 𝐴𝐯 = λᵢ𝐯") -->

α̲²̲ ̲⋅̲ ̲α̲²̲⁺̲³̲ ̲≡̲ ̲α̲⁷̲
 ℝ: 𝐴𝐯 = λᵢ𝐯

https://github.com/SimonDanisch/UnicodeFun.jl/pull/3

But I won't have time to add this to the *to*_*latex* function, since it's a bit more involved with the line break.

Am Mittwoch, 28. September 2016 12:05:36 UTC+2 schrieb Simon Danisch:

    Good news everyone!
    I've written a small library that offers various transformations
    of text to special Unicode characters.
    The most prominent one is the latex-string to latex-unicode:

    "\\itA \\in \\bbR^{nxn}, \\bfv \\in \\bbR^n, \\lambda_i \\in
    \\bbR: \\itA\\bfv = \\lambda_i\\bfv"
    ==>  "𝐴 ∈ ℝⁿˣⁿ, 𝐯 ∈ ℝⁿ, λᵢ ∈ ℝ: 𝐴𝐯 = λᵢ𝐯"


    It doesn't support the whole range of latex, but I hope it will be
    enough for simple formulas.
    I will obviously use this library for latex label support in
    GLVisualize <https://github.com/JuliaGL/GLVisualize.jl>, but I
    hope that this library can also be usable in other contexts! (REPL
    latex renderer?)
    Enjoy with a simple *Pkg.add("UnicodeFun") *(since its freshly
    registered, a Pkg.update() might be needed)

    Please feel free to report latex strings that are not working, or
    help adding new transformations! :)

    Best,
    Simon


Reply via email to