Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Paola Manzini
On 19 Oct 2016, at 10:40, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 19.10.2016 um 10:30 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:
YAY!!! it works Stephan, thank you ever so much, you have been so very patient, 
never been so happy to discover that 3+2=5 :-)
Presumably I would have to repeat the same procedure to create wrappers for 
mathematica and maple?

Yes, this should work in principle. I don’t have these tools - the point is:
you have to wrap the command line utility you can use in terminal.
But care for Kornels advice below.

e.g.:
#!/bin/
sh

/Applications/Mathematica.app/Contents/MacOS/MathKernel "$@„

The first line „#!/bin/sh“ is another ritual were you shouldn’t be
creative :) Don’t break it into multiple lines.

The exec in front of the command line utility is again for efficiency.
The shell process created by LyX to start the CAS utility will be
replaced by the CAS utility instead of creating another child process.


for mathematica and
#!/bin/
sh

/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"

Again, a million thanks!
Paola

You’re welcome.

Am 19.10.2016 um 10:51 schrieb Kornel Benko 
mailto:kor...@lyx.org>>:

Am Mittwoch, 19. Oktober 2016 um 08:30:53, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...
for mathematica and
#!/bin/sh
/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"


I don't believe this is possible. At least I'd expect
#!/bin/sh
"/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18" "$@"

Kornel

Yes, Kornel, you’re right. The spaces in path name need quotes.
In case of maxima it was not required to quote the path name because
it doesn’t contain spaces.

Regards,
Stephan


Stepha, Kornel, Murat, thank you all, it does work, at least for Mathematica, 
still playing around with Maple, for which I haven’t figured out where the 
kernel is yet (and Murat, I do not have that directory on my system.

For future reference, what I did was repeat exactly the same steps to create a 
file called “math” in $HOME/bin (for some reason it did not work with 
“mathematica” as file name), using the commands below in a terminal window:

cat - > $HOME/bin/mathematica < in the terminal window, the other 
two by $ - this is for the technically challenged like me out there.

Again, thank you all!

paola







Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Murat Yildizoglu
Maple works in my case, by adding

/Library/Frameworks/Maple.framework/Versions/17/bin

in the Path field of Lyx
The support is very elementary, but I can do 1+1=2 :-) using the evalf
function in the menu for Maple in Lyx

2016-10-19 11:40 GMT+02:00 Stephan Witt :

> Am 19.10.2016 um 10:30 schrieb Paola Manzini :
> > YAY!!! it works Stephan, thank you ever so much, you have been so very
> patient, never been so happy to discover that 3+2=5 :-)
> > Presumably I would have to repeat the same procedure to create wrappers
> for mathematica and maple?
>
> Yes, this should work in principle. I don’t have these tools - the point
> is:
> you have to wrap the command line utility you can use in terminal.
> But care for Kornels advice below.
>
> > e.g.:
> > #!/bin/
> > sh
> >
> > /Applications/Mathematica.app/Contents/MacOS/MathKernel "$@„
>
> The first line „#!/bin/sh“ is another ritual were you shouldn’t be
> creative :) Don’t break it into multiple lines.
>
> The exec in front of the command line utility is again for efficiency.
> The shell process created by LyX to start the CAS utility will be
> replaced by the CAS utility instead of creating another child process.
>
> >
> > for mathematica and
> > #!/bin/
> > sh
> >
> > /Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"
> >
> > Again, a million thanks!
> > Paola
>
> You’re welcome.
>
> Am 19.10.2016 um 10:51 schrieb Kornel Benko :
> >
> > Am Mittwoch, 19. Oktober 2016 um 08:30:53, schrieb Paola Manzini <
> pm...@st-andrews.ac.uk>
> > ...
> >> for mathematica and
> >> #!/bin/sh
> >> /Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"
> >>
> >
> > I don't believe this is possible. At least I'd expect
> >   #!/bin/sh
> >"/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18" "$@"
> >
> >   Kornel
>
> Yes, Kornel, you’re right. The spaces in path name need quotes.
> In case of maxima it was not required to quote the path name because
> it doesn’t contain spaces.
>
> Regards,
> Stephan




-- 
Prof. Murat Yildizoglu

Note: Please use the following address as such

UNIVERSITE DE BORDEAUX
GREThA (UMR CNRS 5113)
MURAT YILDIZOGLU
16 AVENUE LEON DUGUIT
CS 50057
33608 PESSAC CEDEX
FRANCE

Bureau : E-331

mail: murat.yildizoglu at u-bordeaux.fr

web: www.yildizoglu.fr


Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Stephan Witt
Am 19.10.2016 um 10:30 schrieb Paola Manzini :
> YAY!!! it works Stephan, thank you ever so much, you have been so very 
> patient, never been so happy to discover that 3+2=5 :-)
> Presumably I would have to repeat the same procedure to create wrappers for 
> mathematica and maple?

Yes, this should work in principle. I don’t have these tools - the point is:
you have to wrap the command line utility you can use in terminal.
But care for Kornels advice below.

> e.g.:
> #!/bin/
> sh
> 
> /Applications/Mathematica.app/Contents/MacOS/MathKernel "$@„

The first line „#!/bin/sh“ is another ritual were you shouldn’t be
creative :) Don’t break it into multiple lines.

The exec in front of the command line utility is again for efficiency.
The shell process created by LyX to start the CAS utility will be
replaced by the CAS utility instead of creating another child process.
 
> 
> for mathematica and 
> #!/bin/
> sh
> 
> /Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"
> 
> Again, a million thanks!
> Paola

You’re welcome.

Am 19.10.2016 um 10:51 schrieb Kornel Benko :
> 
> Am Mittwoch, 19. Oktober 2016 um 08:30:53, schrieb Paola Manzini 
> 
> ...
>> for mathematica and 
>> #!/bin/sh
>> /Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"
>> 
> 
> I don't believe this is possible. At least I'd expect
>   #!/bin/sh
>"/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18" "$@"
> 
>   Kornel

Yes, Kornel, you’re right. The spaces in path name need quotes.
In case of maxima it was not required to quote the path name because
it doesn’t contain spaces.

Regards,
Stephan

Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Kornel Benko
Am Mittwoch, 19. Oktober 2016 um 08:30:53, schrieb Paola Manzini 

...
> for mathematica and 
> #!/bin/sh
> /Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"
> 

I don't believe this is possible. At least I'd expect
#!/bin/sh
 "/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18" "$@"

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Paola Manzini

On 19 Oct 2016, at 09:00, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 19.10.2016 um 09:54 schrieb Stephan Witt 
mailto:st.w...@gmx.net>>:

Am 19.10.2016 um 08:45 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:

On 19 Oct 2016, at 07:43, Paola Manzini 
mailto:pm...@st-andrews.ac.uk>> wrote:


On 18 Oct 2016, at 21:28, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 18:45 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 16:49, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

