Re: better maxima integration, devel.
Janek Kozicki janek_listy@... writes: Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) [1] http://www.mail-archive.com/lyx-users-UqbJ+GOpo4+hPH1hqNUYSQ at public.gmane.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. The simplest way for me is to allow a maxima session in lyx, and add communication between both. Copying/using/referencing equations in both directions between maxima buffer - document. Entering equations in document and pasting them to maxima buffer (for later, more complex use) for people familiar with entering equation using lyx/latex commands and the opposite for people who wish to enter them using maxima input format. Hello, I wish to know if any improvement was made since 2010. today I tried to use maxima inside lyx and thought about how great can it be if there would be full support for it. (for example - entering matrix to maxima or saving varibles) it would be wonderfull
Re: better maxima integration, devel.
Rami wrote: I wish to know if any improvement was made since 2010. today I tried to use No. It would need someone to work on it. Perhpas you? :) Pavel
Re: better maxima integration, devel.
Janek Kozickiwrites: > > Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) > > > [1] http://www.mail-archive.com/lyx-users-UqbJ+GOpo4+hPH1hqNUYSQ public.gmane.org/msg77889.html > > thanks, by reading this I see that the maxima buffer must be > seamlessly integrated with document, in order to not confuse people. > > But, OTOH, to use any algebra system in efficient way, the user has to > know which one he is using. I am not going to write an interface that > translates every kind of math+lyx input into every kind of > octave/maxima/maple/mathematica input. There's too many different > specific things, and I never used maple/octave/mathematica, I don't > know their formatting. > > The simplest way for me is to allow a maxima session in lyx, and add > communication between both. Copying/using/referencing equations in both > directions between maxima buffer <-> document. Entering equations in > document and pasting them to maxima buffer (for later, more complex > use) for people familiar with entering equation using lyx/latex > commands and the opposite for people who wish to enter them using > maxima input format. Hello, I wish to know if any improvement was made since 2010. today I tried to use maxima inside lyx and thought about how great can it be if there would be full support for it. (for example - entering matrix to maxima or saving varibles) it would be wonderfull
Re: better maxima integration, devel.
Rami wrote: > I wish to know if any improvement was made since 2010. today I tried to use No. It would need someone to work on it. Perhpas you? :) Pavel
better maxima integration, devel.
Hi, I'm thinking about the possibility of using lyx as my frontend to maxima. Texmacs doesn't suit me, because I used gvim+latex for years. Since I used latex for long time it would be logical to start using lyx in order to interact with maxima. I didn't ever use lyx before, because gvim was good enough for me. But this time I need a maxima interface with latex capabilities. I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. best regards -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
Janek Kozicki wrote: [...] I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. Not sure what you want to do, but there is some LyX integration with maxima. You can write a formula in LyX, and then use this menu: Edit-Math-Use Computer algebra system-Maxima This will do transformations such as: 1+1+x+x becomes 1+1+x+x=2x+2 Calculus: \int x^2 dx becomes \int x^2=\frac{x^3}{3} \int\int\frac{x}{y} turns into \frac{x^2 \log{y}}{2} \frac{d}{dx}\frac{1+x}{1-x} turns into \frac{x+1}{\left(1-x\right)^{2}}+\frac{1}{1-x} And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. Helge Hafting
Re: better maxima integration, devel.
On 03/05/2010 07:29 AM, Helge Hafting wrote: Janek Kozicki wrote: [...] I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. Not sure what you want to do, but there is some LyX integration with maxima. You can write a formula in LyX, and then use this menu: Edit-Math-Use Computer algebra system-Maxima This will do transformations such as: 1+1+x+x becomes 1+1+x+x=2x+2 Calculus: \int x^2 dx becomes \int x^2=\frac{x^3}{3} \int\int\frac{x}{y} turns into \frac{x^2 \log{y}}{2} \frac{d}{dx}\frac{1+x}{1-x} turns into \frac{x+1}{\left(1-x\right)^{2}}+\frac{1}{1-x} And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. All of this is correct, but the infrastructure for doing more is there. Look at src/mathed/MathExtern.cpp and the various maxima() methods. We'd be very, very happy to have someone work on this. rh
Re: better maxima integration, devel.
On 3/5/10, Janek Kozicki janek_li...@wp.pl wrote: I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. Some time ago there was a lengthy discussion about CAS support in LyX [1] (including Maxima), which also contained some design ideas on possible future development. Regards Liviu [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html
Re: better maxima integration, devel.
rgheck said: (by the date of Fri, 05 Mar 2010 07:46:39 -0500) On 03/05/2010 07:29 AM, Helge Hafting wrote: And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. All of this is correct, but the infrastructure for doing more is there. Look at src/mathed/MathExtern.cpp and the various maxima() methods. We'd be very, very happy to have someone work on this. A warm welcome is very encouraging. I'll check that file. I know nothing about how it is done, yet, but still I have some simple vision, correct me when I'm wrong: - to have a working connection with background maxima, we need a maxima buffer. This buffer (a list of %inputs) is not a part of latex/LyX document, so it should be stored somewhere. I was thinking about putting it into .tex (.lyx) file as a comment, with some magic keyword, like following: % LYX+MAXIMA buffer, do not edit by hand, START % % * [wxMaxima: input start ] */ % e1:ellipse : x^2/a^2+y^2/b^2=1; % e2:line: A*(x-x0)+B*(y-y0)=0; % /* [wxMaxima: input end ] */ % % LYX+MAXIMA buffer, do not edit by hand, END the first two characters (the % ) are always stripped, the rest is treated as-is: the maxima input file format. - there could be a split-window with just the maxima input buffer. - interesting parts from the maxima buffer would be copied into latex/lyx document, by using some sort of referencing. - plot2d/3d would generate .ps files, provided correct gnuplot parameters to generate .ps files (which I happen to know). Pictures generated in this way would be entered into document structure in the same manner as the equations. - compiling lyx+maxima document, would mean to do some preprocessing: + first execute the maxima buffer in fresh maxima session. This would calculate stuff, and generate .ps files. + enter the referenced equations in their latest form (freshly calculated) into their proper places in the latex document + then continue the normal compilation, like invoking pdflatex or others. my head is bulging with ideas, but the time is really short. I'll check what you've told me, tell me more. Do not expect me to be fast. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
On 03/05/2010 09:20 AM, Janek Kozicki wrote: rgheck said: (by the date of Fri, 05 Mar 2010 07:46:39 -0500) On 03/05/2010 07:29 AM, Helge Hafting wrote: And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. All of this is correct, but the infrastructure for doing more is there. Look at src/mathed/MathExtern.cpp and the various maxima() methods. We'd be very, very happy to have someone work on this. A warm welcome is very encouraging. I'll check that file. I know nothing about how it is done, yet, but still I have some simple vision, correct me when I'm wrong: Since I don't use maxima etc myself, I don't have a lot of thoughts about this. What happens at present is that LaTeX that is entered into a math inset gets translated into maxima's input format; LyX calls maxima to do the calculation; retrieves the result, which is presumably in maxima's output format; and then translates that back into LaTeX, for inclusion in the document. Improving this means improving the translation mechanisms, mostly, so that LyX is able to formulate more complex queries and understand more complex answers. What you are proposing, I think, is somewhat different and looks almost like one of LyX's external insets. Indeed, something very like it could surely be implemented using external templates, which define a way that LyX can interact with external programs. These insets are inserted using InsertFileExternal Material, and we have support for several external programs now. The difference from what you are proposing is that the information would not be stored in LyX but rather in external text files referenced from within the LyX document. These would also be edited in an external text editor, but this can be called from within LyX, from the context menu. Have a look at lib/external_templates, which defines several of these things, and at chapter 6 of the Customization manual. My sense is that, for full maxima integration, this is definitely the easiest way to go. The disadvantage, compared to the current system, is that there's no integration with the math insets. rh
Re: better maxima integration, devel.
Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. The simplest way for me is to allow a maxima session in lyx, and add communication between both. Copying/using/referencing equations in both directions between maxima buffer - document. Entering equations in document and pasting them to maxima buffer (for later, more complex use) for people familiar with entering equation using lyx/latex commands and the opposite for people who wish to enter them using maxima input format. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. The simplest way for me is to allow a maxima session in lyx, and add communication between both. Copying/using/referencing equations in both directions between maxima buffer - document. Entering equations in document and pasting them to maxima buffer (for later, more complex use) for people familiar with entering equation using lyx/latex commands and the opposite for people who wish to enter them using maxima input format. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
rgheck said: (by the date of Fri, 05 Mar 2010 10:18:35 -0500) Since I don't use maxima etc myself, I don't have a lot of thoughts about this. What happens at present is that LaTeX that is entered into a math inset gets translated into maxima's input format; LyX calls maxima to do the calculation; retrieves the result, which is presumably in maxima's output format; and then translates that back into LaTeX, for inclusion in the document. Improving this means improving the translation mechanisms, mostly, so that LyX is able to formulate more complex queries and understand more complex answers. besides improving that communication, the only missing thing is to be able to declare variables within maxima, and operate on them later. It means a running maxima session, instead of standalone/separate calls for each thing. Those separate calls mean that everything is forgot after the call to maxima is done. Ideally I would want to derive calculations within lyx, while writing comments about it. All with the beauty of latex. Perhaps I'll start with this communication formatting thing that you explained, it should be an easy start to get feel of the workings. What you are proposing, I think, is somewhat different and looks almost like one of LyX's external insets. Indeed, something very like it could surely be implemented using external templates, which define a way that LyX can interact with external programs. These insets are inserted using InsertFileExternal Material, and we have support for several external programs now. The difference from what you are proposing is that the information would not be stored in LyX but rather in external text files referenced from within the LyX document. These would also be edited in an external text editor, but this can be called from within LyX, from the context menu. Have a look at lib/external_templates, which defines several of these things, and at chapter 6 of the Customization manual. My sense is that, for full maxima integration, this is definitely the easiest way to go. The disadvantage, compared to the current system, is that there's no integration with the math insets. I see. I would prefer to stay within lyx boundaries. A split window, with the maxima buffer or such. I don't know yet. Storing input in external file is better than putting it into .lyx as comments, I didn't know this is possible. maxima runs well even in a text terminal, it should be possible to pipe this somehow. I should look in the code now, or else it becomes just babbling. The time limitation allows me to do it only on fridays, only an hour or two per week, so I hopefully will come with more interesting questions next week. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
On 03/05/2010 10:23 AM, Janek Kozicki wrote: Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. These all have their own separate routines, at present. It's all very modular. You could improve the maxima interface without touching the other stuff. rh
Re: better maxima integration, devel.
On 2010-03-05, Janek Kozicki wrote: rgheck said: (by the date of Fri, 05 Mar 2010 10:18:35 -0500) ... besides improving that communication, the only missing thing is to be able to declare variables within maxima, and operate on them later. It means a running maxima session, instead of standalone/separate calls for each thing. Ideally I would want to derive calculations within lyx, while writing comments about it. All with the beauty of latex. Perhaps I'll start with this communication formatting thing that you explained, it should be an easy start to get feel of the workings. What you are proposing, I think, is somewhat different and looks almost like one of LyX's external insets. ... My sense is that, for full maxima integration, this is definitely the easiest way to go. The disadvantage, compared to the current system, is that there's no integration with the math insets. I see. I would prefer to stay within lyx boundaries. A split window, with the maxima buffer or such. I don't know yet. Storing input in external file is better than putting it into .lyx as comments, I didn't know this is possible. maxima runs well even in a text terminal, it should be possible to pipe this somehow. One more thing to consider is using the lyxserver pipes. E.g. I wrote some experimental LyX output for swiginac (a Python wrapper of the ginac C++ library, http://swiginac.berlios.de/) using my LyXServer Python package (available via the LyX wiki) but the other way is also feasible, as the lyxserver is bidirectional. Günter
Re: better maxima integration, devel.
Guenter Milde said: (by the date of Fri, 5 Mar 2010 20:07:45 + (UTC)) One more thing to consider is using the lyxserver pipes. E.g. I wrote some experimental LyX output for swiginac (a Python wrapper of the ginac C++ library, http://swiginac.berlios.de/) using my LyXServer Python package (available via the LyX wiki) but the other way is also feasible, as the lyxserver is bidirectional. wow, the lyx's architecture is impressive! Thanks for another hint. -- Janek Kozicki http://janek.kozicki.pl/ |
better maxima integration, devel.
Hi, I'm thinking about the possibility of using lyx as my frontend to maxima. Texmacs doesn't suit me, because I used gvim+latex for years. Since I used latex for long time it would be logical to start using lyx in order to interact with maxima. I didn't ever use lyx before, because gvim was good enough for me. But this time I need a maxima interface with latex capabilities. I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. best regards -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
Janek Kozicki wrote: [...] I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. Not sure what you want to do, but there is some LyX integration with maxima. You can write a formula in LyX, and then use this menu: Edit->Math->Use Computer algebra system->Maxima This will do transformations such as: "1+1+x+x" becomes "1+1+x+x=2x+2" Calculus: "\int x^2 dx" becomes "\int x^2=\frac{x^3}{3}" "\int\int\frac{x}{y} turns into \frac{x^2 \log{y}}{2} \frac{d}{dx}\frac{1+x}{1-x} turns into \frac{x+1}{\left(1-x\right)^{2}}+\frac{1}{1-x} And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. Helge Hafting
Re: better maxima integration, devel.
On 03/05/2010 07:29 AM, Helge Hafting wrote: Janek Kozicki wrote: [...] I see now, that such integration would require at least a running maxima session in the background. I'm quite experienced with latex and C++. I am not sure if I decide to go this path, I want to investigate and judge the difficulty of writing patches that will scratch my itch. I don't know what is the current state of lyx+maxima integration, and I asked for ML archives in order to check this. Not sure what you want to do, but there is some LyX integration with maxima. You can write a formula in LyX, and then use this menu: Edit->Math->Use Computer algebra system->Maxima This will do transformations such as: "1+1+x+x" becomes "1+1+x+x=2x+2" Calculus: "\int x^2 dx" becomes "\int x^2=\frac{x^3}{3}" "\int\int\frac{x}{y} turns into \frac{x^2 \log{y}}{2} \frac{d}{dx}\frac{1+x}{1-x} turns into \frac{x+1}{\left(1-x\right)^{2}}+\frac{1}{1-x} And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. All of this is correct, but the infrastructure for doing more is there. Look at src/mathed/MathExtern.cpp and the various maxima() methods. We'd be very, very happy to have someone work on this. rh
Re: better maxima integration, devel.
On 3/5/10, Janek Kozickiwrote: > I don't know what is the current state of lyx+maxima integration, and > I asked for ML archives in order to check this. > Some time ago there was a lengthy discussion about CAS support in LyX [1] (including Maxima), which also contained some design ideas on possible future development. Regards Liviu [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html
Re: better maxima integration, devel.
rgheck said: (by the date of Fri, 05 Mar 2010 07:46:39 -0500) > On 03/05/2010 07:29 AM, Helge Hafting wrote: > > And so on. Apparently, there are many limitations though. Maxima can do > > more, the communication between LyX and maxima is limited. You can't > > do matrix multiplication, for example. > > > All of this is correct, but the infrastructure for doing more is there. > Look at src/mathed/MathExtern.cpp and the various maxima() methods. > > We'd be very, very happy to have someone work on this. A warm welcome is very encouraging. I'll check that file. I know nothing about how it is done, yet, but still I have some simple vision, correct me when I'm wrong: - to have a working connection with background maxima, we need a maxima buffer. This buffer (a list of %inputs) is not a part of latex/LyX document, so it should be stored somewhere. I was thinking about putting it into .tex (.lyx) file as a comment, with some magic keyword, like following: % LYX+MAXIMA buffer, do not edit by hand, START % % * [wxMaxima: input start ] */ % e1:ellipse : x^2/a^2+y^2/b^2=1; % e2:line: A*(x-x0)+B*(y-y0)=0; % /* [wxMaxima: input end ] */ % % LYX+MAXIMA buffer, do not edit by hand, END the first two characters (the "% ") are always stripped, the rest is treated as-is: the maxima input file format. - there could be a split-window with just the maxima input buffer. - interesting parts from the maxima buffer would be copied into latex/lyx document, by using some sort of referencing. - plot2d/3d would generate .ps files, provided correct gnuplot parameters to generate .ps files (which I happen to know). Pictures generated in this way would be entered into document structure in the same manner as the equations. - compiling lyx+maxima document, would mean to do some preprocessing: + first execute the maxima buffer in fresh maxima session. This would calculate stuff, and generate .ps files. + enter the referenced equations in their latest form (freshly calculated) into their proper places in the latex document + then continue the normal compilation, like invoking pdflatex or others. my head is bulging with ideas, but the time is really short. I'll check what you've told me, tell me more. Do not expect me to be fast. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
On 03/05/2010 09:20 AM, Janek Kozicki wrote: rgheck said: (by the date of Fri, 05 Mar 2010 07:46:39 -0500) On 03/05/2010 07:29 AM, Helge Hafting wrote: And so on. Apparently, there are many limitations though. Maxima can do more, the communication between LyX and maxima is limited. You can't do matrix multiplication, for example. All of this is correct, but the infrastructure for doing more is there. Look at src/mathed/MathExtern.cpp and the various maxima() methods. We'd be very, very happy to have someone work on this. A warm welcome is very encouraging. I'll check that file. I know nothing about how it is done, yet, but still I have some simple vision, correct me when I'm wrong: Since I don't use maxima etc myself, I don't have a lot of thoughts about this. What happens at present is that LaTeX that is entered into a math inset gets translated into maxima's input format; LyX calls maxima to do the calculation; retrieves the result, which is presumably in maxima's output format; and then translates that back into LaTeX, for inclusion in the document. Improving this means improving the translation mechanisms, mostly, so that LyX is able to formulate more complex queries and understand more complex answers. What you are proposing, I think, is somewhat different and looks almost like one of LyX's "external" insets. Indeed, something very like it could surely be implemented using external templates, which define a way that LyX can interact with external programs. These insets are inserted using Insert>File>External Material, and we have support for several external programs now. The difference from what you are proposing is that the information would not be stored in LyX but rather in external text files referenced from within the LyX document. These would also be edited in an external text editor, but this can be called from within LyX, from the context menu. Have a look at lib/external_templates, which defines several of these things, and at chapter 6 of the Customization manual. My sense is that, for full maxima integration, this is definitely the easiest way to go. The disadvantage, compared to the current system, is that there's no integration with the math insets. rh
Re: better maxima integration, devel.
Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) > [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. The simplest way for me is to allow a maxima session in lyx, and add communication between both. Copying/using/referencing equations in both directions between maxima buffer <-> document. Entering equations in document and pasting them to maxima buffer (for later, more complex use) for people familiar with entering equation using lyx/latex commands and the opposite for people who wish to enter them using maxima input format. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) > [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. The simplest way for me is to allow a maxima session in lyx, and add communication between both. Copying/using/referencing equations in both directions between maxima buffer <-> document. Entering equations in document and pasting them to maxima buffer (for later, more complex use) for people familiar with entering equation using lyx/latex commands and the opposite for people who wish to enter them using maxima input format. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
rgheck said: (by the date of Fri, 05 Mar 2010 10:18:35 -0500) > Since I don't use maxima etc myself, I don't have a lot of thoughts > about this. What happens at present is that LaTeX that is entered into a > math inset gets translated into maxima's input format; LyX calls maxima > to do the calculation; retrieves the result, which is presumably in > maxima's output format; and then translates that back into LaTeX, for > inclusion in the document. Improving this means improving the > translation mechanisms, mostly, so that LyX is able to formulate more > complex queries and understand more complex answers. besides improving that communication, the "only" missing thing is to be able to declare variables within maxima, and operate on them later. It means a running maxima session, instead of standalone/separate calls for each thing. Those separate calls mean that everything is forgot after the call to maxima is done. Ideally I would want to derive calculations within lyx, while writing comments about it. All with the beauty of latex. Perhaps I'll start with this communication formatting thing that you explained, it should be an easy start to get feel of the workings. > What you are proposing, I think, is somewhat different and looks almost > like one of LyX's "external" insets. Indeed, something very like it > could surely be implemented using external templates, which define a way > that LyX can interact with external programs. These insets are inserted > using Insert>File>External Material, and we have support for several > external programs now. The difference from what you are proposing is > that the information would not be stored in LyX but rather in external > text files referenced from within the LyX document. These would also be > edited in an external text editor, but this can be called from within > LyX, from the context menu. Have a look at lib/external_templates, which > defines several of these things, and at chapter 6 of the Customization > manual. > > My sense is that, for full maxima integration, this is definitely the > easiest way to go. The disadvantage, compared to the current system, is > that there's no integration with the math insets. I see. I would prefer to stay within lyx boundaries. A split window, with the maxima buffer or such. I don't know yet. Storing input in external file is better than putting it into .lyx as comments, I didn't know this is possible. maxima runs well even in a text terminal, it should be possible to pipe this somehow. I should look in the code now, or else it becomes just babbling. The time limitation allows me to do it only on fridays, only an hour or two per week, so I hopefully will come with more interesting questions next week. -- Janek Kozicki http://janek.kozicki.pl/ |
Re: better maxima integration, devel.
On 03/05/2010 10:23 AM, Janek Kozicki wrote: Liviu Andronic said: (by the date of Fri, 5 Mar 2010 14:09:40 +) [1] http://www.mail-archive.com/lyx-us...@lists.lyx.org/msg77889.html thanks, by reading this I see that the maxima buffer must be seamlessly integrated with document, in order to not confuse people. But, OTOH, to use any algebra system in efficient way, the user has to know which one he is using. I am not going to write an interface that translates every kind of math+lyx input into every kind of octave/maxima/maple/mathematica input. There's too many different specific things, and I never used maple/octave/mathematica, I don't know their formatting. These all have their own separate routines, at present. It's all very modular. You could improve the maxima interface without touching the other stuff. rh
Re: better maxima integration, devel.
On 2010-03-05, Janek Kozicki wrote: > rgheck said: (by the date of Fri, 05 Mar 2010 10:18:35 -0500) ... > besides improving that communication, the "only" missing thing is to > be able to declare variables within maxima, and operate on them > later. It means a running maxima session, instead of > standalone/separate calls for each thing. > Ideally I would want to derive calculations within lyx, while > writing comments about it. All with the beauty of latex. > Perhaps I'll start with this communication formatting thing that you > explained, it should be an easy start to get feel of the workings. >> What you are proposing, I think, is somewhat different and looks almost >> like one of LyX's "external" insets. ... >> My sense is that, for full maxima integration, this is definitely the >> easiest way to go. The disadvantage, compared to the current system, is >> that there's no integration with the math insets. > I see. I would prefer to stay within lyx boundaries. A split window, > with the maxima buffer or such. I don't know yet. Storing input in > external file is better than putting it into .lyx as comments, > I didn't know this is possible. maxima runs well even in a text > terminal, it should be possible to pipe this somehow. One more thing to consider is using the lyxserver pipes. E.g. I wrote some experimental "LyX output" for swiginac (a Python wrapper of the ginac C++ library, http://swiginac.berlios.de/) using my LyXServer Python package (available via the LyX wiki) but the other way is also feasible, as the lyxserver is bidirectional. Günter
Re: better maxima integration, devel.
Guenter Milde said: (by the date of Fri, 5 Mar 2010 20:07:45 + (UTC)) > One more thing to consider is using the lyxserver pipes. E.g. I wrote > some experimental "LyX output" for swiginac (a Python wrapper of the > ginac C++ library, http://swiginac.berlios.de/) using my LyXServer Python > package (available via the LyX wiki) but the other way is also feasible, > as the lyxserver is bidirectional. wow, the lyx's architecture is impressive! Thanks for another hint. -- Janek Kozicki http://janek.kozicki.pl/ |