MATHEMATICA(s)

MATHEMATICA version 4.0 is available on tohu.itp and brane.itp.
Contact Toni or Max for an account on these machines if you need.

Usage:

In version 4, the X-front-end mathematica requires new additional fonts, which can (but need not) be installed at the remote (i.e. your) machine. If the required fonts are not available at your machine, the "mathematica" script as modified by Martin Ertl lets your X-server fetch these files from the xfs running at the server. If you prefer to have the files locally, you need to do the following (on a Linux computer):

  1. Su to root
  2. cd /
  3. ftp to hep.itp and get pub/Math/math4fonts.tar
  4. tar xvf math4fonts.tar ; rm math4fonts.tar
  5. Prior to version 4 it was necessary to edit your .xinitrc or .xsession file that is used for initialization of your X server to include the following lines (preferrably at the beginning):
    #Fonts f. Mathematica 3.0 Frontend
    xset fp+ /usr/local/mathematica/SystemFiles/Fonts/Type1
    xset fp+ /usr/local/mathematica/SystemFiles/Fonts/X
    xset fp rehash
    
    This is no longer necessary with version 4.

For Mathematica 4.2 repeat the above steps with math42fonts.tar!


Technical details on how Martin solved your fonts problems:
The X font server (xfs) is configured to have /usr/local/mathematica/SystemFiles/Fonts/X,/usr/local/mathematica/SystemFiles/Fonts/Type1 in its catalogue. The modified mathematica script checks for the existence of the Mathematica fonts and provides them if necessary by:
#!/bin/sh
#
#  Mathematica 4 command file
#
#  Copyright 1988 - 1998  Wolfram Research, Inc.
#

# Changed to use xfs (X Font Server) when local Mma font dir
# is not available. 
# ITP TU-Wien - Martin Ertl - 14.7.2000

topdir=/usr/local/mathematica
sysid=Linux

PATH=$topdir/Executables/$sysid:$PATH
export PATH

XFILESEARCHPATH=$topdir/SystemFiles/FrontEnd/SystemResources/X/%N:/SystemFiles/FrontEnd/SystemResources/X/%T/%N%S
export XFILESEARCHPATH

havefonts=`xlsfonts -fn '-wri-*-*-*-*-*-*-*-*-*-*-*-*-*' 2>&1 | grep -c "wri"`

font=$topdir/SystemFiles/Fonts/Type1,$topdir/SystemFiles/Fonts/X
fontserver=tcp/$(hostname -f):7100

[ $havefonts -lt 2 ] && { xset fp+ $font 2>/dev/null || xset fp+ $fontserver; }

xset fp rehash

bindir=$topdir/SystemFiles/FrontEnd/Binaries/$sysid
if [ ! -f $bindir/Mathematica ] ; then
   echo "Mathematica front end executable"
   echo "$bindir/Mathematica"
   echo "not found. Your Mathematica installation may be incomplete"
   echo "or corrupted."
   exit
fi

exec $bindir/Mathematica -topDirectory $topdir "$@"


Anton Rebhan <rebhana@tph.tuwien.ac.at>
Page last modified: 2000/7/14