hi Stephan, thanks for the scissor tip, will never look at 8< the same way 
again :-)
I’ve followed all your steps, but sadly still nothing has changed - tough maybe 
I have erred somewhere? Here is what I did:
First of all I created the wrapper file, and put it in HOME\bin, which I had 
already created following your instructions.
Then I’ve run
$ cat $HOME/bin/maxima
in the terminal window, and got the two lines of the new “wrapper” file.
Then put both ~/bin and HOME/bin in the LyX path for good measure, reconfigured 
LyX, closed Lyx and relaunched it, and again, it does not work.
So I thought maybe I should also have run the last two of the three other lines 
of code to be run in the terminal. Did that, but as you can see from the 
attachment after running that command I do not get a “$” sign, but a “>” as 
terminal prompt. Maybe this is the problem?
Thanks for your patience!

No problem. Simply type the 2 lines, cat is awaiting input.
To end the input you have to enter EOF, probably it is control+D.

Kornel

thanks Kornel (and Stephan), but now the result is that the maxima wrapper has 
been overwritten by empty lines!
So just to recap what I’ve done:
1. created the wrapper file, called it maxima, put it in HOME/bin, and checked 
it is there with the correct content by running the command “$ cat 
$HOME/bin/maxima” (no quotes) in the terminal window; I can also see the file 
in finder
2. run the three commands in the terminal window, where after the second line I 
had to use ctrl D to signal end of file
as a result, the “maxima” file has become an empty file (indeed, running “$ cat 
$HOME/bin/maxima” in the terminal window returns empty lines.
No change in behaviour in Lyx. If it helps, I have also Maple and Mathematica 
installed on my machine, but no luck invoking them from LyX either.
screenshot of terminal window is attached in case it is of any help.
Above all, thanks for taking the time with this.
paola


Hi Paola,

I tried to be as verbose as I can - but it was too terse, sorry.

Two points:
1. The dollar sign in front of my command line text shouldn’t be typed.
It’s usual to mark text input as terminal input.
2. The EOF marker is an arbitrary text and should have been typed as given.

I’ll attach a screen shot of a my terminal session to prepared the wrapper 
script.

Finally the correct PATH extension in LyX settings is important.
Either it should be „$HOME/bin“ or „~/bin“ - having both does not harm
but it slightly reduces the startup speed of every external script.

Regards,
Stephan




Dear Stephan,
thanks so much for the time you are taking on this, and apologies for being 
slow! I have tried following exactly what you did, but there seems to be a 
problem when I get to “which maxima” - I get an empty line. On the other hand, 
the
cat $HOME/bin/maxima
does return the contents of the file, and I do see a newly created maxima file 
in the “bin” folder (in finder) - maybe my system is missing some other 
component?
Again, many thanks,
Paola
p.s.
screenshot attached


Dear Paola,

no problem, we’re almost there.

Sorry, I forgot to adjust the PATH setting in terminal.
I have $HOME/bin already in PATH in terminal.
This is not standard, obviously - so let’s add it for the test :)
This is the equivalent of adding $HOME/bin to LyX PATH settings.

See the screenshot.

Regards,
Stephan

Oops, the screenshot… the blue text is my keyboard input.




YAY!!! it works Stephan, thank you ever so much, you have been so very patient, 
never been so happy to discover that 3+2=5 :-)

Presumably I would have to repeat the same procedure to create wrappers for 
mathematica and maple? e.g.:

#!/bin/sh
/Applications/Mathematica.app/Contents/MacOS/MathKernel "$@"

for mathematica and

#!/bin/sh
/Applications/Maple 18/Maple 18.app/Contents/MacOS/Maple 18 "$@"


Again, a million thanks!

Paola



Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Stephan Witt
Am 19.10.2016 um 09:54 schrieb Stephan Witt :
> 
> Am 19.10.2016 um 08:45 schrieb Paola Manzini :
>> 
>> On 19 Oct 2016, at 07:43, Paola Manzini  wrote:
>>> 
>>> 
 On 18 Oct 2016, at 21:28, Stephan Witt  wrote:
 
 Am 18.10.2016 um 18:45 schrieb Paola Manzini :
> 
> 
>> On 18 Oct 2016, at 16:49, Kornel Benko  wrote:
>> 
>> Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 
>> 
>> ...
>> 
>>> hi Stephan, thanks for the scissor tip, will never look at 8< the same 
>>> way again :-)
>>> I’ve followed all your steps, but sadly still nothing has changed - 
>>> tough maybe I have erred somewhere? Here is what I did: 
>>> First of all I created the wrapper file, and put it in HOME\bin, which 
>>> I had already created following your instructions.
>>> Then I’ve run 
>>> $ cat $HOME/bin/maxima
>>> in the terminal window, and got the two lines of the new “wrapper” 
>>> file. 
>>> Then put both ~/bin and HOME/bin in the LyX path for good measure, 
>>> reconfigured LyX, closed Lyx and relaunched it, and again, it does not 
>>> work.
>>> So I thought maybe I should also have run the last two of the three 
>>> other lines of code to be run in the terminal. Did that, but as you can 
>>> see from the attachment after running that command I do not get a “$” 
>>> sign, but a “>” as terminal prompt. Maybe this is the problem?
>>> Thanks for your patience!
>> 
>> No problem. Simply type the 2 lines, cat is awaiting input.
>> To end the input you have to enter EOF, probably it is control+D.
>> 
>> Kornel
> 
> thanks Kornel (and Stephan), but now the result is that the maxima 
> wrapper has been overwritten by empty lines!
> So just to recap what I’ve done:
> 1. created the wrapper file, called it maxima, put it in HOME/bin, and 
> checked it is there with the correct content by running the command “$ 
> cat $HOME/bin/maxima” (no quotes) in the terminal window; I can also see 
> the file in finder
> 2. run the three commands in the terminal window, where after the second 
> line I had to use ctrl D to signal end of file
> as a result, the “maxima” file has become an empty file (indeed, running 
> “$ cat $HOME/bin/maxima” in the terminal window returns empty lines.
> No change in behaviour in Lyx. If it helps, I have also Maple and 
> Mathematica installed on my machine, but no luck invoking them from LyX 
> either.
> screenshot of terminal window is attached in case it is of any help.
> Above all, thanks for taking the time with this.
> paola
> 
 
 Hi Paola,
 
 I tried to be as verbose as I can - but it was too terse, sorry.
 
 Two points: 
 1. The dollar sign in front of my command line text shouldn’t be typed.
 It’s usual to mark text input as terminal input.
 2. The EOF marker is an arbitrary text and should have been typed as given.
 
 I’ll attach a screen shot of a my terminal session to prepared the wrapper 
 script.
 
 Finally the correct PATH extension in LyX settings is important.
 Either it should be „$HOME/bin“ or „~/bin“ - having both does not harm
 but it slightly reduces the startup speed of every external script.
 
 Regards,
 Stephan
 
 
 
>>> 
>>> Dear Stephan,
>>> thanks so much for the time you are taking on this, and apologies for being 
>>> slow! I have tried following exactly what you did, but there seems to be a 
>>> problem when I get to “which maxima” - I get an empty line. On the other 
>>> hand, the
>>> cat $HOME/bin/maxima
>>> does return the contents of the file, and I do see a newly created maxima 
>>> file in the “bin” folder (in finder) - maybe my system is missing some 
>>> other component?
>>> Again, many thanks,
>>> Paola
>> p.s.
>> screenshot attached
>> 
> 
> Dear Paola,
> 
> no problem, we’re almost there.
> 
> Sorry, I forgot to adjust the PATH setting in terminal.
> I have $HOME/bin already in PATH in terminal.
> This is not standard, obviously - so let’s add it for the test :)
> This is the equivalent of adding $HOME/bin to LyX PATH settings.
> 
> See the screenshot.
> 
> Regards,
> Stephan

