Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Helge Hafting

Murat Yildizoglu wrote:

Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).


I think Lyx should stay with the math notation it has. Users should not
need to write differently depending on whether they use maxima or some
other math package.

LyX should handle the conversion into something maxima/octace/whatever
can understand.

Of course the math menu in LyX can be extended. If different menus
for simplify, evaluate etc. is useful, then it can be made.

Someone interested has to do the work though.

Helge Hafting




Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Guenter Milde
On 2010-01-06, Helge Hafting wrote:
 Murat Yildizoglu wrote:
 Thanks a lot Olivier, this works perfectly for Maxima.
  I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
 it works as it is shown by the = sign but how to ask more indirect
 tasks?

 Question: How to pass commands to Maxima? Should we write full Maxima
 expressions, instead of the standard math notation? In SWP there is a
 Computation menu where it is possible to choose the operation that we
 desire (simplify, evaluate, etc.).

 I think Lyx should stay with the math notation it has. Users should not
 need to write differently depending on whether they use maxima or some
 other math package.

 LyX should handle the conversion into something maxima/octace/whatever
 can understand.

 Of course the math menu in LyX can be extended. If different menus
 for simplify, evaluate etc. is useful, then it can be made.

The problem here is, that LaTeX only knows/needs presentational math
commands. A large part of the CAS syntax has no meaning in pure math.

Hence it does not make sense to extend LaTeX math for CAS.

Proposals (first draw):

* for code from a file, use the external material inset, 
  
  Create a CAS template replacing Maxima/Octave/swiginac input with the LaTeX
  output in a math-editor box.
  
* a CAS-inset for the math editor with configurable accepting CAS
  commands in a configurable language.
  
Günter  



Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Helge Hafting

Murat Yildizoglu wrote:

Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).


I think Lyx should stay with the math notation it has. Users should not
need to write differently depending on whether they use maxima or some
other math package.

LyX should handle the conversion into something maxima/octace/whatever
can understand.

Of course the math menu in LyX can be extended. If different menus
for simplify, evaluate etc. is useful, then it can be made.

Someone interested has to do the work though.

Helge Hafting




Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Guenter Milde
On 2010-01-06, Helge Hafting wrote:
 Murat Yildizoglu wrote:
 Thanks a lot Olivier, this works perfectly for Maxima.
  I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
 it works as it is shown by the = sign but how to ask more indirect
 tasks?

 Question: How to pass commands to Maxima? Should we write full Maxima
 expressions, instead of the standard math notation? In SWP there is a
 Computation menu where it is possible to choose the operation that we
 desire (simplify, evaluate, etc.).

 I think Lyx should stay with the math notation it has. Users should not
 need to write differently depending on whether they use maxima or some
 other math package.

 LyX should handle the conversion into something maxima/octace/whatever
 can understand.

 Of course the math menu in LyX can be extended. If different menus
 for simplify, evaluate etc. is useful, then it can be made.

The problem here is, that LaTeX only knows/needs presentational math
commands. A large part of the CAS syntax has no meaning in pure math.

Hence it does not make sense to extend LaTeX math for CAS.

Proposals (first draw):

* for code from a file, use the external material inset, 
  
  Create a CAS template replacing Maxima/Octave/swiginac input with the LaTeX
  output in a math-editor box.
  
* a CAS-inset for the math editor with configurable accepting CAS
  commands in a configurable language.
  
Günter  



Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Helge Hafting

Murat Yildizoglu wrote:

Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).


I think Lyx should stay with the math notation it has. Users should not
need to write differently depending on whether they use maxima or some
other math package.

LyX should handle the conversion into something maxima/octace/whatever
can understand.

Of course the math menu in LyX can be extended. If different menus
for simplify, evaluate etc. is useful, then it can be made.

Someone interested has to do the work though.

Helge Hafting




Re: Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2010-01-06 Thread Guenter Milde
On 2010-01-06, Helge Hafting wrote:
> Murat Yildizoglu wrote:
>> Thanks a lot Olivier, this works perfectly for Maxima.
>>  I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
>> it works as it is shown by the = sign but how to ask more indirect
>> tasks?

>> Question: How to pass commands to Maxima? Should we write full Maxima
>> expressions, instead of the standard math notation? In SWP there is a
>> Computation menu where it is possible to choose the operation that we
>> desire (simplify, evaluate, etc.).

> I think Lyx should stay with the math notation it has. Users should not
> need to write differently depending on whether they use maxima or some
> other math package.

> LyX should handle the conversion into something maxima/octace/whatever
> can understand.

> Of course the math menu in LyX can be extended. If different menus
> for simplify, evaluate etc. is useful, then it can be made.

The problem here is, that LaTeX only knows/needs "presentational" math
commands. A large part of the CAS syntax has no meaning in "pure" math.

Hence it does not make sense to extend "LaTeX math" for CAS.

Proposals (first draw):

* for code from a file, use the external material inset, 
  
  Create a CAS template replacing Maxima/Octave/swiginac input with the LaTeX
  output in a math-editor box.
  
* a "CAS-inset" for the math editor with configurable accepting CAS
  commands in a configurable language.
  
Günter  



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-25 Thread Ken
Enrico Forestieri for...@... writes:


 Ken writes:

  It does appear to be quite simple in its capabilities and not able to
  handle even moderately complex formulas (exp(2)*exp(3)) in either
  octave or maxima.

 Note that if you type exp(2) literally, LyX has to use some heuristics in
 order to know what you meant. Actually, it interprets exp(2) as ex p(2),
 i.e., e times x times p(2). You can help interpretation in several ways.

 1. use \mathrm to tell LyX what the function name is:
