William Stein wrote:
> On Dec 13, 2007 1:58 PM, carlosap <[EMAIL PROTECTED]> wrote:
>> If I have the result from something like
>>
>> show( ... )
>>
>> how do I copy, paste to word ? So I dont have to rewrite the function
>> in that crappy ms ecuation editor?
>>
>
> You might be able to use
>
> latex(...)
>
> to get the latex form of the equation, then use a program such as
> this http://www.chikrii.com/products/tex2word/ to convert that
> latex expression to word. I have never used the above program - I just
> found it by googling for latex2word.
>
> E.g.,
>
> sage: show(taylor(cos(x)/sin(x), x, 1, 2))
> <nice equation>
> sage: latex(taylor(cos(x)/sin(x), x, 1, 2))
> \frac{\cos \left( 1 \right)}{\sin \left( 1 \right)} - \frac{{\left(
> {\sin \left( 1 \right)}^{2} + {\cos \left( 1 \right)}^{2} \right)
> \cdot \left( x - 1 \right)}}{{\sin \left( 1 \right)}^{2} } +
> \frac{{\left( {\cos \left( 1 \right) \cdot {\sin \left( 1 \right)}^{2}
> } + {\cos \left( 1 \right)}^{3} \right) \cdot \left( {\left( x - 1
> \right)}^{2} \right)}}{{\sin \left( 1 \right)}^{3} }
>
> The big mess above should be auto-convertible to a word equation, in theory.
>
> Does anybody have any better ideas? Another idea would be to try to use
> something involving OpenOffice and Latex like this:
>
> http://www.cs.utk.edu/~spires/html/content/code/OO_Latex/index.html
>
> then export from OpenOffice to word.
>
> If you figure anything out that works for you please report back!
What about writing an openoffice function that converts an expression to
openoffice equation format? For example, the above output is:
{cos(1)} over {sin(1)} - {(sin(1)^2 + cos(1)^2) cdot (x-1)} over
{sin(1)^2} + {(cos(1) cdot sin(1)^2 + cos(1)^3) cdot ((x-1)^2)} over
{sin(1)^3}
(just paste that into the equation editor of openoffice and the equation
pops up in your document).
The syntax is looser than latex, but I think it's probably doable and
probably just a modification of the latex function. While it might be
nice to insist on everyone downloading a latex macro and learning a bit
of latex, having an openoffice export function makes Sage that much more
accessible.
I have no idea if the equations can then be converted to Word. I'd be
interested in knowing, though.
-Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---