Oops, the screenshot… the blue text is my keyboard input.



Re: making LyX work with CAS on Mac OS

2016-10-19 Thread Stephan Witt
Am 19.10.2016 um 08:45 schrieb Paola Manzini :
> 
> On 19 Oct 2016, at 07:43, Paola Manzini  wrote:
>> 
>> 
>>> On 18 Oct 2016, at 21:28, Stephan Witt  wrote:
>>> 
>>> Am 18.10.2016 um 18:45 schrieb Paola Manzini :
 
 
> On 18 Oct 2016, at 16:49, Kornel Benko  wrote:
> 
> Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 
> 
> ...
> 
>> hi Stephan, thanks for the scissor tip, will never look at 8< the same 
>> way again :-)
>> I’ve followed all your steps, but sadly still nothing has changed - 
>> tough maybe I have erred somewhere? Here is what I did: 
>> First of all I created the wrapper file, and put it in HOME\bin, which I 
>> had already created following your instructions.
>> Then I’ve run 
>> $ cat $HOME/bin/maxima
>> in the terminal window, and got the two lines of the new “wrapper” file. 
>> Then put both ~/bin and HOME/bin in the LyX path for good measure, 
>> reconfigured LyX, closed Lyx and relaunched it, and again, it does not 
>> work.
>> So I thought maybe I should also have run the last two of the three 
>> other lines of code to be run in the terminal. Did that, but as you can 
>> see from the attachment after running that command I do not get a “$” 
>> sign, but a “>” as terminal prompt. Maybe this is the problem?
>> Thanks for your patience!
> 
> No problem. Simply type the 2 lines, cat is awaiting input.
> To end the input you have to enter EOF, probably it is control+D.
> 
> Kornel
 
 thanks Kornel (and Stephan), but now the result is that the maxima wrapper 
 has been overwritten by empty lines!
 So just to recap what I’ve done:
 1. created the wrapper file, called it maxima, put it in HOME/bin, and 
 checked it is there with the correct content by running the command “$ cat 
 $HOME/bin/maxima” (no quotes) in the terminal window; I can also see the 
 file in finder
 2. run the three commands in the terminal window, where after the second 
 line I had to use ctrl D to signal end of file
 as a result, the “maxima” file has become an empty file (indeed, running 
 “$ cat $HOME/bin/maxima” in the terminal window returns empty lines.
 No change in behaviour in Lyx. If it helps, I have also Maple and 
 Mathematica installed on my machine, but no luck invoking them from LyX 
 either.
 screenshot of terminal window is attached in case it is of any help.
 Above all, thanks for taking the time with this.
 paola
 
>>> 
>>> Hi Paola,
>>> 
>>> I tried to be as verbose as I can - but it was too terse, sorry.
>>> 
>>> Two points: 
>>> 1. The dollar sign in front of my command line text shouldn’t be typed.
>>> It’s usual to mark text input as terminal input.
>>> 2. The EOF marker is an arbitrary text and should have been typed as given.
>>> 
>>> I’ll attach a screen shot of a my terminal session to prepared the wrapper 
>>> script.
>>> 
>>> Finally the correct PATH extension in LyX settings is important.
>>> Either it should be „$HOME/bin“ or „~/bin“ - having both does not harm
>>> but it slightly reduces the startup speed of every external script.
>>> 
>>> Regards,
>>> Stephan
>>> 
>>> 
>>> 
>> 
>> Dear Stephan,
>> thanks so much for the time you are taking on this, and apologies for being 
>> slow! I have tried following exactly what you did, but there seems to be a 
>> problem when I get to “which maxima” - I get an empty line. On the other 
>> hand, the
>> cat $HOME/bin/maxima
>> does return the contents of the file, and I do see a newly created maxima 
>> file in the “bin” folder (in finder) - maybe my system is missing some other 
>> component?
>> Again, many thanks,
>> Paola
> p.s.
> screenshot attached
> 

Dear Paola,

no problem, we’re almost there.

Sorry, I forgot to adjust the PATH setting in terminal.
I have $HOME/bin already in PATH in terminal.
This is not standard, obviously - so let’s add it for the test :)
This is the equivalent of adding $HOME/bin to LyX PATH settings.

See the screenshot.

Regards,
Stephan

Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 21:28, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 18:45 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 16:49, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

hi Stephan, thanks for the scissor tip, will never look at 8< the same way 
again :-)
I’ve followed all your steps, but sadly still nothing has changed - tough maybe 
I have erred somewhere? Here is what I did:
First of all I created the wrapper file, and put it in HOME\bin, which I had 
already created following your instructions.
Then I’ve run
$ cat $HOME/bin/maxima
in the terminal window, and got the two lines of the new “wrapper” file.
Then put both ~/bin and HOME/bin in the LyX path for good measure, reconfigured 
LyX, closed Lyx and relaunched it, and again, it does not work.
So I thought maybe I should also have run the last two of the three other lines 
of code to be run in the terminal. Did that, but as you can see from the 
attachment after running that command I do not get a “$” sign, but a “>” as 
terminal prompt. Maybe this is the problem?
Thanks for your patience!

No problem. Simply type the 2 lines, cat is awaiting input.
To end the input you have to enter EOF, probably it is control+D.

Kornel

thanks Kornel (and Stephan), but now the result is that the maxima wrapper has 
been overwritten by empty lines!
So just to recap what I’ve done:
1. created the wrapper file, called it maxima, put it in HOME/bin, and checked 
it is there with the correct content by running the command “$ cat 
$HOME/bin/maxima” (no quotes) in the terminal window; I can also see the file 
in finder
2. run the three commands in the terminal window, where after the second line I 
had to use ctrl D to signal end of file
as a result, the “maxima” file has become an empty file (indeed, running “$ cat 
$HOME/bin/maxima” in the terminal window returns empty lines.
No change in behaviour in Lyx. If it helps, I have also Maple and Mathematica 
installed on my machine, but no luck invoking them from LyX either.
screenshot of terminal window is attached in case it is of any help.
Above all, thanks for taking the time with this.
paola


Hi Paola,

I tried to be as verbose as I can - but it was too terse, sorry.

Two points:
1. The dollar sign in front of my command line text shouldn’t be typed.
It’s usual to mark text input as terminal input.
2. The EOF marker is an arbitrary text and should have been typed as given.

I’ll attach a screen shot of a my terminal session to prepared the wrapper 
script.

Finally the correct PATH extension in LyX settings is important.
Either it should be „$HOME/bin“ or „~/bin“ - having both does not harm
but it slightly reduces the startup speed of every external script.

Regards,
Stephan





Dear Stephan,

thanks so much for the time you are taking on this, and apologies for being 
slow! I have tried following exactly what you did, but there seems to be a 
problem when I get to “which maxima” - I get an empty line. On the other hand, 
the

cat $HOME/bin/maxima
does return the contents of the file, and I do see a newly created maxima file 
in the “bin” folder (in finder) - maybe my system is missing some other 
component?

Again, many thanks,

Paola





Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 16:49, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

hi Stephan, thanks for the scissor tip, will never look at 8< the same way 
again :-)
I’ve followed all your steps, but sadly still nothing has changed - tough maybe 
I have erred somewhere? Here is what I did:
First of all I created the wrapper file, and put it in HOME\bin, which I had 
already created following your instructions.
Then I’ve run
$ cat $HOME/bin/maxima
in the terminal window, and got the two lines of the new “wrapper” file.
Then put both ~/bin and HOME/bin in the LyX path for good measure, reconfigured 
LyX, closed Lyx and relaunched it, and again, it does not work.
So I thought maybe I should also have run the last two of the three other lines 
of code to be run in the terminal. Did that, but as you can see from the 
attachment after running that command I do not get a “$” sign, but a “>” as 
terminal prompt. Maybe this is the problem?
Thanks for your patience!

No problem. Simply type the 2 lines, cat is awaiting input.
To end the input you have to enter EOF, probably it is control+D.

Kornel


thanks Kornel (and Stephan), but now the result is that the maxima wrapper has 
been overwritten by empty lines!

So just to recap what I’ve done:

1. created the wrapper file, called it maxima, put it in HOME/bin, and checked 
it is there with the correct content by running the command “$ cat 
$HOME/bin/maxima” (no quotes) in the terminal window; I can also see the file 
in finder

2. run the three commands in the terminal window, where after the second line I 
had to use ctrl D to signal end of file

as a result, the “maxima” file has become an empty file (indeed, running “$ cat 
$HOME/bin/maxima” in the terminal window returns empty lines.

No change in behaviour in Lyx. If it helps, I have also Maple and Mathematica 
installed on my machine, but no luck invoking them from LyX either.

screenshot of terminal window is attached in case it is of any help.

Above all, thanks for taking the time with this.

paola

[cid:ABC794F1-941E-48D6-BAAB-68EE6CA2F1D2]




Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Kornel Benko
Am Dienstag, 18. Oktober 2016 um 15:32:08, schrieb Paola Manzini 

...

> hi Stephan, thanks for the scissor tip, will never look at 8< the same way 
> again :-)
> I’ve followed all your steps, but sadly still nothing has changed - tough 
> maybe I have erred somewhere? Here is what I did: 
> First of all I created the wrapper file, and put it in HOME\bin, which I had 
> already created following your instructions.
> Then I’ve run 
> $ cat $HOME/bin/maxima
> in the terminal window, and got the two lines of the new “wrapper” file. 
> Then put both ~/bin and HOME/bin in the LyX path for good measure, 
> reconfigured LyX, closed Lyx and relaunched it, and again, it does not work.
> So I thought maybe I should also have run the last two of the three other 
> lines of code to be run in the terminal. Did that, but as you can see from 
> the attachment after running that command I do not get a “$” sign, but a “>” 
> as terminal prompt. Maybe this is the problem?
> Thanks for your patience!

No problem. Simply type the 2 lines, cat is awaiting input.
To end the input you have to enter EOF, probably it is control+D.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 15:03, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 15:41 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 13:41, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 13:58 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 12:33, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

Hi all,

I’ve searched the list and though this is not the first time the problem
is
noted, I haven’t been able to find any solution. The short of it is: it
just won’t work. So for instance if I type “5+2” then invoke
Edit/Math/CAS,
I only get a lonely = side to the right of the expression, and no result
(see screenshot)>

...

What happens if you call maxima from the console window and input the
string '(5+2);' followed by ? Here I get:
(%i1) (5+2);
(%o1)  7
(%i2)


...

from the console I get the same as you:

 (%i2) 5+2;
 (%o2)  7
 (%i3)

It should work. Do you have the same PATH settings on console?
Note, that I am not on MAC, so only guessing.

Kornel

I know it should work, which is why it is sooo frustrating! I cannot see any 
path settings in the Terminal, but I have put in lyX the same address as the 
one invoked for Maxima run from a terminal window, and still no joy!

The problem is that LyX contains the call of the external utility as hard-coded 
string and it is „maxima“.

The only solution I can see is to wrap the wrapper script „maxima.sh“ located 
inside the Maxima.app bundle
with a utility script like the following code (I cannot attach it - every virus 
checker will block the transport):
=== 8< snip here >8 ===
#!/bin/sh
exec /Applications/Maxima.app/Contents/Resources/maxima.sh "$@"
=== 8< snip here >8 ===

In terminal you may do this:
$ mkdir -p $HOME/bin
$ cat - > $HOME/bin/maxima < means joining the two “8”?
thanks!

1. You need to create the wrapper first and may try it (after creating it) in 
terminal by typing "$HOME/bin/maxima“
2. The wrapper should be placed in folder $HOME/bin (which is created first in 
case it doesn’t exist already by „mkdir“)
3. The snip surrounded two lines is the contents of the wrapper script - „8<" 
and „>8" are the two scissors :)

To explain the terminal commands:
The first terminal command is ensuring the existence of the folder „$HOME/bin“.
The second one (starting with „cat“ and ending with EOF) is one the way to 
create the wrapper script without any editor.
The third command is making your new wrapper script executable.

The 2nd command needs to be entered exactly as you see it.

You can verify what you did by using the terminal command:


It should give you the 2-line-script between the lines surrounded by the 
scissors.

The problem why you has to do it yourself is: I cannot send you any shell 
script.
No virus scanner will let it through. It doesn’t matter if it is useful or not.

Regards,
Stephan


hi Stephan, thanks for the scissor tip, will never look at 8< the same way 
again :-)

I’ve followed all your steps, but sadly still nothing has changed - tough maybe 
I have erred somewhere? Here is what I did:

First of all I created the wrapper file, and put it in HOME\bin, which I had 
already created following your instructions.

Then I’ve run

$ cat $HOME/bin/maxima
in the terminal window, and got the two lines of the new “wrapper” file.

Then put both ~/bin and HOME/bin in the LyX path for good measure, reconfigured 
LyX, closed Lyx and relaunched it, and again, it does not work.

So I thought maybe I should also have run the last two of the three other lines 
of code to be run in the terminal. Did that, but as you can see from the 
attachment after running that command I do not get a “$” sign, but a “>” as 
terminal prompt. Maybe this is the problem?

Thanks for your patience!

[cid:8A192AE1-9B99-4D85-AA95-710AAD5B3990@st-andrews.ac.uk]




Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Stephan Witt
Am 18.10.2016 um 15:41 schrieb Paola Manzini :
> 
> 
>> On 18 Oct 2016, at 13:41, Stephan Witt  wrote:
>> 
>> Am 18.10.2016 um 13:58 schrieb Paola Manzini :
>>> 
>>> 
 On 18 Oct 2016, at 12:33, Kornel Benko  wrote:
 
 Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 
 
 ...
 
>>> Hi all,
>>> 
>>> I’ve searched the list and though this is not the first time the problem
>>> is
>>> noted, I haven’t been able to find any solution. The short of it is: it
>>> just won’t work. So for instance if I type “5+2” then invoke
>>> Edit/Math/CAS,
>>> I only get a lonely = side to the right of the expression, and no result
>>> (see screenshot)>
 
 ...
 
