Compose.jl icon indicating copy to clipboard operation
Compose.jl copied to clipboard

Latex in the text form is not rendered in IJulia notebook

Open jpfairbanks opened this issue 8 years ago • 1 comments

I see that if I draw on a PGF object, then I get a latex document that can be compiled into a PDF with latex text.

For example:

s = compose(context(),
(context(), text(1/2,1/2,"\$\\alpha=0.5\$")),
(context(), rectangle(), fill("bisque"))
)
draw(PGF("plot.tex", 6inch, 4inch), s)

image Although I have to delete the \usepackage{fontspec} line because I use pdflatex and not xelatex.

However in the IJulia notebook the latex expressions do not appear: image Plain text works fine in the IJulia notebook.

Is there a way to get the latex expressions rendered properly in the IJulia notebook?

jpfairbanks avatar Dec 11 '15 00:12 jpfairbanks

Not at the moment, unfortunately. The output to the notebooks are in SVG format by default, and we do have have a Julia implementation of LaTeX's math layout engine yet.

As for disabling the fontspec option, you should be able to use the texfonts=true option in the PGF call (e.g. PGF("plot.tex", 6inch, 4inch, texfonts=true).

darwindarak avatar Dec 11 '15 03:12 darwindarak