Wednesday, February 10, 2010

Installing the MinionPro Tex Package

I have recently gone through the somewhat difficult process of installing the MinionPro package for use with TeX / LaTeX on my Mac, but now it works. I followed the nice instructions on the nice instructions available through this blog:

http://carlo-hamalainen.net/blog/?p=8

But I found I needed a little fiddling. Here's what I did:


cd ~/Desktop

texmf_folder=~/Library/texmf/

curl http://mirror.ctan.org/fonts/mnsymbol.zip > mnsymbol.zip

unzip mnsymbol.zip
cd mnsymbol/tex
latex MnSymbol.ins
mkdir -p $texmf_folder/tex/latex/MnSymbol/
mkdir -p $texmf_folder/fonts/source/public/MnSymbol/
mkdir -p $texmf_folder/doc/latex/MnSymbol/
cp MnSymbol.sty $texmf_folder/tex/latex/MnSymbol/MnSymbol.sty
cd ..
cp source/* $texmf_folder/fonts/source/public/MnSymbol/
cp MnSymbol.pdf README $texmf_folder/doc/latex/MnSymbol/
mkdir -p $texmf_folder/fonts/map/dvips/MnSymbol
mkdir -p $texmf_folder/fonts/enc/dvips/MnSymbol
mkdir -p $texmf_folder/fonts/type1/public/MnSymbol
mkdir -p $texmf_folder/fonts/tfm/public/MnSymbol
cp enc/MnSymbol.map $texmf_folder/fonts/map/dvips/MnSymbol/
cp enc/*.enc $texmf_folder/fonts/enc/dvips/MnSymbol/
cp pfb/*.pfb $texmf_folder/fonts/type1/public/MnSymbol/
cp tfm/* $texmf_folder/fonts/tfm/public/MnSymbol/

sudo mktexlsr
sudo updmap-sys --enable MixedMap MnSymbol.map

curl http://mirror.ctan.org/fonts/minionpro/scripts.zip > scripts.zip
mkdir minionpro-scripts
cd minionpro-scripts
unzip ../scripts.zip

find /Library/Fonts/ -iname '*minion*pro*otf' -exec cp -v '{}' otf/ ';'
sudo apt-get install lcdf-typetools
./convert.sh

mkdir -p $texmf_folder/fonts/type1/adobe/MinionPro/
cp pfb/*.pfb $texmf_folder/fonts/type1/adobe/MinionPro/

# It turned out to be very important to get this 2.030 version; a mismatch gives missing characters!
curl https://lists.berlios.de/pipermail/minionpro-devel/attachments/20090814/4e956ea2/attachment.zip > enc-2.030-beta.zip
curl http://mirror.ctan.org/fonts/minionpro/metrics-full.zip > metrics-full.zip
curl http://mirror.ctan.org/fonts/minionpro/metrics-base.zip > metrics-base.zip
curl http://mirror.ctan.org/fonts/minionpro/metrics-opticals.zip > metrics-opticals.zip

cd $texmf_folder
unzip ~/Desktop/metrics-base.zip
unzip ~/Desktop/metrics-full.zip
unzip ~/Desktop/enc-2.030-beta.zip

sudo mktexlsr
sudo updmap-sys --enable MixedMap MnSymbol.map

10 comments:

  1. Hey Jeff,

    thanks for the tutorial. It was helpful but I had to do some modifications on Mac OS X 10.6.4. These were:
    1) The Adobe Minion Pro fonts were under /Library/Application Support/Adobe/Fonts

    2) The very last line should be:
    sudo updmap-sys --enable MixedMap MinionPro.map instead of sudo updmap-sys --enable MixedMap MnSymbol.map

    3) I had to download the packages manually since I could not unzip the packages that were downloaded by the curl command.

    Thanks again.
    Cheers,
    Stefan

    ReplyDelete
  2. This is extremely helpful. Wish I'd found it the first time I went through the process of installing MP for LaTeX on OS 10.6.x.

    However, I have a problem if I run the test page from the tutorial you cite at the top. I get the following error.

    > ! LaTeX Error: File `MinionPro.sty' not found.
    >
    > Latex Error: ./minionpro-test.tex:6 Emergency stop.
    >
    > Latex Error: ./minionpro-test.tex:6 ==> Fatal error occurred, no output PDF file produced!Transcript written on minionpro-test.log.
    >
    > A fatal error occured, log file is in minionpro-test.log

    Any chance you can clarify further? I wonder if I ought to have a MinionPro.map file, as other tutorials indicate but yours does not address.

    ReplyDelete
  3. Sorted. Turns out the .enc files wound up in the wrong place. I was able to get them back to the correct spot with help from this:

    $ kpsewhich -progname=pdflatex -show-path="enc files"

    The above instructions ought to have worked just fine. Not sure where my error crept in. Again, thanks for posting this.

    ReplyDelete
  4. The Adobe Minion Pro fonts were located on my macbook at /Applications/Adobe Reader.app/Contents/Resources/Resource/Font/

    You can find them by
    $ locate -i minion | grep otf

    ReplyDelete
  5. Thanks for the tutorial.

    I am working on a Mac OS X 10.6.6 (10J567).

    I followed the steps you indicated, but it dosen't work for me. I get the error message:

    kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+597/600 --dpi 597 MinionPro-It-Base-aa
    mktexpk: don't know how to create bitmap font for MinionPro-It-Base-aa.
    mktexpk: perhaps MinionPro-It-Base-aa is missing from the map file.
    kpathsea: Appending font creation commands to missfont.log.

    ** WARNING ** Could not locate a virtual/physical font for TFM "MinionPro-It-Base-aa".
    ** WARNING ** >> There are no valid font mapping entry for this font.
    ** WARNING ** >> Font file name "MinionPro-It-Base-aa" was assumed but failed to locate that font.
    ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...

    Output file removed.


    Thanks in advance.

    ReplyDelete
  6. Thanks -- this works for me on 10.7 Lion with a few changes:

    1. Various files have moved. Using 'curl -L' instead of just 'curl' gets the files from their new locations

    2. The first updmap-sys should be:
    sudo updmap-sys --enable MixedMap MinionPro.map

    3. There should be a "cd ~/Desktop" before the last set of 4 curls

    4. metrics-opticals.zip is not used.

    Many thanks!

    ReplyDelete
  7. PS I used homebrew's 'brew install lcdf-typetools' instead of the apt-get line.

    ReplyDelete
  8. Wow, have I faffed with this today. Ten hours, and I just FINALLY got the damn thing working.

    Here's my situation: brand new MacBook Air with OSX Lion, fresh installation of MacTex (w/ TexLive).

    I constructed the /texmf/ folder in my Library and treated this as my personal TeX directory, pointing all instructions there. This meant putting all the font files, encoding files, and MinionPro.map in that directory according to the standard TexTree.

    This worked fine for MnSymbol: I was able to compile the basic document for that with no trouble. Which makes the next bit all the stranger: no matter WHAT I tried, NOTHING made MinionPro functional. I was getting all variety of error messages when compiling: can't access encoding file, etc, etc.

    Eventually, I COPIED the entire /texmf/ folder that I'd created, and pasted it into the automatically-generated /texmf-local/ folder created by the MacTex installer. --> /usr/local/texlive/texmf-local/

    I let this overwrite the already-present (empty) folders. I then ran 'sudo mktexlsr', and re-ran 'sudo updmap-sys --enable Map=MinionPro.map'. This time, when I tried compiling the basic file, everything worked fine!

    This makes no sense to me, but I'm damn glad my day of MinionPro hell is at an end. Not sure what it was, exactly, that wanted to me in that Local folder, but something did, clearly! Hope this helps someone else!
    Best,
    Glenn

    ReplyDelete
  9. I got a new machine and realized that I didn't have MinionPro installed, but couldn't remember how I'd done it before. Your instructions worked perfectly -- so long as I read through the comments. Most notably Lena's comment about the correct location of the font itself and, most especially, Ben's second note about the correct updmap-sys.

    Also, I didn't install lcdf-typetools at all. As it stands, everything is working just fine.

    Thanks for the great tutorial to you and to the commenters above.

    ReplyDelete
  10. If you use texlive 2012, it is necessary to substitute "sudo updmap-sys --enable ..." with "updmap --enable...". Anyway, thanks for your very, very useful tutorial

    ReplyDelete