At one point, we were talking about then allowing such a pdf file being
uploaded to an online notebook and the online notebook automatically
extracting the .sws file. This would allow a person to, for example,
include an sws file with an arxiv pdf preprint. A reader could just
download the pdf from arxiv, then upload the pdf to sagenb.org, and
automatically have the associated .sws file. There's a trac ticket
listing some code to do this sort of thing. It would be an interesting
project for someone who had the time to work on this to integrate this
into the sage notebook.
See http://trac.sagemath.org/sage_trac/ticket/4825
Thanks,
Jason
--
Jason Grout
Sure, I suppose, if you want to do it by hand. We were trying to make
it so that you just uploaded the pdf to the sage notebook.
Jason
--
Jason Grout
I think our plan (if you can call it that) was to use something like
pdftk to unpack the worksheet. So pdftk should definitely work, although
as Jason said, the idea was that the notebook server would say, "hrm,
this user gave me a PDF...so, let me see if I can extract a worksheet"
and then use some Python PDF library.
There's a sample of this idea here:
http://sage.math.washington.edu/home/drake/
Look for "embedded_worksheet" files.
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
You can easily extract the relevant numerical values for all elements
of plots. E.g.,
sage: L = list(plot(sin)[0])
Another example:
sage: a = plot(sin) + plot(cos)
sage: a[0]
Line defined by 200 points
sage: a[1]
Line defined by 200 points
sage: list(a[1])[:10]
[(-1.0, 0.54030230586813977),
(-0.98921646193235457, 0.54934475026523821),
(-0.97881737105892419, 0.55800432723415849),
(-0.96672470607055161, 0.567998237362355),
(-0.95509177118254784, 0.57753384135311991),
(-0.94833678316216885, 0.58303517065191224),
(-0.94399062303568926, 0.58656067742426055),
(-0.93148561011253583, 0.59664242831390957),
(-0.92443618000428662, 0.60228477505404343),
(-0.90878687891761545, 0.61470306127180685)]
In addition to what William said, I think we ought to eventually support
pgf (either through matplotlib or on our own). This would be very handy
in sagetex, for example.
Note that we already use pgf to draw graphs (vertex/line things) in latex.
There has been interest in a pgf backend to matplotlib (what we use to
actually draw 2d graphics most of the time):
http://www.mailinglistarchive.com/html/matplotl...@lists.sourceforge.net/2009-08/msg00358.html
I played with making a pgf backend to matplotlib once, but ran out of
time to experiment with it.
Jason
--
Jason Grout