On Sat, Jan 3, 2009 at 2:08 PM, Shing Hing Man <mat...@yahoo.com> wrote:
>
> Is there a command in SAGE that converts a latex expression to png (or
> gif) directly.
>
> The following post in the archive has a workaround.
>
> ttp://groups.google.com/group/sage-support/browse_thread/thread/570022e72a22d3bd/517d51a58abc67f8?lnk=gst&q=Latex+to+png#517d51a58abc67f8
>
>
> I wonder if there is a quicker way of doing it.
>
> Thanks in advance for any assistance!
>

Do

sage: L = sage.misc.latex.Latex()
sage: L.eval('$x^2$',filename='a.png')

NOTE: There was a bug Sage-3.2.2, I think, which I fixed in the
soon-to-be released sage-3.2.3, where the above wouldn't work if you
give a more complicated path to the file, e.g., :

sage: L.eval('$x^2$', filename='/tmp/a.png')

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---


Reply via email to