\mathrm{exp}(2)*\mathrm{exp}(3)

 2. use a small space to separate the argument of the function:
exp\,(2)*exp\,(3)

 3. use the LaTeX function names:
\exp(2)*\exp(3)

 4. use standard math:
e^2*e^3

 Nevertheless, this could be improved, of course, but heuristics can always
 fail. That said, failure or success also depends on the CAS used. Your
 particular example (without the corrective steps outlined above) works with
 both octave and maxima, but fails with Mathematica (I don't know what happens
 with maple).


Hi Enrico,

I re-tried suggestion #3:
\exp(2)*\exp(3)
and
\exp\left(2\right)*\exp\left(3\right)

which both suddenly worked on Windows with LyX 1.6.4 and Maxima 5.16.3.  I am
not certain why as previous attempts failed.

The only difference is that I did a complete re-boot this morning on my machine.

Thanks!
Ken


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-25 Thread Ken
Enrico Forestieri for...@... writes:


 Ken writes:

  It does appear to be quite simple in its capabilities and not able to
  handle even moderately complex formulas (exp(2)*exp(3)) in either
  octave or maxima.

 Note that if you type exp(2) literally, LyX has to use some heuristics in
 order to know what you meant. Actually, it interprets exp(2) as ex p(2),
 i.e., e times x times p(2). You can help interpretation in several ways.

 1. use \mathrm to tell LyX what the function name is:
\mathrm{exp}(2)*\mathrm{exp}(3)

 2. use a small space to separate the argument of the function:
exp\,(2)*exp\,(3)

 3. use the LaTeX function names:
\exp(2)*\exp(3)

 4. use standard math:
e^2*e^3

 Nevertheless, this could be improved, of course, but heuristics can always
 fail. That said, failure or success also depends on the CAS used. Your
 particular example (without the corrective steps outlined above) works with
 both octave and maxima, but fails with Mathematica (I don't know what happens
 with maple).


Hi Enrico,

I re-tried suggestion #3:
\exp(2)*\exp(3)
and
\exp\left(2\right)*\exp\left(3\right)

which both suddenly worked on Windows with LyX 1.6.4 and Maxima 5.16.3.  I am
not certain why as previous attempts failed.

The only difference is that I did a complete re-boot this morning on my machine.

Thanks!
Ken


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-25 Thread Ken
Enrico Forestieri  writes:

>
> Ken writes:
>
> > It does appear to be quite simple in its capabilities and not able to
> > handle even moderately complex formulas (exp(2)*exp(3)) in either
> > octave or maxima.
>
> Note that if you type exp(2) literally, LyX has to use some heuristics in
> order to know what you meant. Actually, it interprets "exp(2)" as "ex p(2)",
> i.e., "e" times "x" times "p(2)". You can help interpretation in several ways.
>
> 1. use \mathrm to tell LyX what the function name is:
>\mathrm{exp}(2)*\mathrm{exp}(3)
>
> 2. use a small space to separate the argument of the function:
>exp\,(2)*exp\,(3)
>
> 3. use the LaTeX function names:
>\exp(2)*\exp(3)
>
> 4. use standard math:
>e^2*e^3
>
> Nevertheless, this could be improved, of course, but heuristics can always
> fail. That said, failure or success also depends on the CAS used. Your
> particular example (without the corrective steps outlined above) works with
> both octave and maxima, but fails with Mathematica (I don't know what happens
> with maple).
>

Hi Enrico,

I re-tried suggestion #3:
\exp(2)*\exp(3)
and
\exp\left(2\right)*\exp\left(3\right)

which both suddenly worked on Windows with LyX 1.6.4 and Maxima 5.16.3.  I am
not certain why as previous attempts failed.

The only difference is that I did a complete re-boot this morning on my machine.

Thanks!
Ken


CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
 On 11/23/2009 02:05 PM, Liviu Andronic wrote:
 If I am not mistaking, symbolic calculations can be performed in LyX
 via maxima, octave, etc.

 I don't know how current the support is, but yes, there are routines in
 mathed that support exporting to these sorts of formats: Mathematica, too.
 So some work may need to be done, but we don't see a lot of requests for
 this kind of thing. I haven't seen anyone working on it since I've been
 involved in LyX.

One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu. Of course, an alternative
path would be Google.

Regards
Liviu

[1] http://www.lyx.org/Features
[2] http://wiki.lyx.org/LyX/FeaturePoll#toc15


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Sam Liddicott

* Liviu Andronic wrote, On 24/11/09 11:39:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:

On 11/23/2009 02:05 PM, Liviu Andronic wrote:

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.


I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.


One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu.


wow! thats great! Thanks for showing it.

Sam


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread rgheck

On 11/24/2009 06:39 AM, Liviu Andronic wrote:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheckrgh...@bobjweil.com  wrote:
   

On 11/23/2009 02:05 PM, Liviu Andronic wrote:
 

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.

   

I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.

 

One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu. Of course, an alternative
path would be Google.

   
If you'd like to draft something for one of the manuals, and/or propose 
some specific UI changes, we'd love to have them.


rh



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
On 11/24/09, Ken kmai...@googlemail.com wrote:
 How does one set up LyX to use Octave, Maxima, etc.?

As long as maxima and lyx are installed, it should work out of the box.
Liviu


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit-Math-CAS-Octave or -Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


2009/11/24 Liviu Andronic landronim...@gmail.com:
 On 11/24/09, Ken kmai...@googlemail.com wrote:
 I have maxima-5.16.3 and octave-3.2.3 installed on my Windows XP
  machine. When I enter the math formula 2+2 and click on
  Edit-Math-CAS... and choose maxima or octave it does not do
  anything.  Does lyx need to know where the binaries are located?

 Hmm, that's a good question. On Linux (Debian and Gentoo), I didn't
 need to perform any additional tweaks: both maxima and octave worked
 out of the box (the versions are similar to yours). Perhaps you would
 need to reconfigure LyX. If that fails, consider asking this on-list.

 Regards
 Liviu



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:

I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit-Math-CAS-Octave or -Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


I share your amazement. I didn't know that trick and it works here too 
(Maxima 5.19.2).

That's another thing to showcase to the word-using colleagues ;-)

Thanks a lot for the tip!

Olivier

PS: should the re-configure script update those paths by itself?



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:


That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


That's actually easy: here is how to get the Maxima action in the 
context menu:


0- close lyx if opened

1- Copy the stdcontext.inc file found in the common ui folder of LyX.
On windows, it is
C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be 
somewhere in /usr/share


2- Paste this file in your own ui folder.
On windows, it is in
C:\Documents and Settings\username\Application Data\lyx16\ui

3- with a decent text editor (accepting unix LF), find the
'Menu context-math' section, and at the end (after line 75, before the 
'End'), add the following 2 lines (the second is taken from the 
edit_math_extern section of file 'stdmenus.inc', if you wonder how to 
add Octave, Maple, etc.)

Separator
Item Maxima|M math-extern maxima

4- save, restart lyx

Best regards,

Olivier




Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
Olivier Ripoll durocortorum73-gm...@... writes:
 Ken wrote:
  
  That's a fantastic new discovery of a further LyX feature.  As for
  making it more useful, perhaps LyX needs some buttons in the math
  toolbar for Octave or Maxima or a way of customizing some new buttons
  to run the Edit-Math-CAS options.
 
 That's actually easy: here is how to get the Maxima action in the 
 context menu:
 
 0- close lyx if opened
 
 1- Copy the stdcontext.inc file found in the common ui folder of LyX.
 On windows, it is
 C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be 
 somewhere in /usr/share
 
 2- Paste this file in your own ui folder.
 On windows, it is in
 C:\Documents and Settings\username\Application Data\lyx16\ui
 
 3- with a decent text editor (accepting unix LF), find the
 'Menu context-math' section, and at the end (after line 75, before the 
 'End'), add the following 2 lines (the second is taken from the 
 edit_math_extern section of file 'stdmenus.inc', if you wonder how to 
 add Octave, Maple, etc.)
   Separator
   Item Maxima|M math-extern maxima
 
 4- save, restart lyx

Very cool! I added:
Separator
Item Maxima|M math-extern maxima
Item Octave|O math-extern octave

and both work on my Windows XP, LyX 1.6.4 machine.

Thanks!

P.S. The context menu (for those that didn't catch the meaning straight
away--I didn't) is the menu you see when you right-click on the equation.





Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).

Murat


2009/11/24 Olivier Ripoll durocortorum73-gm...@yahoo.fr:
 Ken wrote:

 That's a fantastic new discovery of a further LyX feature.  As for
 making it more useful, perhaps LyX needs some buttons in the math
 toolbar for Octave or Maxima or a way of customizing some new buttons
 to run the Edit-Math-CAS options.

 That's actually easy: here is how to get the Maxima action in the context
 menu:

 0- close lyx if opened

 1- Copy the stdcontext.inc file found in the common ui folder of LyX.
 On windows, it is
 C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be
 somewhere in /usr/share

 2- Paste this file in your own ui folder.
 On windows, it is in
 C:\Documents and Settings\username\Application Data\lyx16\ui

 3- with a decent text editor (accepting unix LF), find the
 'Menu context-math' section, and at the end (after line 75, before the
 'End'), add the following 2 lines (the second is taken from the
 edit_math_extern section of file 'stdmenus.inc', if you wonder how to add
 Octave, Maple, etc.)
                Separator
                Item Maxima|M math-extern maxima

 4- save, restart lyx

 Best regards,

 Olivier






-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Andre Poenitz
On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
 Hello
 
 On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
  On 11/23/2009 02:05 PM, Liviu Andronic wrote:
  If I am not mistaking, symbolic calculations can be performed in LyX
  via maxima, octave, etc.
 
  I don't know how current the support is, but yes, there are routines in
  mathed that support exporting to these sorts of formats: Mathematica, too.
  So some work may need to be done, but we don't see a lot of requests for
  this kind of thing. I haven't seen anyone working on it since I've been
  involved in LyX.
 
 One of the reasons for so few requests could be that the nifty feature
 is so well hidden. Other than not being mentioned on the features page
 [1], I couldn't find info on CAS (maxima and the likes) in any of the
 possible documentation files, from Introduction through Math. Even the
 feature-poll page contains a non-greened-out request for CAS [2]. In
 the GUI, it is not much simpler. After having written a math
 expression (say, 'x+x'), right-clicking on the math env will not show
 anything CAS-related, while the math toolbars do not propose anything
 obvious.
 
 Thus, to discover the CAS support in LyX a user would need to go the
 sometimes improbable way of writing in math env and, while there,
 accessing the Edit  Math  Use CAS menu. Of course, an alternative
 path would be Google.

The current CAS support in LyX is a toy, no more. Really. There is not
enough flesh to justify documentation. It would not take lot of effort
to make it work considerably better, but seemingly there was not enough
interest in the last six or eight years to make that happen.

Andre'


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
I find that this would be a real force in converting colleagues from
SWP to Lyx.

Murat

