Mathematica

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
(Updated the OS X Font install instructions)
Line 1: Line 1:
-
{{inuse}}
 
Mathematica is, according to [http://www.wolfram.com/products/mathematica/features/ Wolfram Research], "the world's most powerful mathematical software system."  There are many in the building who use it regularly for their research.
Mathematica is, according to [http://www.wolfram.com/products/mathematica/features/ Wolfram Research], "the world's most powerful mathematical software system."  There are many in the building who use it regularly for their research.
Line 17: Line 16:
=== OS X fonts ===
=== OS X fonts ===
The steps to configuring the Mathematica fonts on a Mac OS X machine are:
The steps to configuring the Mathematica fonts on a Mac OS X machine are:
-
# Download the Mathematica 5 fonts from http://support.wolfram.com/mathematica/systems/unix/interface/BDF.zip
+
# Download the Mathematica 5 fonts from http://support.wolfram.com/mathematica/systems/linux/general/files/MathFonts_52_Linux.tar.gz
-
#: This is a directory of some 652 .bdf files.  Don't try to use an old version of the fonts (if you see three directories like AFM, X, and Type1 then don't use that version).
+
#: This contains three directories... Fonts/AFM, Fonts/BDF and Fonts/Type1. Only BDF and Type1 are really needed.
# Put the fonts where the Apple X11 server will find them, in <tt>/usr/X11R6/lib/X11/fonts</tt>
# Put the fonts where the Apple X11 server will find them, in <tt>/usr/X11R6/lib/X11/fonts</tt>
#: You should create a subdirectory in there; the name <tt>mathematica</tt> would make sense.
#: You should create a subdirectory in there; the name <tt>mathematica</tt> would make sense.
-
# Regenerate the fonts.dir file (otherwise Mathematica will crash) with '<tt>mkfontdir /usr/X11R6/lib/X11/fonts</tt>'
+
# Untar the file in the directory you just created: cd /usr/X11R6/lib/X11/fonts/mathematica; tar zxvf /path/to/MathFonts_52_Linux.tar.gz
 +
# Regenerate the fonts.dir file (otherwise Mathematica will crash) with '<tt>mkfontdir BDF Type1</tt>'
# To see what fonts X already knows about, run '<tt>xset q</tt>' and look for the directories specified by "Font Path."
# To see what fonts X already knows about, run '<tt>xset q</tt>' and look for the directories specified by "Font Path."
# Add the font database to X
# Add the font database to X
-
#: Type '<tt>xset fp+ /usr/X11R6/lib/X11/fonts/mathematica/ ; xset fp rehash</tt>' to do this to the current session.  You can then use '<tt>xset q</tt>' to see that X knows about the Mathematica fonts.
+
#: Type '<tt>xset fp+ /usr/X11R6/lib/X11/fonts/mathematica/BDF,/usr/X11R6/lib/X11/fonts/mathematica/Type1 ; xset fp rehash</tt>' to do this to the current session.  You can then use '<tt>xset q</tt>' to see that X knows about the Mathematica fonts.
 +
#: AFM isn't necessary for this to work.
# Edit /etc/X11/xinit/xinitrc to make the change permanent
# Edit /etc/X11/xinit/xinitrc to make the change permanent
#: To make the new fonts show up all the time, you'll have to tell X11 about them when it starts.  Edit the xinitrc file and add the two 'xset fp' commands from above to the file, ''before'' the window manager line.
#: To make the new fonts show up all the time, you'll have to tell X11 about them when it starts.  Edit the xinitrc file and add the two 'xset fp' commands from above to the file, ''before'' the window manager line.

Revision as of 20:39, 7 August 2007

Mathematica is, according to Wolfram Research, "the world's most powerful mathematical software system." There are many in the building who use it regularly for their research.


Contents

Overview

We currently have 10 floating licenses for Mathematica in the building; this means that you can run it on any machine, but only 10 copies may be run at the same time. If you're having trouble with running or using Mathematica, check to see if others are using up all the licenses by running the command 'monitorlm'


Font issues

If you're not running Mathematica locally on a department desktop machine (using your laptop, or a machine at home through a SSH connection) you may have some issues with fonts displaying properly. Here's a couple links that may help you out:


OS X fonts

The steps to configuring the Mathematica fonts on a Mac OS X machine are:

  1. Download the Mathematica 5 fonts from http://support.wolfram.com/mathematica/systems/linux/general/files/MathFonts_52_Linux.tar.gz
    This contains three directories... Fonts/AFM, Fonts/BDF and Fonts/Type1. Only BDF and Type1 are really needed.
  2. Put the fonts where the Apple X11 server will find them, in /usr/X11R6/lib/X11/fonts
    You should create a subdirectory in there; the name mathematica would make sense.
  3. Untar the file in the directory you just created: cd /usr/X11R6/lib/X11/fonts/mathematica; tar zxvf /path/to/MathFonts_52_Linux.tar.gz
  4. Regenerate the fonts.dir file (otherwise Mathematica will crash) with 'mkfontdir BDF Type1'
  5. To see what fonts X already knows about, run 'xset q' and look for the directories specified by "Font Path."
  6. Add the font database to X
    Type 'xset fp+ /usr/X11R6/lib/X11/fonts/mathematica/BDF,/usr/X11R6/lib/X11/fonts/mathematica/Type1 ; xset fp rehash' to do this to the current session. You can then use 'xset q' to see that X knows about the Mathematica fonts.
    AFM isn't necessary for this to work.
  7. Edit /etc/X11/xinit/xinitrc to make the change permanent
    To make the new fonts show up all the time, you'll have to tell X11 about them when it starts. Edit the xinitrc file and add the two 'xset fp' commands from above to the file, before the window manager line.

NOTE:

The commands mkfontdir and xset are in /usr/X11R6/bin, which is not usually in the default PATH. In order to run them you have to specify the full path to the binary. Also, most of the above will require root or super user access, so either 'su - root' first (if you've enabled the root account) or use 'sudo' to gain the appropriate privileges.


Crashes

Bad Atom Errors/SIGSEGV Errors

These errors might stem from not using X11ForwardTrusted if you're running it across an SSH session. Have a look here for more information.

Personal tools