Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BayesNet does not support unicode characters #2

Closed
zouhairm opened this issue Sep 22, 2014 · 2 comments
Closed

BayesNet does not support unicode characters #2

zouhairm opened this issue Sep 22, 2014 · 2 comments

Comments

@zouhairm
Copy link

d = BayesNet([:a, :ux, :wx, :xk, :xkp])

works ok, but

d = BayesNet([:α, :ux, :wx, :xk, :xkp])

produces an error:

invalid ASCII sequence
 in setindex! at array.jl:307
 in writemime at /home/zouhair/.julia/v0.3/BayesNets/src/BayesNets.jl:102
 in sprint at iostream.jl:229
 in display_dict at /home/zouhair/.julia/v0.3/IJulia/src/execute_request.jl:31

Since Julia supports unicode, one would expect to be able to use them as graph nodes.

Seems like the issue is actually with TikzGraphs which only handles ASCIIstrings:

function plotHelper(g::GenericGraph, libraryname::String, layoutname::String, options::String, labels::AbstractArray{ASCIIString,1})

Is there a UTF8strings to "latex" symbol?

@mykelk
Copy link
Member

mykelk commented Sep 22, 2014

I updated the code (along with TikzGraphs.jl) to output unicode to the tex file. The remaining issue is to get lualatex to display the unicode correctly. I think we need to just specify a font that supports the unicode using fontspec (maybe through an update to the preamble.tex in TikzGraphs). If you try to run your example now, you won't get an error anymore, but the unicode characters will be blank.

@mykelk mykelk closed this as completed in ce612a0 Dec 31, 2015
@mykelk
Copy link
Member

mykelk commented Dec 31, 2015

You also need the latest commit to TikzGraphs.jl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants