linux 下 TeXmacs 作 Mathematica 10 的前端

來源:互聯網
上載者:User

標籤:

TeXmacs可以作很多種數學軟體的前端,比如maxima,octave,R等。甚至還可以作mathematica的前端。TeXmacs的mathematica 外掛程式比較老,預設條件下無法運行mathematica 10。以下假設TeXmacs與mathematica已正確安裝在64位linux下的/usr/local目錄中,需對以下檔案作修改(其中橙色部分為修改內容):


1. /usr/local/libexec/TeXmacs/bin/tm_mathematica

#!/bin/sh

error() {
#echo -e "\002latex:\\red $1\005"
echo -e "$1"
exit 1
}

export MATHLINK_PLATFORM=Linux-x86-64
export LD_LIBRARY_PATH=/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions:$LD_LIBRARY_PATH

if [ ! -x "$TEXMACS_HOME_PATH/bin/tm_mathematica.bin" ]
then
MATH0=`which math`
if [ $? -ne 0 ]
then error "Mathematica seems not to be installed"
fi
MATH1=`realpath "$MATH0"`
if [ $? -ne 0 ]
then
MATH1=`realpath.py "$MATH0"`
if [ $? -ne 0 ]
then error "realpath seems not to be installed"
fi
fi
MATH2=`echo "$MATH1" | sed -e ‘s=Executables/math$=SystemFiles/Links/MathLink/DeveloperKit=‘`
PLATFORM=`(cd "$MATH2"; echo *)`
NUM_PLATFORMS=`echo "$PLATFORM" | wc -w`
if [ "$NUM_PLATFORMS" -eq 1 ]
then MATH3="$MATH2/$PLATFORM"
......................以下省略......................
`
2. /usr/local/share/TeXmacs/plugins/mathematica/Makefile.lazy

$(TEXMACS_HOME_PATH)/bin/tm_mathematica.bin: src.lazy/tm_mathematica.c
gcc -o $(TEXMACS_HOME_PATH)/bin/tm_mathematica.bin src.lazy/tm_mathematica.c -I $(MATHLINK_PATH) -L $(MATHLINK_PATH) -lML64i3 -lm -lpthread -lrt -luuid

(註:如有必要需安裝uuid。ubuntu 下用命令 apt-get install uuid-dev)

3. 如果要在TeXmacs 中用mathematica 作圖的話,每次啟動mathematica外掛程式時,先運行命令:
Get["Version5/Graphics.m"]

如下:

linux 下 TeXmacs 作 Mathematica 10 的前端

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.