15

I want to be able to use Mathematica fonts with LaTeX. I find two sets of instructions for this:

  1. Robert's post there

  2. Kuska's instructions in mysymdoc.pdf, a file in the Mathematica 8 folder SystemFiles/IncludeFiles/TeX/texmf/doc.

Method (1) explicitly assumes one is using linux, although robert indicates the method should work for OS X.

Method (2) uses files that are distributed with Mathematica for OS X, but Kuska refers only to MikTeX on Windows and teTeX on Unix.

Which works with TeXLive 2011 under OS X?

Also, method (1) says to edit the two .mapfiles so as to change .pfb to .pfa (presumably because the Wolfram-supplied Type 1 font files have extension .pfa.

Why edit the .map files like that instead of changing the extensions of the font files themselves to .pfb?

murray
  • 7,944

1 Answers1

10

The instructions you mention are rather outdated.

  1. Modify wolfram.map to have .pfa instead of .pfb (to reflect the format of the font files) and remove all from Janson Text onwards, as those fonts are not provided.

  2. Copy wolfram.map to

    /usr/local/texlive/texmf-local/fonts/map/dvips/wolfram/wolfram.map
    
  3. Copy all subfolders from texmf/fonts (afm/wolfram …) to the corresponding folders in /usr/local/texlive/texmf-local/fonts.

  4. Copy the directory texmf/tex/latex/wolfram to /usr/local/texlive/texmf-local/tex/latex/wolfram

  5. Copy texmf/doc/wolfram to /usr/local/texlive/texmf-local/doc/latex/wolfram

  6. Run mktexlsr so that TeX Live will know about these files

  7. Run updmap-sys --enable Map=wolfram.map

  8. Enjoy

All steps from 2 to 7 should be done as Administrator (prefix the commands with sudo, typing the Administrator's password when requested)

Note that the 7z archive linked to in the blog article seems to be corrupt, while the .zip file is good.


Update

From TeX Live 2013 onwards, it's better to add the line

Map wolfram.map

to the file

/usr/local/texlive/texmf-local/web2c/updmap.cfg

(also requires Administrator privileges) and subsequently run

updmap-sys

without options. This replaces step 7 above.

egreg
  • 1,121,712
  • The .zip file contents, robert says, is a subset of what's in the 7z file. In any case, I was able to unarchive the 7z file without any error message. – murray Apr 13 '12 at 00:19
  • I keep all personal additions, including fonts inside ~/Library/texmf. I'm the only user, with an admin account.

    Should that not work? Is it essential, instead, to put wolfram.map (for my setup) in ~/Library/texmf/fonts/map/dvips/wolfram/?

    E.g., I copied wolfram.map to ~/Library/texmf/fonts/dvips/config. And I added the entry Map wolfram.map #localtexmf/dvips/config/wolfram.map to file ~/Library/texmf/web2c/updmap.cfg before running mktexlsr and updmap-sys.

    – murray Apr 13 '12 at 00:25
  • 1
    @murray What's most important is not using updmap that may create problems in using fonts when they are updated via tlmgr. – egreg Apr 13 '12 at 09:01
  • I am using Mathematica 9.0.1: I copied all necessary files in steps 2-5, and successfully got 6 to work. At step 7 I got error Unknown option: enable-map. Any ideas? Would it work if I just skipped this step? – QuantumDot Aug 26 '14 at 20:10
  • I tried to compile my LaTeX document with \usepackage{wrisym} but it failed: mktexpk: don't know how to create bitmap font for Mathematica1. So clearly I'm doing something wrong. Any ideas? – QuantumDot Aug 26 '14 at 20:16
  • @QuantumDot updmap-sys --enable Map=wolfram map should work. I'll fix the code. – egreg Aug 26 '14 at 20:40
  • @egreg Thanks, it now runs marginally better: But after 4 lines of output (including resetting $HOME$ value), it gives me the error: updmap: invalid mapType map at /usr/texbin/updmap line 1470. This seems to be an excessive amount of trouble for something so simple. – QuantumDot Aug 26 '14 at 20:44
  • @QuantumDot What TeX distribution are you running? – egreg Aug 26 '14 at 20:45
  • @QuantumDot If the Mathematica font distribution is corrupt, it's not a fault of the TeX system. – egreg Aug 26 '14 at 20:50
  • @egreg Sorry again to bother you: I've noticed that in addition to giving me the mathematica input font, \usepackage{wrisym} also replaces the default font of the body text, and of the normal equation environment. I am struggling with trying to restore the main body and equation font to Computer Modern while keeping the Mathematica font available for the document. I would be really grateful if you could point me in the right direction! – QuantumDot Oct 25 '14 at 20:43
  • @QuantumDot Surely wrisym changes the math fonts, which is its main job. It also changes the default text font family to ptm (Times). You don't need to load wrisym, but it's not really clear what you mean by “keeping the Mathematica font” available. – egreg Oct 25 '14 at 20:53
  • @egreg Wait; wasn't the whole point of adding \usepackage[uprightmonomath]{wrisym} to get the Mathematica font? If I take that line out, I lose the Mathematica font, so must keep it. I guess my question is how to restore the default text font family to Computer Modern? – QuantumDot Oct 25 '14 at 21:01
  • @QuantumDot Add \renewcommand{\rmdefault}{cmr} after loading wrisym. – egreg Oct 25 '14 at 21:02
  • I just got a new computer with Yosemite, installed TexLive successfully, followed all your steps successfully, but TeX still had problems creating fonts. According to https://tug.org/mactex/yosemite.html, Ghostscript is broken in Yosemite. Is Ghostscript needed to make these fonts? – QuantumDot Feb 14 '15 at 11:17
  • @QuantumDot Not sure why you get this problem; never tested on Yosemite, sorry. – egreg Feb 14 '15 at 11:19
  • For my own reference, running sudo -H updmap-sys --enable Map wolfram.map at the very end (step 9) seems to make it all work in Yosemite. – QuantumDot Feb 05 '16 at 17:54
  • For my own reference, From TeX Live 2017 onwards, the files should be copied to /usr/local/texlive/2017/texmf-dist/.... Also the line Map wolfram.map should be added to /usr/local/texlive/2017/texmf-config/web2c/updmap.cfg (not sure about this one... why in a different folder??) – QuantumDot Nov 27 '17 at 05:35
  • @QuantumDot No, never copy anything in the main tree. – egreg Nov 27 '17 at 07:17
  • Then what is the correct way to make it work? I couldn’t make it work using the older method. – QuantumDot Nov 27 '17 at 13:01
  • @QuantumDot The texmf-local way is still the right one. – egreg Nov 27 '17 at 13:06