mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] session maxima; session tableur ?


Chronological Thread 
  • From: slelievre <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] session maxima; session tableur ?
  • Date: Thu, 23 Jun 2011 17:09:42 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=eHoRAAyWglKNftt7Ab04zMLEwUHD3qNSm4s+F0NsxVrTZQ5PPrmZ393NgrE8u+uMfc wbeC8oRedaPF2kx24c74hnZEB1z7Ydmr9DEWkJFRQEmbzS/F1y2L4ZIqUVEKX/AQutHS qJDLcMhMc0okRJCZFgsOlbvN33Kng7gepGRoI=

Hello,

NB- I wrote an answer to your post and had trouble sending it, and
somebody else answered your post in the meantime, but I'll post what I
wrote anyway, it can't hurt to have two explanations.

2011-06-23 El.Douwen:
>>> now two questions :
>>> - if i type 1+1 then press return (or shift return or page break or
>>> others combinations) nothing occurs
>> Great! Now you have it working. Just type
>> 1+1;
>> and then <return> (don't forget ; at the end of each maxima command).
>>
>> So, it seems, the script which is called "maxima" in Linux has the name
>> "maxima.sh" in MacOS.
>>
> well had'nt this script for name
> "/Applications/Maxima.app/Contents/Resources/maxima.sh" ?
> because if i type "maxima.sh" alone it gives nothing…

Its name is
maxima.sh
and its location is
/Applications/Maxima.app/Contents/Resources/

If you type
maxima.sh
in the Terminal, it won't know where to find it.
If you type the location + name as in
/Applications/Maxima.app/Contents/Resources/maxima.sh
then it will know.

The PATH is an 'environment variable in the shell
(ie in Terminal, sort of), which is a list of places where
it should look for executables when you don't specify
their location.

Type
echo $PATH
to know what your PATH is set to.

If you type
export PATH=/Applications/Maxima.app/Contents/Resources/
then all executables will be looked for in there, so
maxima.sh
will work, but other commands such as "cd", "ls" etc. won't!

If you want to add the location to your path you can type
export PATH=$PATH:/Applications/Maxima.app/Contents/Resources/
Then you can check that it was appended to your path by typing
echo $PATH

Try searching the web for "osx path" and you'll find plenty more to
read on this subject.

Someone suggested to
>> make a symlink to it called just "maxima" in some directory in your $PATH.

The way to do that is to type
sudo ln -s /path/to/maxima.sh /usr/local/bin/maxima
(all in one line) where
/path/to/maxima.sh
should be replaced by
/Applications/Maxima.app/Contents/Resources/maxima.sh
and "sudo" is used because you need admin rights to write to
/usr/local/bin


>> Of course, alternatively, you can edit a few files in your TeXmacs
>> installation. In Linus, they are
>> /usr/share/TeXmacs/plugins/maxima/progs/init-maxima.scm
>> /usr/libexec/TeXmacs/bin/tm_maxima
>> /usr/libexec/TeXmacs/bin/maxima_detect
>> (don't know where MacOS folks have put them to).
>>
> i looked in the Finder (search by names) for files or folders with names
> "init-maxima" and also "tm_maxima" and also "maxima_detect"
> i found nothing

They might be in a location that Spotlight doesn't search (like
probably hidden in the TeXmacs.app bundle or in "~/Library/Application
Support").

>>> - more generally, what is the method to install a texmacs extension, like
>>> the ones in the list you gave ?
>> They are not TeXmacs extensions! They are separate programs, some of them
>> surely larger than TeXmacs, and all of them can be installed and used
>> without TeXmacs. But TeXmacs can interact with them, if they are
>> installed. And this is very useful, because you can easily cut-and-paste
>> results from one computer algebra system to another one, etc., within
>> TeXmacs.
>>
> ok sorry for the bad terminology; there are no texmacs extensions, there
> are great programms that can interact with texmacs and be commanded from
> inside texmacs documents
>
>> Your choice of just 3 programs to which TeXmacs can interface seems a bit
>> random. For example, reduce and axiom (and its forks fricas and openaxiom)
>> are as powerful computer algebra systems as maxima; octave and scilab are
>> powerful matlab-like programs for numerical linear algebra; GNU R is the
>> leading program for statistical analyses; etc. All of them, and more, can
>> be used from within TeXmacs.
>
> but that"s not a choice !
> i could not yet install once of these great programms and interact them
> with texmacs !
> so i have not tried them yet and not made any choice !
> i am just argumenting, in order to explain what i want, from what i know
> the day i can use hundred of programms within texmacs, i will test these
> hundred of programms, one by one

I repeat my suggestion to install Sage which will install most of
these nice programs for you.
Then if you add
/Applications/sage/local/bin
to your PATH, TeXmacs will know where to find them.

One last word about the PATH.
When you type
export PATH=$PATH:/Applications/Maxima.app/Contents/Resources/
as I said above, the change to your path only lasts for the current
Terminal session.

If you want to make this valid in each Terminal session, edit the
.bash_profile file in your home folder and add the line
export PATH=$PATH:/Applications/Maxima.app/Contents/Resources/
somewhere in that file (if the file doesn't exist, create it).
This file is loaded each time you open a Terminal window or tab.

Hope that helps.
Samuel



Archive powered by MHonArc 2.6.19.

Top of page