2009/11/24 Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de:
 On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
 Hello

 On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
  On 11/23/2009 02:05 PM, Liviu Andronic wrote:
  If I am not mistaking, symbolic calculations can be performed in LyX
  via maxima, octave, etc.
 
  I don't know how current the support is, but yes, there are routines in
  mathed that support exporting to these sorts of formats: Mathematica, too.
  So some work may need to be done, but we don't see a lot of requests for
  this kind of thing. I haven't seen anyone working on it since I've been
  involved in LyX.
 
 One of the reasons for so few requests could be that the nifty feature
 is so well hidden. Other than not being mentioned on the features page
 [1], I couldn't find info on CAS (maxima and the likes) in any of the
 possible documentation files, from Introduction through Math. Even the
 feature-poll page contains a non-greened-out request for CAS [2]. In
 the GUI, it is not much simpler. After having written a math
 expression (say, 'x+x'), right-clicking on the math env will not show
 anything CAS-related, while the math toolbars do not propose anything
 obvious.

 Thus, to discover the CAS support in LyX a user would need to go the
 sometimes improbable way of writing in math env and, while there,
 accessing the Edit  Math  Use CAS menu. Of course, an alternative
 path would be Google.

 The current CAS support in LyX is a toy, no more. Really. There is not
 enough flesh to justify documentation. It would not take lot of effort
 to make it work considerably better, but seemingly there was not enough
 interest in the last six or eight years to make that happen.

 Andre'




-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
2009/11/24 Ken kmai...@googlemail.com:
 2009/11/24 Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de:
 The current CAS support in LyX is a toy, no more. Really. There is not
 enough flesh to justify documentation. It would not take lot of effort
 to make it work considerably better, but seemingly there was not enough
 interest in the last six or eight years to make that happen.

 Andre'

It does appear to be quite simple in its capabilities and not able to
handle even moderately complex formulas (exp(2)*exp(3)) in either
octave or maxima.  But if it were a more prominent tool in the LyX
interface then perhaps it would get the attention (and bug/devel
requests) needed to make it something that could compete with MuPad.


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Pavel Sanda
Ken wrote:
 It does appear to be quite simple in its capabilities and not able to
 handle even moderately complex formulas (exp(2)*exp(3)) in either

works here with maxima
pavel


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Enrico Forestieri
Ken writes:

 It does appear to be quite simple in its capabilities and not able to
 handle even moderately complex formulas (exp(2)*exp(3)) in either
 octave or maxima.

Note that if you type exp(2) literally, LyX has to use some heuristics in
order to know what you meant. Actually, it interprets exp(2) as ex p(2),
i.e., e times x times p(2). You can help interpretation in several ways.

1. use \mathrm to tell LyX what the function name is:
   \mathrm{exp}(2)*\mathrm{exp}(3)

2. use a small space to separate the argument of the function:
   exp\,(2)*exp\,(3)

3. use the LaTeX function names:
   \exp(2)*\exp(3)

4. use standard math:
   e^2*e^3

Nevertheless, this could be improved, of course, but heuristics can always
fail. That said, failure or success also depends on the CAS used. Your
particular example (without the corrective steps outlined above) works with
both octave and maxima, but fails with Mathematica (I don't know what happens
with maple).

-- 
Enrico



CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
 On 11/23/2009 02:05 PM, Liviu Andronic wrote:
 If I am not mistaking, symbolic calculations can be performed in LyX
 via maxima, octave, etc.

 I don't know how current the support is, but yes, there are routines in
 mathed that support exporting to these sorts of formats: Mathematica, too.
 So some work may need to be done, but we don't see a lot of requests for
 this kind of thing. I haven't seen anyone working on it since I've been
 involved in LyX.

One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu. Of course, an alternative
path would be Google.

Regards
Liviu

[1] http://www.lyx.org/Features
[2] http://wiki.lyx.org/LyX/FeaturePoll#toc15


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Sam Liddicott

* Liviu Andronic wrote, On 24/11/09 11:39:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:

On 11/23/2009 02:05 PM, Liviu Andronic wrote:

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.


I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.


One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu.


wow! thats great! Thanks for showing it.

Sam


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread rgheck

On 11/24/2009 06:39 AM, Liviu Andronic wrote:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheckrgh...@bobjweil.com  wrote:
   

On 11/23/2009 02:05 PM, Liviu Andronic wrote:
 

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.

   

I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.

 

One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit  Math  Use CAS menu. Of course, an alternative
path would be Google.

   
If you'd like to draft something for one of the manuals, and/or propose 
some specific UI changes, we'd love to have them.


rh



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
On 11/24/09, Ken kmai...@googlemail.com wrote:
 How does one set up LyX to use Octave, Maxima, etc.?

As long as maxima and lyx are installed, it should work out of the box.
Liviu


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit-Math-CAS-Octave or -Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


2009/11/24 Liviu Andronic landronim...@gmail.com:
 On 11/24/09, Ken kmai...@googlemail.com wrote:
 I have maxima-5.16.3 and octave-3.2.3 installed on my Windows XP
  machine. When I enter the math formula 2+2 and click on
  Edit-Math-CAS... and choose maxima or octave it does not do
  anything.  Does lyx need to know where the binaries are located?

 Hmm, that's a good question. On Linux (Debian and Gentoo), I didn't
 need to perform any additional tweaks: both maxima and octave worked
 out of the box (the versions are similar to yours). Perhaps you would
 need to reconfigure LyX. If that fails, consider asking this on-list.

 Regards
 Liviu



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:

I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit-Math-CAS-Octave or -Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


I share your amazement. I didn't know that trick and it works here too 
(Maxima 5.19.2).

That's another thing to showcase to the word-using colleagues ;-)