>> What happens if you call maxima from the console window and input the
>> string '(5+2);' followed by ? Here I get:
>> (%i1) (5+2);
>> (%o1)  7
>> (%i2)
>> 
 
 ...
 
> from the console I get the same as you:
> 
>   (%i2) 5+2;
>   (%o2)  7
>   (%i3)
 
 It should work. Do you have the same PATH settings on console?
 Note, that I am not on MAC, so only guessing.
 
 Kornel
>>> 
>>> I know it should work, which is why it is sooo frustrating! I cannot see 
>>> any path settings in the Terminal, but I have put in lyX the same address 
>>> as the one invoked for Maxima run from a terminal window, and still no joy!
>> 
>> The problem is that LyX contains the call of the external utility as 
>> hard-coded string and it is „maxima“.
>> 
>> The only solution I can see is to wrap the wrapper script „maxima.sh“ 
>> located inside the Maxima.app bundle
>> with a utility script like the following code (I cannot attach it - every 
>> virus checker will block the transport):
>> === 8< snip here >8 ===
>> #!/bin/sh
>> exec /Applications/Maxima.app/Contents/Resources/maxima.sh "$@"
>> === 8< snip here >8 ===
>> 
>> In terminal you may do this:
>> $ mkdir -p $HOME/bin
>> $ cat - > $HOME/bin/maxima <> #!/bin/sh
>> exec /Applications/Maxima.app/Contents/Resources/maxima.sh "\$@"
>> EOF
>> $ chmod +x $HOME/bin/maxima
>> 
>> Then verify that "$HOME/bin“ is in LyX’s configured PATH - either as written 
>> or as "~/bin".
>> 
>> Then it should work.
>> 
>> Regards,
>> Stephan
>> 
>> PS: Be careful with the quotation marks and the backslash. They’re essential.
>> 
> 
> many thanks Stephan, I’ll try, but as I am as far from a techie as you can 
> imagine, some questions for you: 
> 1. are these two alternative methods, or do I need first to create the 
> wrapper, then run from the terminal? 
> 2. where should I save the wrapper, and with what name?
> 3. the  means joining the two “8”?
> thanks!

1. You need to create the wrapper first and may try it (after creating it) in 
terminal by typing "$HOME/bin/maxima“
2. The wrapper should be placed in folder $HOME/bin (which is created first in 
case it doesn’t exist already by „mkdir“)
3. The snip surrounded two lines is the contents of the wrapper script - „8<" 
and „>8" are the two scissors :)

To explain the terminal commands:
The first terminal command is ensuring the existence of the folder „$HOME/bin“.
The second one (starting with „cat“ and ending with EOF) is one the way to 
create the wrapper script without any editor.
The third command is making your new wrapper script executable.

The 2nd command needs to be entered exactly as you see it.

You can verify what you did by using the terminal command:
$ cat $HOME/bin/maxima

It should give you the 2-line-script between the lines surrounded by the 
scissors.

The problem why you has to do it yourself is: I cannot send you any shell 
script.
No virus scanner will let it through. It doesn’t matter if it is useful or not.

Regards,
Stephan

Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 13:41, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 13:58 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 12:33, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

Hi all,

I’ve searched the list and though this is not the first time the problem
is
noted, I haven’t been able to find any solution. The short of it is: it
just won’t work. So for instance if I type “5+2” then invoke
Edit/Math/CAS,
I only get a lonely = side to the right of the expression, and no result
(see screenshot)>

...

What happens if you call maxima from the console window and input the
string '(5+2);' followed by ? Here I get:
(%i1) (5+2);
(%o1)  7
(%i2)


...

from the console I get the same as you:

  (%i2) 5+2;
  (%o2)  7
  (%i3)

It should work. Do you have the same PATH settings on console?
Note, that I am not on MAC, so only guessing.

Kornel

I know it should work, which is why it is sooo frustrating! I cannot see any 
path settings in the Terminal, but I have put in lyX the same address as the 
one invoked for Maxima run from a terminal window, and still no joy!

The problem is that LyX contains the call of the external utility as hard-coded 
string and it is „maxima“.

The only solution I can see is to wrap the wrapper script „maxima.sh“ located 
inside the Maxima.app bundle
with a utility script like the following code (I cannot attach it - every virus 
checker will block the transport):
=== 8< snip here >8 ===
#!/bin/sh
exec /Applications/Maxima.app/Contents/Resources/maxima.sh "$@"
=== 8< snip here >8 ===

In terminal you may do this:
$ mkdir -p $HOME/bin
$ cat - > $HOME/bin/maxima < means joining the two “8”?

thanks!

paola






Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Stephan Witt
Am 18.10.2016 um 13:58 schrieb Paola Manzini :
> 
> 
>> On 18 Oct 2016, at 12:33, Kornel Benko  wrote:
>> 
>> Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 
>> 
>> ...
>> 
> Hi all,
> 
> I’ve searched the list and though this is not the first time the problem
> is
> noted, I haven’t been able to find any solution. The short of it is: it
> just won’t work. So for instance if I type “5+2” then invoke
> Edit/Math/CAS,
> I only get a lonely = side to the right of the expression, and no result
> (see screenshot)>
>> 
>> ...
>> 
 What happens if you call maxima from the console window and input the
 string '(5+2);' followed by ? Here I get:
 (%i1) (5+2);
 (%o1)  7
 (%i2)
 
>> 
>> ...
>> 
>>> from the console I get the same as you:
>>> 
>>>(%i2) 5+2;
>>>(%o2)  7
>>>(%i3)
>> 
>> It should work. Do you have the same PATH settings on console?
>> Note, that I am not on MAC, so only guessing.
>> 
>> Kornel
> 
> I know it should work, which is why it is sooo frustrating! I cannot see any 
> path settings in the Terminal, but I have put in lyX the same address as the 
> one invoked for Maxima run from a terminal window, and still no joy!

The problem is that LyX contains the call of the external utility as hard-coded 
string and it is „maxima“.

The only solution I can see is to wrap the wrapper script „maxima.sh“ located 
inside the Maxima.app bundle
with a utility script like the following code (I cannot attach it - every virus 
checker will block the transport):
=== 8< snip here >8 ===
#!/bin/sh
exec /Applications/Maxima.app/Contents/Resources/maxima.sh "$@"
=== 8< snip here >8 ===

In terminal you may do this:
$ mkdir -p $HOME/bin
$ cat - > $HOME/bin/maxima <

Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 12:33, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
...

Hi all,

I’ve searched the list and though this is not the first time the problem
is
noted, I haven’t been able to find any solution. The short of it is: it
just won’t work. So for instance if I type “5+2” then invoke
Edit/Math/CAS,
I only get a lonely = side to the right of the expression, and no result
(see screenshot)>

...

What happens if you call maxima from the console window and input the
string '(5+2);' followed by ? Here I get:
(%i1) (5+2);
(%o1)  7
(%i2)


...

from the console I get the same as you:

   (%i2) 5+2;
   (%o2)  7
   (%i3)

