Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica Technical FAQs Services & Resources / Mathematica / Notebook Interface
-----
 /
Exporting
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

How do I configure teTeX 1.0 so that it can process Mathematica-generated LaTeX documents?

The following examples assume that Mathematica has been installed to $TopDirectory. Because this may be different for your system, you are encouraged to first check the actual location by evaluating the Mathematica expression...

...in a Mathematica kernel. This will return a string containing the full path to the installation. In addition, these instructions assume that the installation resides in a directory named /usr/share/texmf. This may also differ for your system. Check your local guide to determine the actual location and modify these directions accordingly. Some actions described below may require administrative privileges. If you do not have such permissions on your system, request that your system administrator implement these changes.

1.

Copy the Mathematica virtual fonts package that accompanies Mathematica 4 into the directory tree.

 

cd /usr/share/texmf cp -r /usr/local/mathematica/SystemFiles/IncludeFiles/TeX/texmf/* ./

2.

Open the master configuration file /usr/share/texmf/web2c/texmf.cnf in a text editor and change the kpathsea variable TEXPSHEADERS so that it includes the path to the Type 1 Math fonts in the Mathematica directory tree. The original setting may look something like:

 

TEXPSHEADERS = .;$TEXMF/{dvips,pdftex,tex,fonts/type1}//

 

You will need to change it to read:

 

TEXPSHEADERS =.;$TEXMF/{dvips,pdftex,tex,fonts/type1}//;/usr/local/mathematica/SystemFiles/Fonts/Type1

 

Note that a semi-colon is used to delimit elements on the path list.

3.

Merge the contents of /usr/share/texmf/dvips/init/wolfram.map into the the dvips file psfonts.map. This can be done by creating a symbolic link in /usr/share/texmf/dvips/config.

 

cd /usr/share/texmf/dvips/config ln -s ../init/wolfram.map ./wolfram.map

 

Afterwards, open the file /usr/share/texmf/dvips/config/updmap in a text editor and add wolfram.map to the list of files in the modules variable. After editing, the assignment may look something like this:

 

extra_modules=" wolfram.map "

 

Once the changes have been saved, run the script updmap with the working directory set to /usr/share/texmf/dvips/config.

 

cd /usr/share/texmf/dvips/config ./updmap

 

This will make the Mathematica Type 1 fonts available to dvips and other applications that use these configuration files.

4.

Update the kpathsea filename database ls-R by running the shell script named texhash. This configuration uses 's virtual font mechanism to access the Type 1 Math fonts that ship with Mathematica. The Math fonts will not be viewable in a DVI format previewer. Instead, you must convert the DVI file to PostScript. Assuming that your input file has the name documentfile.tex, the commands you would need to issue are as follows.

 

latex documentname.tex

 

This will produce a file named document.dvi in this directory. The command for invoking DVIPS is:

 

dvips -o documentname.ps documentname.dvi

 

Newer versions of DVIPS will perform partial font downloading by default. This will result in error messages when DVIPS tries to work with Math2-Bold. You may see an error message that looks like:

 

Second number not found in Char string of '/FontName'

 

If you run into this problem, you disable the partial downloading feature by invoking dvips with the j0 flag.

 

dvips -j0 -o documentname.ps documentname.dvi

 

This will cause the complete font to be embedded in the output PostScript file. Your documents will remain portable, they just will be a bit larger.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja]