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

Am 19.10.2016 um 10:30 schrieb Paola Manzini 
<pm...@st-andrews.ac.uk<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 
<kor...@lyx.org<mailto:kor...@lyx.org>>:

Am Mittwoch, 19. Oktober 2016 um 08:30:53, schrieb Paola Manzini 
<pm...@st-andrews.ac.uk<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 <<EOF
#!/bin/sh
exec /Applications/Mathematica.app/Contents/MacOS/MathKernel "$@"
EOF
chmod +x $HOME/bin/mathematica

where the lines in green where preceded by > in the terminal window, the other 
two by $ - this is for the technically challenged like me out there.

Again, thank you all!

paola





Reply via email to