# How to install mathgifg package

How do I install the mathgifg package on Mac with MacTeX 2013 and Windows with TeX Live 2013? I am using pdflatex so Using the erdc package on Mac OS X does not solve my problem.

-
– Harish Kumar Aug 23 '13 at 23:21
I suppose its related but it doesn't help me any since none of the instructions are applicable to MacTeX 2013 nor the Mac operating system.... – Dan Aug 24 '13 at 17:08
If my answer also helps with tex.stackexchange.com/questions/129815/…, let me know and I'll dupe the other question to this one – Joseph Wright Aug 24 '13 at 21:56
But please note that this question specifically asked about the Mac – Dan Aug 24 '13 at 22:16
Go ahead and dupe it, I haven't checked on Windows yet but I presume it should work since it did on Mac – Dan Aug 25 '13 at 3:55

## 1 Answer

The mathgifg package provides LaTeX support for the Georgia and Franklin Gothic font familes, but not the fonts themselves. The latter are available commercially: licensing issues when having to convert font formats are non-trivial, so I will simply assume you have an appropriately-licensed copy.

There are essentially three stages to installing the fonts: converting from TrueType of Adobe format, installing the necessary files locally and making (La)TeX aware of them. There are some slight variations in how these are done depending on the operating system and TeX system you use: I will try to cover the various options! Note also that if your license covers it, you only have to do the conversion once to install on multiple systems.

Note that font installation is non-trivial and needs some experience with the Command Line/Terminal.

## 1. Conversion of files

The first thing necessary is to get hold of a copy of ttf2pt1, which is needed to do the conversion. It's available on SourceForge in source format (Mac or Linux) or as precompiled binary (Windows). For Mac/Linux users, simply unzip the archive, and using the Terminal run

make all

inside the folder: this should produce an executable ttf2pt1. The Windows installer puts the binary inside C:\Program Files (x86)\GnuWin32\bin\ as ttf2pt1.exe. In either case, the easiest way to work is to copy this binary to where we will do the next step: the conversion itself. I'll assume you create a temporary folder on your Desktop called font-convert: put the executable there.

The next step is to collect up the font (.ttf) files and give them the correct names. You don't necessarily have to have all of the fonts, only those you will use. There is a table of the font file names in the mathgifg documentation. On my Windows systems I have the Georgia and the 'basic' Franklin Gothic files with the 'correct' names, while on my Mac I have the same files but with longer 'descriptive' names. In any case, the safest approach is to copy the files to our font-convert folder, then rename if required.

We now need the Terminal/Command prompt, and to change to the font-convert folder. There, you need to do

./ttf2pt1 -a -b <filename>

for each font file: for example <filename> will be georgia.ttf for the Georgia roman font. This will create a .pfb and a .afm file for each .ttf file. Once you've done that, we ill not need the .ttf (or .afm) files further: it is the .pfb files that are important.

## 2. Installation of files

The second stage of the process is to install the fonts and support files locally. There is a decision to make here: install only for a single user or for all users on the computer. There are technical issues in installing for a single user, so I'll assume you will add for all users (this probably needs Admin/root access).

The location to put the font files depends on your operating system and TeX system: we need to know where your 'local texmf tree' is:

• TeX Live on Linux/Mac: /usr/local/texlive/texmf-local
• TeX Live on Windows: C:\texlive\texmf-local (assuming a standard installation location)
• MiKTeX: see Create a local texmf tree in MiKTeX: you will need to create a new tree in 'Admin' mode if you have a mutli-user installation

I'll refer to that folder as '<localtexmf>'. Inside it, you need to create two folders

fonts/type1/microsoft/georgia
fonts/type1/itc/franklingothic

and copy the .pfb files into the appropriate places.

You now need the LaTeX support files: these are best downloaded as a 'ready to go' file mathgifg.tds.zip. If you unzip this, you'll find it contains a lot of files. They need to go inside <localtexmf> in their respective folders (stuff in the fonts folder needs to go in the <localtexmf>/fonts directory, stuff in the tex folder needs to go in the <localtexmf>/tex directory, etc.), so for example you end up with

<localtexmf>/tex/latex/mathgifg/mathgifg.sty
<localtexmf>/tex/latex/mathgifg/omlzifg.fd
...
<localtexmf>/fonts/afm/microsoft/georgia/georgia.afm
...

You don't have to install the files in the doc folder, although they may be handy later.

You then need to make sure TeX can find the files. For TeX Live, as root/Admin do texhash <localtexmf> (with correct folder name). For MiKTeX, use initexmf --admin --update-fndb=<localtexmf> as Admin, again filling in the appropriate folder name. (If you have a single user MiKTeX installation, you don't need the --admin option here or in the instructions below.)

## 3. Updating maps

The final step is to enable TeX to find the fonts: this is done by updating the map files.

For TeX Live/MacTeX, at the Terminal append

Map mathgifg.map

to the file

<localtexmf>/web2c/updmap.cfg

using a text editor (create the file if it does not already exist). Then run

updmap-sys

Both steps are to be performed using sudo for Linux/Mac or an Administrator Command Prompt on Windows.

For MiKTeX at the (Admin) Command Prompt do

initexmf --admin --edit-config-file updmap

and add the line

Map mathgifg.map

then after saving the file run

initexmf --admin --mkmaps

again as Admin.

If all has worked, you should now be able to do \usepackge{mathgifg} and everything should work.

-
I usually recommend never installing fonts in the personal tree, at least for TeX Live; the correct place is the local tree, otherwise any change to fonts installed by the package manager will require running manually updmap. (I can't talk about MiKTeX.) – egreg Aug 24 '13 at 20:14
To install ttf2pt1 on OS X, you can also use the Homebrew command brew install ttf2pt1 – Matthew Rankin Sep 27 '13 at 14:05
@MatthewRankin As it's a one-file download, I think just grabbing the script is easier (unless you are a hardcore Homebrew user). – Joseph Wright Sep 27 '13 at 14:06
Note that if you use pdflatex, you can use the truetype without converting to type1 which is more likely to be compatible with the licensing. You still need to generate .tfm files but that is less likely to count as converting the fonts themselves. – cfr Feb 25 '14 at 17:58