Thanks a lot for the tip!

Olivier

PS: should the re-configure script update those paths by itself?



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:


That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit-Math-CAS options.


That's actually easy: here is how to get the Maxima action in the 
context menu:


0- close lyx if opened

1- Copy the stdcontext.inc file found in the common ui folder of LyX.
On windows, it is
C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be 
somewhere in /usr/share


2- Paste this file in your own ui folder.
On windows, it is in
C:\Documents and Settings\username\Application Data\lyx16\ui

3- with a decent text editor (accepting unix LF), find the
'Menu context-math' section, and at the end (after line 75, before the 
'End'), add the following 2 lines (the second is taken from the 
edit_math_extern section of file 'stdmenus.inc', if you wonder how to 
add Octave, Maple, etc.)

Separator
Item Maxima|M math-extern maxima

4- save, restart lyx

Best regards,

Olivier




Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
Olivier Ripoll durocortorum73-gm...@... writes:
 Ken wrote:
  
  That's a fantastic new discovery of a further LyX feature.  As for
  making it more useful, perhaps LyX needs some buttons in the math
  toolbar for Octave or Maxima or a way of customizing some new buttons
  to run the Edit-Math-CAS options.
 
 That's actually easy: here is how to get the Maxima action in the 
 context menu:
 
 0- close lyx if opened
 
 1- Copy the stdcontext.inc file found in the common ui folder of LyX.
 On windows, it is
 C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be 
 somewhere in /usr/share
 
 2- Paste this file in your own ui folder.
 On windows, it is in
 C:\Documents and Settings\username\Application Data\lyx16\ui
 
 3- with a decent text editor (accepting unix LF), find the
 'Menu context-math' section, and at the end (after line 75, before the 
 'End'), add the following 2 lines (the second is taken from the 
 edit_math_extern section of file 'stdmenus.inc', if you wonder how to 
 add Octave, Maple, etc.)
   Separator
   Item Maxima|M math-extern maxima
 
 4- save, restart lyx

Very cool! I added:
Separator
Item Maxima|M math-extern maxima
Item Octave|O math-extern octave

and both work on my Windows XP, LyX 1.6.4 machine.

Thanks!

P.S. The context menu (for those that didn't catch the meaning straight
away--I didn't) is the menu you see when you right-click on the equation.





Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).

Murat


2009/11/24 Olivier Ripoll durocortorum73-gm...@yahoo.fr:
 Ken wrote:

 That's a fantastic new discovery of a further LyX feature.  As for
 making it more useful, perhaps LyX needs some buttons in the math
 toolbar for Octave or Maxima or a way of customizing some new buttons
 to run the Edit-Math-CAS options.

 That's actually easy: here is how to get the Maxima action in the context
 menu:

 0- close lyx if opened

 1- Copy the stdcontext.inc file found in the common ui folder of LyX.
 On windows, it is
 C:\Program Files\LyX 1.6.4\Resources\ui, on linux, I'd expect it to be
 somewhere in /usr/share

 2- Paste this file in your own ui folder.
 On windows, it is in
 C:\Documents and Settings\username\Application Data\lyx16\ui

 3- with a decent text editor (accepting unix LF), find the
 'Menu context-math' section, and at the end (after line 75, before the
 'End'), add the following 2 lines (the second is taken from the
 edit_math_extern section of file 'stdmenus.inc', if you wonder how to add
 Octave, Maple, etc.)
                Separator
                Item Maxima|M math-extern maxima

 4- save, restart lyx

 Best regards,

 Olivier






-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Andre Poenitz
On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
 Hello
 
 On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
  On 11/23/2009 02:05 PM, Liviu Andronic wrote:
  If I am not mistaking, symbolic calculations can be performed in LyX
  via maxima, octave, etc.
 
  I don't know how current the support is, but yes, there are routines in
  mathed that support exporting to these sorts of formats: Mathematica, too.
  So some work may need to be done, but we don't see a lot of requests for
  this kind of thing. I haven't seen anyone working on it since I've been
  involved in LyX.
 
 One of the reasons for so few requests could be that the nifty feature
 is so well hidden. Other than not being mentioned on the features page
 [1], I couldn't find info on CAS (maxima and the likes) in any of the
 possible documentation files, from Introduction through Math. Even the
 feature-poll page contains a non-greened-out request for CAS [2]. In
 the GUI, it is not much simpler. After having written a math
 expression (say, 'x+x'), right-clicking on the math env will not show
 anything CAS-related, while the math toolbars do not propose anything
 obvious.
 
 Thus, to discover the CAS support in LyX a user would need to go the
 sometimes improbable way of writing in math env and, while there,
 accessing the Edit  Math  Use CAS menu. Of course, an alternative
 path would be Google.

The current CAS support in LyX is a toy, no more. Really. There is not
enough flesh to justify documentation. It would not take lot of effort
to make it work considerably better, but seemingly there was not enough
interest in the last six or eight years to make that happen.

Andre'


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
I find that this would be a real force in converting colleagues from
SWP to Lyx.

Murat