It should work. Do you have the same PATH settings on console?
Note, that I am not on MAC, so only guessing.

Kornel


I know it should work, which is why it is sooo frustrating! I cannot see any 
path settings in the Terminal, but I have put in lyX the same address as the 
one invoked for Maxima run from a terminal window, and still no joy!




Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Kornel Benko
Am Dienstag, 18. Oktober 2016 um 11:10:06, schrieb Paola Manzini 

...

> > > Hi all,
> > > 
> > > I’ve searched the list and though this is not the first time the problem
> > > is
> > > noted, I haven’t been able to find any solution. The short of it is: it
> > > just won’t work. So for instance if I type “5+2” then invoke
> > > Edit/Math/CAS,
> > > I only get a lonely = side to the right of the expression, and no result
> > > (see screenshot)>

...

> > What happens if you call maxima from the console window and input the
> > string '(5+2);' followed by ? Here I get:
> > (%i1) (5+2);
> > (%o1)  7
> > (%i2)
> > 

...

> from the console I get the same as you:
> 
> (%i2) 5+2;
> (%o2)  7
> (%i3)

It should work. Do you have the same PATH settings on console?
Note, that I am not on MAC, so only guessing.

Kornel


signature.asc
Description: This is a digitally signed message part.


Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 12:27, Stephan Witt 
mailto:st.w...@gmx.net>> wrote:

Am 18.10.2016 um 13:10 schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>:


On 18 Oct 2016, at 12:05, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
On 18 Oct 2016, at 11:39, Kornel Benko 
mailto:kor...@lyx.org>> wrote:

Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
Hi all,

I’ve searched the list and though this is not the first time the problem is 
noted, I haven’t been able to find any solution. The short of it is: it just 
won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
get a lonely = side to the right of the expression, and no result (see 
screenshot)

I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
problem under Maverick and El Capitan with previous Lyx versions, namely, 
nothing happens.

I have specified the paths correctly (I think) to where the apps are 
(Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
software calling the app (math-extern maxima), or (math-extern mathematica), 
but no result is churned out.

Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:

/Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
 18/Maple 18.app

Can anyone please help?

Many thanks,
Paola

[cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]


I'd try calling lyx with '-dbg mathed' parameter from a console window.
Alternatively use View->Messages Pane->Settings
Check 'Selected'
Double click on 'mathed - Math editor'
back to 'Output'
...
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'
Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
12:31:27.889: Automatický úklad hotový.

Here it shows:
12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking expr: 
'5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'

Kornel

many thanks Kornel for your prompt reply, I’ve tried what you suggested, and 
what I got is no output, namely:

11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole cell: 
checking expr: '5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);’

does this suggest where the problem is?

No, missing: output: '7'

What happens if you call maxima from the console window and input the string 
'(5+2);' followed by ?
Here I get:
(%i1) (5+2);
(%o1)  7
(%i2)

thanks,
Paola

Kornel

from the console I get the same as you:
(%i2) 5+2;
(%o2)  7
(%i3)

How did you call maxima in terminal?

I have it installed too and it looks like that:

$ ls -l /Applications/Maxima.app/Contents/Resources
total 480
-rw-r--r--@ 1 stephan  admin 577 22 Apr  2013 AppSettings.plist
-rw-r--r--@ 1 stephan  admin   27964 22 Apr  2013 MainMenu.nib
-rw-r--r--@ 1 stephan  admin  198769  4 Dez  2012 appIcon.icns
drwxr-xr-x@ 7 stephan  admin 238 22 Apr  2013 maxima
-rwxr-xr-x@ 1 stephan  admin 341 22 Apr  2013 maxima.sh
-rw-r--r--@ 1 stephan  admin1358 18 Nov  2012 script
-rwxr-xr-x@ 1 stephan  admin 409 22 Apr  2013 xmaxima.sh
$ /Applications/Maxima.app/Contents/Resources/maxima/bin/maxima
/Applications/Maxima.app/Contents/Resources/maxima/bin/maxima: line 199: exec: 
sbcl: not found
$ /Applications/Maxima.app/Contents/Resources/maxima.sh
Maxima 5.30.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.55.0-abb03f9
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)


It seems one has to start maxima.sh to get the command line interface. I’m not 
sure LyX knows it.
In any case one has to add "/Applications/Maxima.app/Contents/Resources“ to the 
PATH.

Stephan


thanks Stephan, I used “exec 
'/Applications/Maxima.app/Contents/Resources/maxima.sh’ “

