Embedded SVG editor in the notebook?

20 views
Skip to first unread message

Pat LeSmithe

unread,
Sep 4, 2009, 1:17:26 AM9/4/09
to sage-...@googlegroups.com
I noticed SVG-edit, a Scalable Vector Graphics (SVG) editor that works
entirely in capable browsers [1]:

http://code.google.com/p/svg-edit/

Stable and beta demos:

http://svg-edit.googlecode.com/svn/tags/stable/editor/svg-editor.html
http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html

Compared to Inkscape, it's quite light, but this may be an advantage.
It does appear to be actively developed. Are there other or better
examples?

Not impossible uses in Sage:

* Draw diagrams.
* Annotate images.
* Manipulate graphs.
* Put cells anywhere.
* Add audio and video.

Can jsMath render expressions as SVG groups? I think this depends
partly on font support.

By the way, how about syntax highlighting for equations? jsMath can
easily do color:

http://www.math.union.edu/~dpvc/jsMath/examples/extensions.html

Would this be useful for teaching? I'm not sure about how to add color
attributes to symbolic variables.


[1] IE supports Vector Markup Language (VML) instead of SVG. The svgweb
project aims to set up Flash as a non-native SVG renderer:

http://code.google.com/p/svgweb/

William A. Stein

unread,
Sep 4, 2009, 1:26:51 AM9/4/09
to sage-...@googlegroups.com

On Sep 3, 2009, at 10:17 PM, Pat LeSmithe wrote:

>
> I noticed SVG-edit, a Scalable Vector Graphics (SVG) editor that works
> entirely in capable browsers [1]:
>
> http://code.google.com/p/svg-edit/
>
> Stable and beta demos:
>
> http://svg-edit.googlecode.com/svn/tags/stable/editor/svg-editor.html
> http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html
>
> Compared to Inkscape, it's quite light, but this may be an advantage.
> It does appear to be actively developed. Are there other or better
> examples?

That is absolutely amazing!! Wow.

>
> Not impossible uses in Sage:
>
> * Draw diagrams.
> * Annotate images.
> * Manipulate graphs.
> * Put cells anywhere.
> * Add audio and video.

Yes indeed. This would be very nice, since one could say draw a plot,
then edit it to fine tune things and add extra annotation.

Also, it would just be very nice having an easy scratchpad anywhere in
an worksheet.

Very cool.

William

Golam Mortuza Hossain

unread,
Sep 4, 2009, 6:46:28 AM9/4/09
to sage-...@googlegroups.com
Hi,


On Fri, Sep 4, 2009 at 2:17 AM, Pat LeSmithe<qed...@gmail.com> wrote:
> By the way, how about syntax highlighting for equations?

That would be really good. If not equation then at least the inline
comments should be in different color to improve readability.


> jsMath can
> easily do color:
>
> http://www.math.union.edu/~dpvc/jsMath/examples/extensions.html
>
> Would this be useful for teaching?  I'm not sure about how to add color
> attributes to symbolic variables.

I am finishing up some enhancement for symbolic variables. Surprisingly,
following works nicely in notebook even now
-------
sage: var('theta', latex_name="\\color{red}{\\theta}")
-------

Cheers,
Golam

Jason Grout

unread,
Sep 4, 2009, 8:14:43 AM9/4/09
to sage-...@googlegroups.com
Pat LeSmithe wrote:
> I noticed SVG-edit, a Scalable Vector Graphics (SVG) editor that works
> entirely in capable browsers [1]:
>
> http://code.google.com/p/svg-edit/
>
> Stable and beta demos:
>
> http://svg-edit.googlecode.com/svn/tags/stable/editor/svg-editor.html
> http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html


This is really amazing.

Matplotlib has an SVG backend, which means that presumably it can
generate SVG plots. Mike Hansen did a small demo one time of an SVG
graph drawing routine that allowed the vertices to be moved. See
http://sage.math.washington.edu/home/mhansen/petersen.svg

Thanks,

Jason


--
Jason Grout

Nathan Dunfield

unread,
Sep 4, 2009, 3:06:26 PM9/4/09
to sage-devel
On Sep 4, 12:26 am, "William A. Stein" <wst...@gmail.com> wrote:
> Also, it would just be very nice having an easy scratchpad anywhere in  
> an worksheet.

As a topologist, I couldn't agree more. ;-)

Nathan
Reply all
Reply to author
Forward
0 new messages