2009/11/24 Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de:
 On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
 Hello

 On Mon, Nov 23, 2009 at 9:34 PM, rgheck rgh...@bobjweil.com wrote:
  On 11/23/2009 02:05 PM, Liviu Andronic wrote:
  If I am not mistaking, symbolic calculations can be performed in LyX
  via maxima, octave, etc.
 
  I don't know how current the support is, but yes, there are routines in
  mathed that support exporting to these sorts of formats: Mathematica, too.
  So some work may need to be done, but we don't see a lot of requests for
  this kind of thing. I haven't seen anyone working on it since I've been
  involved in LyX.
 
 One of the reasons for so few requests could be that the nifty feature
 is so well hidden. Other than not being mentioned on the features page
 [1], I couldn't find info on CAS (maxima and the likes) in any of the
 possible documentation files, from Introduction through Math. Even the
 feature-poll page contains a non-greened-out request for CAS [2]. In
 the GUI, it is not much simpler. After having written a math
 expression (say, 'x+x'), right-clicking on the math env will not show
 anything CAS-related, while the math toolbars do not propose anything
 obvious.

 Thus, to discover the CAS support in LyX a user would need to go the
 sometimes improbable way of writing in math env and, while there,
 accessing the Edit  Math  Use CAS menu. Of course, an alternative
 path would be Google.

 The current CAS support in LyX is a toy, no more. Really. There is not
 enough flesh to justify documentation. It would not take lot of effort
 to make it work considerably better, but seemingly there was not enough
 interest in the last six or eight years to make that happen.

 Andre'




-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
2009/11/24 Ken kmai...@googlemail.com:
 2009/11/24 Andre Poenitz andre.poen...@mathematik.tu-chemnitz.de:
 The current CAS support in LyX is a toy, no more. Really. There is not
 enough flesh to justify documentation. It would not take lot of effort
 to make it work considerably better, but seemingly there was not enough
 interest in the last six or eight years to make that happen.

 Andre'

It does appear to be quite simple in its capabilities and not able to
handle even moderately complex formulas (exp(2)*exp(3)) in either
octave or maxima.  But if it were a more prominent tool in the LyX
interface then perhaps it would get the attention (and bug/devel
requests) needed to make it something that could compete with MuPad.


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Pavel Sanda
Ken wrote:
 It does appear to be quite simple in its capabilities and not able to
 handle even moderately complex formulas (exp(2)*exp(3)) in either

works here with maxima
pavel


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Enrico Forestieri
Ken writes:

 It does appear to be quite simple in its capabilities and not able to
 handle even moderately complex formulas (exp(2)*exp(3)) in either
 octave or maxima.

Note that if you type exp(2) literally, LyX has to use some heuristics in
order to know what you meant. Actually, it interprets exp(2) as ex p(2),
i.e., e times x times p(2). You can help interpretation in several ways.

1. use \mathrm to tell LyX what the function name is:
   \mathrm{exp}(2)*\mathrm{exp}(3)

2. use a small space to separate the argument of the function:
   exp\,(2)*exp\,(3)

3. use the LaTeX function names:
   \exp(2)*\exp(3)

4. use standard math:
   e^2*e^3

Nevertheless, this could be improved, of course, but heuristics can always
fail. That said, failure or success also depends on the CAS used. Your
particular example (without the corrective steps outlined above) works with
both octave and maxima, but fails with Mathematica (I don't know what happens
with maple).

-- 
Enrico



CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck  wrote:
> On 11/23/2009 02:05 PM, Liviu Andronic wrote:
>> If I am not mistaking, symbolic calculations can be performed in LyX
>> via maxima, octave, etc.
>>
> I don't know how current the support is, but yes, there are routines in
> mathed that support exporting to these sorts of formats: Mathematica, too.
> So some work may need to be done, but we don't see a lot of requests for
> this kind of thing. I haven't seen anyone working on it since I've been
> involved in LyX.
>
One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit > Math > Use CAS menu. Of course, an alternative
path would be Google.

Regards
Liviu

[1] http://www.lyx.org/Features
[2] http://wiki.lyx.org/LyX/FeaturePoll#toc15


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Sam Liddicott

* Liviu Andronic wrote, On 24/11/09 11:39:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck  wrote:

On 11/23/2009 02:05 PM, Liviu Andronic wrote:

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.


I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.


One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit > Math > Use CAS menu.


wow! thats great! Thanks for showing it.

Sam


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread rgheck

On 11/24/2009 06:39 AM, Liviu Andronic wrote:

Hello

On Mon, Nov 23, 2009 at 9:34 PM, rgheck  wrote:
   

On 11/23/2009 02:05 PM, Liviu Andronic wrote:
 

If I am not mistaking, symbolic calculations can be performed in LyX
via maxima, octave, etc.

   

I don't know how current the support is, but yes, there are routines in
mathed that support exporting to these sorts of formats: Mathematica, too.
So some work may need to be done, but we don't see a lot of requests for
this kind of thing. I haven't seen anyone working on it since I've been
involved in LyX.

 

One of the reasons for so few requests could be that the nifty feature
is so well hidden. Other than not being mentioned on the features page
[1], I couldn't find info on CAS (maxima and the likes) in any of the
possible documentation files, from Introduction through Math. Even the
feature-poll page contains a non-greened-out request for CAS [2]. In
the GUI, it is not much simpler. After having written a math
expression (say, 'x+x'), right-clicking on the math env will not show
anything CAS-related, while the math toolbars do not propose anything
obvious.

Thus, to discover the CAS support in LyX a user would need to go the
sometimes improbable way of writing in math env and, while there,
accessing the Edit>  Math>  Use CAS menu. Of course, an alternative
path would be Google.

   
If you'd like to draft something for one of the manuals, and/or propose 
some specific UI changes, we'd love to have them.


rh



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Liviu Andronic
On 11/24/09, Ken  wrote:
> How does one set up LyX to use Octave, Maxima, etc.?
>
As long as maxima and lyx are installed, it should work out of the box.
Liviu


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit->Math->CAS->Octave or ->Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit->Math->CAS options.