although I also just launch the Maxima.app from the launcher. At any rate I 
have added your line to the path, reconfigured LyX, closed and reopened, but 
alas no change :-(




Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini
Le 18 oct. 2016 à 13:06 +0200, Kornel Benko 
mailto:kor...@lyx.org>>, a écrit :
Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>
On 18 Oct 2016, at 11:39, Kornel Benko 
mailto:kor...@lyx.org>> wrote:

Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>Preferences->Paths:

/Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
 18/Maple 18.app

Can anyone please help?

Many thanks,
Paola

[cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]


I'd try calling lyx with '-dbg mathed' parameter from a console window.
Alternatively use View->Messages Pane->Settings
Check 'Selected'
Double click on 'mathed - Math editor'
back to 'Output'
...
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'
Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
12:31:27.889: Automatický úklad hotový.

Here it shows:
12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking expr: 
'5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'

Kornel

many thanks Kornel for your prompt reply, I’ve tried what you suggested, and 
what I got is no output, namely:

11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole cell: 
checking expr: '5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);’

does this suggest where the problem is?

No, missing: output: '7'

What happens if you call maxima from the console window and input the string 
'(5+2);' followed by ?
Here I get:
(%i1) (5+2);
(%o1) 7
(%i2)

thanks,
Paola

Kornel


On 18 Oct 2016, at 12:13, Murat Yildizoglu 
mailto:myi...@gmail.com>> wrote:

Hi Kornelm
I think that yolu should point İnci'de the .app package, where the unix binary 
lives.
I do not have my laptop with me, but it could be the Macos folder in the app 
package (your .app file is in fact a bundle containing sub folders, and one of 
them contains the maxima binary

Prof. Murat Yildizoglu

thanks Murat, but that does not make a difference either, unfortunately, I just 
tried by adding

/Applications/Maxima.app/Contents/MacOS/Maxima

to the path, but the outcome is the same: just “5+2=“, but no output.


Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Stephan Witt
Am 18.10.2016 um 13:10 schrieb Paola Manzini :
> 
> 
>> On 18 Oct 2016, at 12:05, Kornel Benko  wrote:
>> 
>> Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 
>> 
>>> On 18 Oct 2016, at 11:39, Kornel Benko 
>>> mailto:kor...@lyx.org>> wrote:
>>> 
>>> Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
>>> mailto:pm...@st-andrews.ac.uk>>
>>> Hi all,
>>> 
>>> I’ve searched the list and though this is not the first time the problem is 
>>> noted, I haven’t been able to find any solution. The short of it is: it 
>>> just won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, 
>>> I only get a lonely = side to the right of the expression, and no result 
>>> (see screenshot)
>>> 
>>> I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the 
>>> same problem under Maverick and El Capitan with previous Lyx versions, 
>>> namely, nothing happens.
>>> 
>>> I have specified the paths correctly (I think) to where the apps are 
>>> (Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
>>> software calling the app (math-extern maxima), or (math-extern 
>>> mathematica), but no result is churned out.
>>> 
>>> Here is what I have in the "PATH prefix" field under 
>>> Lyx->Preferences->Paths:
>>> 
>>> /Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
>>>  18/Maple 18.app
>>> 
>>> Can anyone please help?
>>> 
>>> Many thanks,
>>> Paola
>>> 
>>> [cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]
>>> 
>>> 
>>> I'd try calling lyx with '-dbg mathed' parameter from a console window.
>>> Alternatively use View->Messages Pane->Settings
>>> Check 'Selected'
>>> Double click on 'mathed - Math editor'
>>> back to 'Output'
>>> ...
>>> calling: maxima
>>> input: 'simpsum:true;tex(5 + 2);'
>>> output: '7'
>>> Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
>>> 12:31:27.889: Automatický úklad hotový.
>>> 
>>> Here it shows:
>>> 12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking 
>>> expr: '5 + 2'
>>> calling: maxima
>>> input: 'simpsum:true;tex(5 + 2);'
>>> output: '7'
>>> 
>>> Kornel
>>> 
>>> many thanks Kornel for your prompt reply, I’ve tried what you suggested, 
>>> and what I got is no output, namely:
>>> 
>>> 11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole 
>>> cell: checking expr: '5 + 2'
>>> calling: maxima
>>> input: 'simpsum:true;tex(5 + 2);’
>>> 
>>> does this suggest where the problem is?
>> 
>> No, missing: output: '7'
>> 
>> What happens if you call maxima from the console window and input the string 
>> '(5+2);' followed by ?
>> Here I get:
>> (%i1) (5+2);
>> (%o1)  7
>> (%i2) 
>> 
>>> thanks,
>>> Paola
>> 
>> Kornel
> 
> from the console I get the same as you:
>   (%i2) 5+2;
>   (%o2)  7
>   (%i3)

How did you call maxima in terminal?

I have it installed too and it looks like that:

$ ls -l /Applications/Maxima.app/Contents/Resources
total 480
-rw-r--r--@ 1 stephan  admin 577 22 Apr  2013 AppSettings.plist
-rw-r--r--@ 1 stephan  admin   27964 22 Apr  2013 MainMenu.nib
-rw-r--r--@ 1 stephan  admin  198769  4 Dez  2012 appIcon.icns
drwxr-xr-x@ 7 stephan  admin 238 22 Apr  2013 maxima
-rwxr-xr-x@ 1 stephan  admin 341 22 Apr  2013 maxima.sh
-rw-r--r--@ 1 stephan  admin1358 18 Nov  2012 script
-rwxr-xr-x@ 1 stephan  admin 409 22 Apr  2013 xmaxima.sh
$ /Applications/Maxima.app/Contents/Resources/maxima/bin/maxima 
/Applications/Maxima.app/Contents/Resources/maxima/bin/maxima: line 199: exec: 
sbcl: not found
$ /Applications/Maxima.app/Contents/Resources/maxima.sh
Maxima 5.30.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.55.0-abb03f9
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) 


It seems one has to start maxima.sh to get the command line interface. I’m not 
sure LyX knows it.
In any case one has to add "/Applications/Maxima.app/Contents/Resources“ to the 
PATH.

Stephan



Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Murat Yildizoglu
Hi Kornelm
I think that yolu should point İnci'de the .app package, where the unix binary 
lives.
I do not have my laptop with me, but it could be the Macos folder in the app 
package (your .app file is in fact a bundle containing sub folders, and one of 
them contains the maxima binary

Prof. Murat Yildizoglu

Note: Please use the following address as such

UNIVERSITE DE BORDEAUX
GREThA (UMR CNRS 5113)
MURAT YILDIZOGLU
16 AVENUE LEON DUGUIT
CS 50057
33608 PESSAC CEDEX
FRANCE

Bureau : E-331

mail: murat.yildizoglu at u-bordeaux.fr

web: www.yildizoglu.fr

Le 18 oct. 2016 à 13:06 +0200, Kornel Benko , a écrit :
> Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 
>  > On 18 Oct 2016, at 11:39, Kornel Benko 
> > mailto:kor...@lyx.org>> wrote:
> >
> > Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
> > mailto:pm...@st-andrews.ac.uk
> > Hi all,
> >
> > I’ve searched the list and though this is not the first time the problem is 
> > noted, I haven’t been able to find any solution. The short of it is: it 
> > just won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, 
> > I only get a lonely = side to the right of the expression, and no result 
> > (see screenshot)
> >
> > I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the 
> > same problem under Maverick and El Capitan with previous Lyx versions, 
> > namely, nothing happens.
> >
> > I have specified the paths correctly (I think) to where the apps are 
> > (Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
> > software calling the app (math-extern maxima), or (math-extern 
> > mathematica), but no result is churned out.
> >
> > Here is what I have in the "PATH prefix" field under 
> > Lyx->Preferences->Paths:
> >
> > /Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
> >  18/Maple 18.app
> >
> > Can anyone please help?
> >
> > Many thanks,
> > Paola
> >
> > [cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]
> >
> >
> > I'd try calling lyx with '-dbg mathed' parameter from a console window.
> > Alternatively use View->Messages Pane->Settings
> > Check 'Selected'
> > Double click on 'mathed - Math editor'
> > back to 'Output'
> > ...
> > calling: maxima
> > input: 'simpsum:true;tex(5 + 2);'
> > output: '7'
> > Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
> > 12:31:27.889: Automatický úklad hotový.
> >
> > Here it shows:
> > 12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking 
> > expr: '5 + 2'
> > calling: maxima
> > input: 'simpsum:true;tex(5 + 2);'
> > output: '7'
> >
> > Kornel
> >
> > many thanks Kornel for your prompt reply, I’ve tried what you suggested, 
> > and what I got is no output, namely:
> >
> > 11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole 
> > cell: checking expr: '5 + 2'
> > calling: maxima
> > input: 'simpsum:true;tex(5 + 2);’
> >
> > does this suggest where the problem is?
>
> No, missing: output: '7'
>
> What happens if you call maxima from the console window and input the string 
> '(5+2);' followed by ?
> Here I get:
> (%i1) (5+2);
> (%o1) 7
> (%i2)
>
> > thanks,
> > Paola
>
> Kornel

Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini

On 18 Oct 2016, at 12:05, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
On 18 Oct 2016, at 11:39, Kornel Benko 
mailto:kor...@lyx.org>> wrote:

Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
Hi all,

I’ve searched the list and though this is not the first time the problem is 
noted, I haven’t been able to find any solution. The short of it is: it just 
won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
get a lonely = side to the right of the expression, and no result (see 
screenshot)

I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
problem under Maverick and El Capitan with previous Lyx versions, namely, 
nothing happens.

I have specified the paths correctly (I think) to where the apps are 
(Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
software calling the app (math-extern maxima), or (math-extern mathematica), 
but no result is churned out.

Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:

/Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
 18/Maple 18.app

Can anyone please help?

Many thanks,
Paola

[cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]


I'd try calling lyx with '-dbg mathed' parameter from a console window.
Alternatively use View->Messages Pane->Settings
Check 'Selected'
Double click on 'mathed - Math editor'
back to 'Output'
...
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'
Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
12:31:27.889: Automatický úklad hotový.

Here it shows:
12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking expr: 
'5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'

Kornel

many thanks Kornel for your prompt reply, I’ve tried what you suggested, and 
what I got is no output, namely:

11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole cell: 
checking expr: '5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);’

does this suggest where the problem is?

No, missing: output: '7'

What happens if you call maxima from the console window and input the string 
'(5+2);' followed by ?
Here I get:
(%i1) (5+2);
(%o1)  7
(%i2)

thanks,
Paola

Kornel


from the console I get the same as you:

(%i2) 5+2;
(%o2)  7
(%i3)




Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Kornel Benko
Am Dienstag, 18. Oktober 2016 um 10:57:08, schrieb Paola Manzini 

> On 18 Oct 2016, at 11:39, Kornel Benko 
> mailto:kor...@lyx.org>> wrote:
> 
> Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
> mailto:pm...@st-andrews.ac.uk>>
> Hi all,
> 
> I’ve searched the list and though this is not the first time the problem is 
> noted, I haven’t been able to find any solution. The short of it is: it just 
> won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
> get a lonely = side to the right of the expression, and no result (see 
> screenshot)
> 
> I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
> problem under Maverick and El Capitan with previous Lyx versions, namely, 
> nothing happens.
> 
> I have specified the paths correctly (I think) to where the apps are 
> (Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
> software calling the app (math-extern maxima), or (math-extern mathematica), 
> but no result is churned out.
> 
> Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:
> 
> /Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
>  18/Maple 18.app
> 
> Can anyone please help?
> 
> Many thanks,
> Paola
> 
> [cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]
> 
> 
> I'd try calling lyx with '-dbg mathed' parameter from a console window.
> Alternatively use View->Messages Pane->Settings
> Check 'Selected'
> Double click on 'mathed - Math editor'
> back to 'Output'
> ...
> calling: maxima
> input: 'simpsum:true;tex(5 + 2);'
> output: '7'
> Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
> 12:31:27.889: Automatický úklad hotový.
> 
> Here it shows:
> 12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking 
> expr: '5 + 2'
> calling: maxima
> input: 'simpsum:true;tex(5 + 2);'
> output: '7'
> 
> Kornel
> 
> many thanks Kornel for your prompt reply, I’ve tried what you suggested, and 
> what I got is no output, namely:
> 
> 11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole cell: 
> checking expr: '5 + 2'
> calling: maxima
> input: 'simpsum:true;tex(5 + 2);’
> 
> does this suggest where the problem is?

No, missing: output: '7'

What happens if you call maxima from the console window and input the string 
'(5+2);' followed by ?
Here I get:
(%i1) (5+2);
(%o1)  7
(%i2) 

> thanks,
> Paola

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini
On 18 Oct 2016, at 11:39, Kornel Benko mailto:kor...@lyx.org>> 
wrote:

Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 
mailto:pm...@st-andrews.ac.uk>>
Hi all,

I’ve searched the list and though this is not the first time the problem is 
noted, I haven’t been able to find any solution. The short of it is: it just 
won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
get a lonely = side to the right of the expression, and no result (see 
screenshot)

I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
problem under Maverick and El Capitan with previous Lyx versions, namely, 
nothing happens.

I have specified the paths correctly (I think) to where the apps are 
(Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
software calling the app (math-extern maxima), or (math-extern mathematica), 
but no result is churned out.

Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:

/Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
 18/Maple 18.app

Can anyone please help?

Many thanks,
Paola

[cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]


I'd try calling lyx with '-dbg mathed' parameter from a console window.
Alternatively use View->Messages Pane->Settings
Check 'Selected'
Double click on 'mathed - Math editor'
back to 'Output'
...
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'
Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
12:31:27.889: Automatický úklad hotový.

Here it shows:
12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: checking expr: 
'5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'

Kornel

many thanks Kornel for your prompt reply, I’ve tried what you suggested, and 
what I got is no output, namely:

11:55:08.254: (math-extern maxima)finding 'finding 'finding 'use whole cell: 
checking expr: '5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);’

does this suggest where the problem is?

thanks,
Paola



Re: making LyX work with CAS on Mac OS

2016-10-18 Thread Kornel Benko
Am Dienstag, 18. Oktober 2016 um 10:12:50, schrieb Paola Manzini 

> Hi all,
> 
> I’ve searched the list and though this is not the first time the problem is 
> noted, I haven’t been able to find any solution. The short of it is: it just 
> won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
> get a lonely = side to the right of the expression, and no result (see 
> screenshot)
> 
> I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
> problem under Maverick and El Capitan with previous Lyx versions, namely, 
> nothing happens.
> 
> I have specified the paths correctly (I think) to where the apps are 
> (Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
> software calling the app (math-extern maxima), or (math-extern mathematica), 
> but no result is churned out.
> 
> Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:
> 
> /Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
>  18/Maple 18.app
> 
> Can anyone please help?
> 
> Many thanks,
> Paola
> 
> [cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]
> 

I'd try calling lyx with '-dbg mathed' parameter from a console window.
Alternatively use View->Messages Pane->Settings
Check 'Selected'
Double click on 'mathed - Math editor'
back to 'Output'
...
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'
Buffer.cpp (3449): updateMacro of novýsúbor9.lyx
12:31:27.889: Automatický úklad hotový.

Here it shows:
12:38:28.705: Alt+M Afinding 'finding 'finding 'use whole cell: 
checking expr: '5 + 2'
calling: maxima
input: 'simpsum:true;tex(5 + 2);'
output: '7'

Kornel


signature.asc
Description: This is a digitally signed message part.


making LyX work with CAS on Mac OS

2016-10-18 Thread Paola Manzini
Hi all,

I’ve searched the list and though this is not the first time the problem is 
noted, I haven’t been able to find any solution. The short of it is: it just 
won’t work. So for instance if I type “5+2” then invoke Edit/Math/CAS, I only 
get a lonely = side to the right of the expression, and no result (see 
screenshot)

I am currently running Lyx 2.2.0 on Mac Os Sierra, but I had exactly the same 
problem under Maverick and El Capitan with previous Lyx versions, namely, 
nothing happens.

I have specified the paths correctly (I think) to where the apps are 
(Mathematica, Maxima, Maple - nothing seems to work), and I can see the 
software calling the app (math-extern maxima), or (math-extern mathematica), 
but no result is churned out.

Here is what I have in the "PATH prefix" field under Lyx->Preferences->Paths:

/Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:/opt/local/bin:/Library/TeX/local/bin:/Library/TeX/bin:/Library/TeX/X11R6/bin:/Library/TeX/sbin:/sbin:/usr/local/sbin:/Library/TeX/usr/local/bin:/Applications/Mathematica.app/Contents/MacOS/MathKernel:/Applications/Maxima.app:/Applications/Maple
 18/Maple 18.app

Can anyone please help?

Many thanks,
Paola

[cid:1CA68732-253E-465F-82E6-7DF587AC9DB0@st-andrews.ac.uk]