# Re: Examples of integration between Lyx, Sage computations, and PDFLateX

Just another mail to correct a problem with the preceding Lyx file (see the
new file attached, and the \$ signs in ERT boxes, this is connected with the
problem I describe below) and ask a question about insets again:

What kind of Flex insets can be included in a math mode text? Is this
possible at all? Especially in displayed equation where one would like to
include results from SAge computations?
I cannot write the following in math mode in Lyx, putting the left member
in a displayed equation and the right member in a sagecode inset that would
be converted to the expression I give  (\sage{integral(x/(x^2+1),x,0,1))
\dfrac{\partial^{4}y}{\partial
x^{4}}=\sage{integral(x/(x^2+1),x,0,1)}

I meet two problems:
1/ I cannot insert a Flex:sagecommand inset in a displayed equation, Lyx
just goes to the next line before inserting it...
2/ I cannot type the sagetex instruction (*sage{}  ) by hand, because
"x^2" in the right member must not be interpreted by LyX, since Sage will
need it for its computation.

I can of course type everything in an ERT, but this cannot be called
"integration" can it? ;-)

I have reread again the help document on layouts and insets, and I have
checked the files that come in the layout folder of LyX, but cannot find

Sorry for bothering you again with my problems... I hope that Sage
integration will interest other people...

Murat

I definitely need the help of a Lyx wizard who understands well the insets
and their integration in Lyx/Latex...

2011/10/31 Murat Yildizoglu <myi...@gmail.com>

> Just to show you the kind of niceties that such an integration can bring,
> I send you two files. One is the Lyx source and the other one is the final
> PDF.
> In Lyx, I just click on the  Preview button and wait a little bit to get
> the final PDF that I show here, with results of the computations done by
> Sage and converted back to Latex.
>
> The module isfar from perfect yet (this is the first module I am
> creating), a better integration between the Latex output by Sage, and the
> math mode in LyX would be implemented to have nice equations typeset with
> equation numbers and what not. You can also see that the output of the
> integral by Sage is not very beautiful...
>
> I will continue to work on this module, but it is already useful for me
> and eliminates some regrets I feel ;-), since I have dropped Scientific
> Workplace in favor of LyX.
>
> I hope that you will like this new possibilities.
>
> Best regards,
>
> Murat
>
> PS. Sage lives in: http://www.sagemath.org
>
>
> --
> Prof. Murat Yildizoglu
>
> Université Montesquieu Bordeaux IV
> GREThA (UMR CNRS 5113)
> Avenue Léon Duguit
> 33608 Pessac cedex
> France
>
> yi...@u-bordeaux4.fr
>
>  http://yildizoglu.info
>
>
>

--
Prof. Murat Yildizoglu

Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France

yi...@u-bordeaux4.fr

http://yildizoglu.info