2009/11/24 Liviu Andronic :
> On 11/24/09, Ken  wrote:
>> I have maxima-5.16.3 and octave-3.2.3 installed on my Windows XP
>>  machine. When I enter the math formula 2+2 and click on
>>  Edit->Math->CAS... and choose maxima or octave it does not do
>>  anything.  Does lyx need to know where the binaries are located?
>>
> Hmm, that's a good question. On Linux (Debian and Gentoo), I didn't
> need to perform any additional tweaks: both maxima and octave worked
> out of the box (the versions are similar to yours). Perhaps you would
> need to reconfigure LyX. If that fails, consider asking this on-list.
>
> Regards
> Liviu
>


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:

I had a further play around with it.  I added:
;C:\Program Files\Maxima-5.16.3\bin;C:\Octave\3.2.3_gcc-4.4.0\bin
to the PATH prefix in the Preferences, and then restarted LyX.

Now when I type
4+5
in a math field and then use Edit->Math->CAS->Octave or ->Maxima it
calculates the answer and sets the field to 4+5=9.

And if I enter
$\int_{0}^{1}x^{2}dx$
maxima will return the answer 1/3.

That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit->Math->CAS options.


I share your amazement. I didn't know that trick and it works here too 
(Maxima 5.19.2).

That's another thing to showcase to the word-using colleagues ;-)

Thanks a lot for the tip!

Olivier

PS: should the re-configure script update those paths by itself?



Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Olivier Ripoll

Ken wrote:


That's a fantastic new discovery of a further LyX feature.  As for
making it more useful, perhaps LyX needs some buttons in the math
toolbar for Octave or Maxima or a way of customizing some new buttons
to run the Edit->Math->CAS options.


That's actually easy: here is how to get the Maxima action in the 
context menu:


0- close lyx if opened

1- Copy the "stdcontext.inc" file found in the common "ui" folder of LyX.
On windows, it is
"C:\Program Files\LyX 1.6.4\Resources\ui", on linux, I'd expect it to be 
somewhere in "/usr/share"


2- Paste this file in your own "ui" folder.
On windows, it is in
"C:\Documents and Settings\username\Application Data\lyx16\ui"

3- with a decent text editor (accepting unix LF), find the
'Menu "context-math"' section, and at the end (after line 75, before the 
'End'), add the following 2 lines (the second is taken from the 
"edit_math_extern" section of file 'stdmenus.inc', if you wonder how to 
add Octave, Maple, etc.)

Separator
Item "Maxima|M" "math-extern maxima"

4- save, restart lyx

Best regards,

Olivier




Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
Olivier Ripoll  writes:
> Ken wrote:
> > 
> > That's a fantastic new discovery of a further LyX feature.  As for
> > making it more useful, perhaps LyX needs some buttons in the math
> > toolbar for Octave or Maxima or a way of customizing some new buttons
> > to run the Edit->Math->CAS options.
> 
> That's actually easy: here is how to get the Maxima action in the 
> context menu:
> 
> 0- close lyx if opened
> 
> 1- Copy the "stdcontext.inc" file found in the common "ui" folder of LyX.
> On windows, it is
> "C:\Program Files\LyX 1.6.4\Resources\ui", on linux, I'd expect it to be 
> somewhere in "/usr/share"
> 
> 2- Paste this file in your own "ui" folder.
> On windows, it is in
> "C:\Documents and Settings\username\Application Data\lyx16\ui"
> 
> 3- with a decent text editor (accepting unix LF), find the
> 'Menu "context-math"' section, and at the end (after line 75, before the 
> 'End'), add the following 2 lines (the second is taken from the 
> "edit_math_extern" section of file 'stdmenus.inc', if you wonder how to 
> add Octave, Maple, etc.)
>   Separator
>   Item "Maxima|M" "math-extern maxima"
> 
> 4- save, restart lyx

Very cool! I added:
Separator
Item "Maxima|M" "math-extern maxima"
Item "Octave|O" "math-extern octave"

and both work on my Windows XP, LyX 1.6.4 machine.

Thanks!

