On Sun, Sep 26, 2010 at 10:26 PM, Dan Drake <dr...@kaist.edu> wrote:
> On Sun, 26 Sep 2010 at 09:31PM -0700, Ondrej Certik wrote:
>> Are there any plans to integrate this with sphinx? Here is an example
>> (go to the very end of the page):
>>
>> http://theoretical-physics.net/dev/src/math/feynman-parameters.html#example-2
>>
>> currently I need to copy & paste the (latexed) output from sympy by
>> hand into the sphinx document. So I was thinking to create something
>> like sagetex, but for sphinx.
>
> I've never thought of anything "SageTeX-like" for Sphinx, since I've
> never written anything other than Sage docstrings using it.
>
> To get something analogous working for Sphinx, you'd need something in
> the Sphinx build process that would call Sage, or write something to a
> file that could be processed with Sage. One of the key ideas in SageTeX
> is that you can use the usual TeX \newlabel{} and \ref{} to pull in
> stuff from an external file. Is there a corresponding mechanism in
> Sphinx?

Yes, it is. You write a simple plugin (in Python) that gets called by
sphinx when you write something like:

Some paragraph, bla bla, and some equation:

.. sage:

    sin(x).diff(x)


and you do whatever you want.

>
>> What are your usage scenarios with sagetex? Do you use it to write
>> articles and keep the formulas in some form, that can be manipulated?
>
> A bit. Actually, what I use it most for is doing tables and TikZ plots
> for me -- see sections 4 and 6 in the example file [1].

I see. My goal is to go one step further and have something, so that I
can enter formulas (at least some simpler ones at the beginning) using
sympy (or Sage in your case, that doesn't really matter), and just
keep it in that form, and it would somehow automatically be converted
to latex. And in the html output, I can imagine a link, that would
allow me to modify such formula (using some web interface to sympy /
Sage). Also so that I can only create some calculation and simply tell
it (somehow) that these and those results should endup in the
document, without having to copy & paste or worry about anything.

And of course to autogenerate some tables, as you do too.

Ondrej

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

Reply via email to