November 10, 2012

· Nerdery

Setting up a new machine is usually a pain, especially if—like me—you have a bunch of additional stuff installed that isn’t living in your user directory, like a TeX installation. Cloning from the old machine is often a good idea, but things don’t always work as they should. And sometimes you just want to set up from scratch. I’m at the point where my most of my text editing and data analysis stuff can be up and running fairly quickly: install Xcode via the App Store (or just the command-line tools if you want), then MacTeX, then R, then Emacs, then my Starter Kit for the Social Sciences, then my own LaTeX style files and bib files. Other useful stuff after that includes Pandoc. Tedious! But at this point also fairly straightforward.

One piece that always gives me a headache, though, is getting Minion Pro set up for use with LaTeX. Minon is a terrific typeface and I use it for my papers. It’s expensive to buy but often comes bundled with various Adobe products, notably Acrobat reader. If you have the font installed on your Mac somewhere, then there’s a package of stuff available to get it to work with pdflatex. But it’s a pain to install. Note at this point that, if you like, you can simply use xelatex instead to use all your installed fonts with latex. But because I have a debilitating obsessiveness in this regard, I know that xelatex doesn’t let you use certain microtype features available to pdflatex. So I need to set up Minion Pro to work with pdflatex. Here is a shell script I came across that will do that for you automatically. Don’t run it unless you know what you’re doing, though. Seeing as I have to go through this any time I set up a new Mac, and always forget the steps, this is pretty useful.

If you are a sensible person, of course, you will not even find yourself facing this ridiculous situation.

## Information

## 0.1: Install LCDF Typetools
## If you use Homebrew (, then uncomment: 
# brew install lcdf-typetools 

## 0.2: If ~/tmp doesn't exist, create it.
# mkdir ~/tmp

## Destination. System wide is best in recent MacTeX releases:  
DEST=`kpsexpand '$TEXMFLOCAL'`

## Downloader:
DOWNLOAD="curl -L -O"

## Directory where minion fonts may be found:



## Everything gets done in a temporary directory
cd ~/tmp

## 1: MnSymbol

unzip mnsymbol
cd mnsymbol/tex

## Generates MnSymbol.sty
latex MnSymbol.ins

mkdir -p $DEST/tex/latex/MnSymbol/      \
    $DEST/fonts/source/public/MnSymbol/ \

cp MnSymbol.sty $DEST/tex/latex/MnSymbol/MnSymbol.sty
cd .. # we were in mnsymbol/tex
cp source/* $DEST/fonts/source/public/MnSymbol/
cp MnSymbol.pdf README $DEST/doc/latex/MnSymbol/

mkdir -p $DEST/fonts/map/dvips/MnSymbol \
    $DEST/fonts/enc/dvips/MnSymbol      \
    $DEST/fonts/type1/public/MnSymbol   \
cp enc/ $DEST/fonts/map/dvips/MnSymbol/
cp enc/*.enc $DEST/fonts/enc/dvips/MnSymbol/
cp pfb/*.pfb $DEST/fonts/type1/public/MnSymbol/
cp tfm/* $DEST/fonts/tfm/public/MnSymbol/

## Not strictly needed if DEST is in the home
## tree on OSX (~/Library ...), but will be needed otherwise
sudo mktexlsr
sudo updmap -sys --enable MixedMap

# pdflatex mnsymbol-test.tex

## 2: MinionPro
mkdir -p ~/tmp/minionpro
cd ~/tmp/minionpro


## This will make the otf directory, among other things.

cp $MINIONSRC/Minion*otf otf/

## Generate the pfb files
## This step requires that the LCDF type tools are installed.  Get them here:

## Copy the pfb files to where they belong:
mkdir -p $DEST/fonts/type1/adobe/MinionPro
cp pfb/*.pfb $DEST/fonts/type1/adobe/MinionPro

cd $DEST
unzip $SRC/
unzip $SRC/
unzip $SRC/
cd $SRC

## Not strictly needed if DEST is in the home
## tree on OSX (~/Library ...), but will be needed otherwise

sudo mktexlsr
sudo updmap -sys --enable MixedMap

## Test:
# pdflatex minionpro-test.tex

All Categories


I am Professor of Sociology at Duke University. I’m also affiliated with the Kenan Institute for Ethics. Read a brief overview of my work or my Curriculum Vitae.



To be notified of updates, you can subscribe to the  RSS feed for the site.