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

LaTeX string rendering in SVG? #369

Open
dietercastel opened this issue Nov 16, 2019 · 2 comments
Open

LaTeX string rendering in SVG? #369

dietercastel opened this issue Nov 16, 2019 · 2 comments

Comments

@dietercastel
Copy link

Hi,

I'm using GraphPlot.jl which uses Compose.jl for drawing SVGs. As far as I can see that library uses the text() function to draw those labels. I was now wondering whether it's possible to use LaTeX strings (e.g. some math formula surrounded by dollar signs) just like for PGFs as described here.

I can write some Julia but not familiar with the Compose.jl code-base (yet) so wondering where to start and/or whether it would be easy to implement.

kr,
Dieter

@Mattriks
Copy link
Member

Mattriks commented Nov 16, 2019

Since Gadfly uses Compose too, this has also come up there, see GiovineItalia/Gadfly.jl#1094. In Compose, supporting LaTeX strings could be done either by:

  1. Converting LaTeX strings to Julia unicode e.g. UnicodeFun.jl or LaTeX_Entities.jl (contains LaTeX→unicode maps) , or

  2. Investigating if Compose's other backends can support latex e.g. for SVG, can a latex equation be added as an SVG element? (google that). As you mentioned, the PGF backend natively supports latex.

@Mattriks
Copy link
Member

See #418 for an attempt to implement point 2. using mathjax with the SVG backend.

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