P.S. The "context menu" (for those that didn't catch the meaning straight
away--I didn't) is the menu you see when you right-click on the equation.





Fwd: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
Thanks a lot Olivier, this works perfectly for Maxima.
 I can ask it to compute \frac{\partial x^{2}}{\partial x}=2\, x and
it works as it is shown by the = sign but how to ask more indirect
tasks?

Question: How to pass commands to Maxima? Should we write full Maxima
expressions, instead of the standard math notation? In SWP there is a
Computation menu where it is possible to choose the operation that we
desire (simplify, evaluate, etc.).

Murat


2009/11/24 Olivier Ripoll :
> Ken wrote:
>>
>> That's a fantastic new discovery of a further LyX feature.  As for
>> making it more useful, perhaps LyX needs some buttons in the math
>> toolbar for Octave or Maxima or a way of customizing some new buttons
>> to run the Edit->Math->CAS options.
>
> That's actually easy: here is how to get the Maxima action in the context
> menu:
>
> 0- close lyx if opened
>
> 1- Copy the "stdcontext.inc" file found in the common "ui" folder of LyX.
> On windows, it is
> "C:\Program Files\LyX 1.6.4\Resources\ui", on linux, I'd expect it to be
> somewhere in "/usr/share"
>
> 2- Paste this file in your own "ui" folder.
> On windows, it is in
> "C:\Documents and Settings\username\Application Data\lyx16\ui"
>
> 3- with a decent text editor (accepting unix LF), find the
> 'Menu "context-math"' section, and at the end (after line 75, before the
> 'End'), add the following 2 lines (the second is taken from the
> "edit_math_extern" section of file 'stdmenus.inc', if you wonder how to add
> Octave, Maple, etc.)
>                Separator
>                Item "Maxima|M" "math-extern maxima"
>
> 4- save, restart lyx
>
> Best regards,
>
> Olivier
>
>
>



-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Andre Poenitz
On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
> Hello
> 
> On Mon, Nov 23, 2009 at 9:34 PM, rgheck  wrote:
> > On 11/23/2009 02:05 PM, Liviu Andronic wrote:
> >> If I am not mistaking, symbolic calculations can be performed in LyX
> >> via maxima, octave, etc.
> >>
> > I don't know how current the support is, but yes, there are routines in
> > mathed that support exporting to these sorts of formats: Mathematica, too.
> > So some work may need to be done, but we don't see a lot of requests for
> > this kind of thing. I haven't seen anyone working on it since I've been
> > involved in LyX.
> >
> One of the reasons for so few requests could be that the nifty feature
> is so well hidden. Other than not being mentioned on the features page
> [1], I couldn't find info on CAS (maxima and the likes) in any of the
> possible documentation files, from Introduction through Math. Even the
> feature-poll page contains a non-greened-out request for CAS [2]. In
> the GUI, it is not much simpler. After having written a math
> expression (say, 'x+x'), right-clicking on the math env will not show
> anything CAS-related, while the math toolbars do not propose anything
> obvious.
> 
> Thus, to discover the CAS support in LyX a user would need to go the
> sometimes improbable way of writing in math env and, while there,
> accessing the Edit > Math > Use CAS menu. Of course, an alternative
> path would be Google.

The current CAS support in LyX is a toy, no more. Really. There is not
enough flesh to justify documentation. It would not take lot of effort
to make it work considerably better, but seemingly there was not enough
interest in the last six or eight years to make that happen.

Andre'


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Murat Yildizoglu
I find that this would be a real force in "converting" colleagues from
SWP to Lyx.

Murat

2009/11/24 Andre Poenitz :
> On Tue, Nov 24, 2009 at 11:39:42AM +, Liviu Andronic wrote:
>> Hello
>>
>> On Mon, Nov 23, 2009 at 9:34 PM, rgheck  wrote:
>> > On 11/23/2009 02:05 PM, Liviu Andronic wrote:
>> >> If I am not mistaking, symbolic calculations can be performed in LyX
>> >> via maxima, octave, etc.
>> >>
>> > I don't know how current the support is, but yes, there are routines in
>> > mathed that support exporting to these sorts of formats: Mathematica, too.
>> > So some work may need to be done, but we don't see a lot of requests for
>> > this kind of thing. I haven't seen anyone working on it since I've been
>> > involved in LyX.
>> >
>> One of the reasons for so few requests could be that the nifty feature
>> is so well hidden. Other than not being mentioned on the features page
>> [1], I couldn't find info on CAS (maxima and the likes) in any of the
>> possible documentation files, from Introduction through Math. Even the
>> feature-poll page contains a non-greened-out request for CAS [2]. In
>> the GUI, it is not much simpler. After having written a math
>> expression (say, 'x+x'), right-clicking on the math env will not show
>> anything CAS-related, while the math toolbars do not propose anything
>> obvious.
>>
>> Thus, to discover the CAS support in LyX a user would need to go the
>> sometimes improbable way of writing in math env and, while there,
>> accessing the Edit > Math > Use CAS menu. Of course, an alternative
>> path would be Google.
>
> The current CAS support in LyX is a toy, no more. Really. There is not
> enough flesh to justify documentation. It would not take lot of effort
> to make it work considerably better, but seemingly there was not enough
> interest in the last six or eight years to make that happen.
>
> Andre'
>



-- 
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
__


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Ken
2009/11/24 Ken :
> 2009/11/24 Andre Poenitz :
>> The current CAS support in LyX is a toy, no more. Really. There is not
>> enough flesh to justify documentation. It would not take lot of effort
>> to make it work considerably better, but seemingly there was not enough
>> interest in the last six or eight years to make that happen.
>>
>> Andre'

It does appear to be quite simple in its capabilities and not able to
handle even moderately complex formulas (exp(2)*exp(3)) in either
octave or maxima.  But if it were a more prominent tool in the LyX
interface then perhaps it would get the attention (and bug/devel
requests) needed to make it something that could compete with MuPad.


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Pavel Sanda
Ken wrote:
> It does appear to be quite simple in its capabilities and not able to
> handle even moderately complex formulas (exp(2)*exp(3)) in either

works here with maxima
pavel


Re: CAS exposure in LyX (was Re: Importing Lyx files in SWP)

2009-11-24 Thread Enrico Forestieri
Ken writes:

> It does appear to be quite simple in its capabilities and not able to
> handle even moderately complex formulas (exp(2)*exp(3)) in either
> octave or maxima.

Note that if you type exp(2) literally, LyX has to use some heuristics in
order to know what you meant. Actually, it interprets "exp(2)" as "ex p(2)",
i.e., "e" times "x" times "p(2)". You can help interpretation in several ways.

1. use \mathrm to tell LyX what the function name is:
   \mathrm{exp}(2)*\mathrm{exp}(3)

2. use a small space to separate the argument of the function:
   exp\,(2)*exp\,(3)

3. use the LaTeX function names:
   \exp(2)*\exp(3)

4. use standard math:
   e^2*e^3

Nevertheless, this could be improved, of course, but heuristics can always
fail. That said, failure or success also depends on the CAS used. Your
particular example (without the corrective steps outlined above) works with
both octave and maxima, but fails with Mathematica (I don't know what happens
with maple).

-- 
Enrico