Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] TeXmacs Mathematica plugin HowTo

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] TeXmacs Mathematica plugin HowTo


Chronological Thread 
  • From: Youjun Hu <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] TeXmacs Mathematica plugin HowTo
  • Date: Wed, 16 Feb 2011 06:14:04 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=s/EkyJW0w1SypJn8nh21clYv62Y5OPYmOmaNhe7UBYUsr4DwspUEyZ3hHd28ElMfok 7HC9ou4j8Q+LfXU3TvQHMllxcQ/fzwj5ckV+SG/7c1PHOYsIkfZpAzK12ObX2J1HnlY7 w/dZwko+shcUJ5/8v4pX7BeBBsYUAs/cUr4Gk=

Thanks,
This is a very useful howto post giving all the detials to make
Texmacs-Mathematica plugin work.

Youjun

On Tue, Feb 15, 2011 at 3:07 PM, Philippe Joyez
<address@hidden> wrote:
> How to run the TeXmacs Mathematica plugin - For Mathematica version 7 on
> linux.
> Probably valid for v.6 also, and maybe other OSs too.
>
> In order to connect to Mathematica TeXmacs needs an executable
> "tm_mathematica.bin" in the hidden user's ".TeXmacs/bin/" directory. This
> executable is normally compiled on the fly the first time a Mathematica
> session
> is opened, however the "makefile.lazy" that control this process makes
> assumptions on filepaths that are obsolete for current versions of
> mathematica.
> Fixing make.lazy in general means to make it smart enough to handle all
> possible cases of OS/mathematica version, which is nor easy. On the other
> hand,
> if the user is able to provide the appropriate file paths on its own, the
> simple following script (partly based on
> http://savannah.gnu.org/patch/?6079#comment2) does the jobs:
>
> ************************************
> #! /bin/bash
>
> #first define paths
>
> #here we use the texmacs installed files, but can also be the downloaded
> source
> Texmacs_math_plugin_files=/usr/local/share/TeXmacs/plugins/mathematica
>
> #Mathematica files from your installation
> Mathlink_Path="/usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/MathLink/De
> veloperKit/Linux-x86-64/CompilerAdditions"
> #above, replace "Linux-x86-64" to suit your system.
> #In this directory we'll use the header mathlink.h and a shared library
> libMLxxx.so where xxx depends on the architecture
> #for me, the library is "libML64i3.so" :
>
> lib_name=libML64i3.so
>
> #for Linux, normally no editting needed below this line
> Texmacs_home=$HOME"/.TeXmacs"
>
> lib_option=${lib_name:3:${#lib_name}-6} #strip "lib" and ".so"
>
> #make the dynamic library accessible at runtime in the usual system library
> path (needs admin rights):
> sudo ln -s $Mathlink_Path/$lib_name /usr/lib/$lib_name
>
> #make temporary writable copy of souce and use as working directory:
> cp -rf $Texmacs_math_plugin_files/src.lazy /tmp/mathem
> cd /tmp/mathem
>
> #copy necessary header
> cp $Mathlink_Path/mathlink.h mathlink.h
>
> #compile
> gcc -o tm_mathematica.bin tm_mathematica.c -l$lib_option -lm -lpthread -lrt
>
> #finally install executable
> cp tm_mathematica.bin $Texmacs_home/bin/tm_mathematica.bin
> ************************************
>
> save it as a text file, adapt as needed for your system, make it executable
> and
> run it (or execute line by line to check the process). The compilation
> issues
> many warnings, but it's OK.
>
> Now you can start a Mathematica session from within Texmacs, either using
> the
> "insert session" submenu or running a scheme command : (make-session
> "mathematica" "default")
>
> Final note: in recent mathematica versions the default graphics output is
> not
> postscript anymore, which is what TeXmacs needs. However you can correct the
> problem easily by evaluating (once per mathematica session):
>
> Get["Version5`Graphics`"]
>
> Hope it helps,
>
> Philippe
>



Archive powered by MHonArc 2.6.19.

Top of Page