Hi,
I am trying to write a new module that would allow to introduce me Sage
instructions, like for a Sweave document.
I have read the customization guide but I have a problem in the
implementation of a command.
In a latex document using the sagetex package, one can write
\sageplot[angle=0, width=10cm]{plot(sin(x), 0, pi), axes=True}
to have a plot generated by Sage and inserted in the pdf.
I have written the following definition in my module:
Style sageplot
LatexType Command
LatexName sageplot
OptionalArgs 1
FreeSpacing 1
PassThru 1
Spellcheck 0
TextFont
Color latex
Family Typewriter
EndFont
End
In order to be able to write in the lyx document [angle=0,
width=10cm]plot(sin(x), 0, pi), axes=True
and select the sageplot command from the top dropbox of styles, to convert
it to the latex command above.
I am definitely missing something here, since that does not work...
How could I write and environment that accepts options given in the LyX
file. Is this possible at all?
Except this problem, I have now a setup that allows me to put Sage commands
in a lyx file and compile the final PDF including the results of these
commands.
FYI: Sage is a very powerful open source mathematics environment (it pools
together many available open source tools for mathematics).
http://www.sagemath.org/
Once I have a fully working (and tested) setup, I could share it with you
if you are interested by this solution.
Regards,
Murat
--
Prof. Murat Yildizoglu
Université Montesquieu Bordeaux IV
GREThA (UMR CNRS 5113)
Avenue Léon Duguit
33608 Pessac cedex
France
[email protected]
http://yildizoglu.info
http://www.twitter.com/yildizoglu