Concerning the bug, Julien proposes the following trick: "
- *julien.ri...@gmail.com* added As a workaround you could have a "fake" math macro at the top of your document. Insert a math macro for \Sexpr{} and put a "%" in ERT in front of it. Now you can use \Sexpr in math." I have tried to follow it, math macros are part of the mysteries of LyX that I have never used yet, so it is again a first time. I have read the help document about the macros in the Math manual (but again, even if I understand the general principle of the macros, I do not understand their intricacies) and tried to put a macro that generates the following instruction in the preamble: \global\long\def\sagecommand#1{\sage\{#1\}} (I cannot copy and paste the macro definition...) But when I put \sagecommand{a-Sage-command} in a displayed equation, i get ??a-Sage-command in the math box, as well as in the compiled pdf... instead of \sage{a-Sage-command} in the final Latex and the results of the Sage computation in the PDF. I am pretty sure that I am doing something stupid... Moreover, the math-macro seems to have crashed other Sage computations that results from the sagecommand insets (they generate \sage{} commands in the latex file) that were working before the introduction of the macro. Murat 2011/11/3 Liviu Andronic <landronim...@gmail.com> > On Thu, Nov 3, 2011 at 5:31 PM, Murat Yildizoglu <myi...@gmail.com> wrote: > > Hello, > > I have waited a little bit before harassing you again with my Sage > extension > > problem. > > Concerning the possibility of including Sage commands in the math mode, I > > have not found any solution. > > > I think you're seeing bug #7181. > > Liviu > > > > Is there a Flex-inset type that can be inserted in a math box, without > being > > interpreted before the compilation of the document by > > pdflatex+Sage+pdflatex? When I insert my \sage{} instruction in a math > > expression, Lyx tries to interpret what is inside, even if I have set the > > inset as Passtrough=1. > > I know that I can do it using an ERT but I will have to type the complete > > expression in the ERt too in this case :-( (well, I know that I could > type > > it in a math box and then copy and paste in the ERT, but I cannot use the > > conveniences of Lyx for displayed equations and equation sets even in > this > > case). > > > > -- > > 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 > > http://www.twitter.com/yildizoglu > > > > > > -- > Do you know how to read? > http://www.alienetworks.com/srtest.cfm > http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader > Do you know how to write? > http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail > -- Prof. Murat Yildizoglu Université Montesquieu Bordeaux IV GREThA (UMR CNRS 5113) Avenue Léon Duguit 33608 Pessac cedex France yi...@u-bordeaux4.fr h <http://myildi.e-jemed.org/>ttp://yildizoglu.info http://www.twitter.com/yildizoglu