[Background: having run out of space and patience, I wiped my system drive and reinstalled Catalina from zero. I am now reinstalling all the applications I still use, one by one.]
I installed MacTex from http://www.tug.org/mactex/mactex-download.html and it largely works, but I need to install an additional non-free font, Sabon, for which I have a licence and the relevant files. The notes to myself from a few years back tell me that (given a sabon2.tgz file I prepared at a time, which contains a directory structure with a bunch of Sabon-relevant files) I should create a personal texmf directory at ~/Library/texmf/
.
In there,
tar zxvf sabon2.tgz
texhash
updmap --enable Map=psb.map
This recipe, which I adapted from something that worked on Linux, had worked successfully for me on mac around 2017. If I changed anything in the meantime, I forgot to note it down. When I tried my own instructions today, however, they didn't work. Texhash said that a bunch of directories were not writable:
$ texhash
texhash: /usr/local/texlive/2020/texmf-config: directory not writable. Skipping...
texhash: /usr/local/texlive/2020/texmf-dist: directory not writable. Skipping...
texhash: /usr/local/texlive/2020/texmf-var: directory not writable. Skipping...
texhash: /usr/local/texlive/texmf-local: directory not writable. Skipping...
texhash: Done.
I got round that by running texhash as sudo, though I'm not sure that's what I was supposed to do. FAQ QM05 at https://tug.org/mactex/faq/faq.html#qm05 says it's not necessary to run texhash when adding files to ~/Library/texmf, so I presume this step has become unnecessary in 2020. OK, so we move on. Next failure:
$ updmap --enable Map=psb.map
updmap [ERROR]: Either -sys or -user mode is required.
updmap [ERROR]: In nearly all cases you should use updmap -sys.
updmap [ERROR]: For special cases see https://tug.org/texlive/scripts-sys-user.html
Following the error message I add -sys...
$ updmap -sys --enable Map=psb.map
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
updmap: can't write to /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg: Permission denied at /Library/TeX/texbin/updmap line 1589.
...but again a permission error. Here too, I add sudo and retry:
$ sudo updmap -sys --enable Map=psb.map
updmap [WARNING]: resetting $HOME value (was /Users/XXX) to root's actual home (/var/root).
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
Creating new config file /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
dvips output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/usr/local/texlive/2020/texmf-var/fonts/map/dvipdfmx/updmap"
updmap [ERROR]: The following map file(s) couldn't be found:
updmap [ERROR]: psb.map (in /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg)
updmap [ERROR]: Did you run mktexlsr?
You can disable non-existent map entries using the option
--syncwithtrees.
I imagine the reason why updmap couldn't find psb.map is because psb.map is in my user's ~/Library/texmf, but if I run updmap as root then it's not searching that place. On the other hand, if I run it as me, it can't update the file.
Thanks to this question, Local font installation problems, I found out I could write updmap-sys without space, and that would work without sudo:
$ updmap-sys --enable Map=psb.map
updmap will read the following updmap.cfg files (in precedence order):
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
/usr/local/texlive/2020/texmf-dist/web2c/updmap.cfg
updmap may write changes to the following updmap.cfg file:
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
/usr/local/texlive/2020/texmf-config/web2c/updmap.cfg unchanged. Map files not recreated.
updmap: Updating ls-R files.
And that file now contained the single line "Map psb.map":
$ cat /usr/local/texlive/2020/texmf-config/web2c/updmap.cfg
Map psb.map
However, on compiling a known-good tex file that used Sabon, I got
$ pdflatex test.tex
...
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+264/600 --dpi 864 psbb8r
mktexpk: don't know how to create bitmap font for psbb8r.
mktexpk: perhaps psbb8r is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
(see the transcript file for additional information)
!pdfTeX error: pdflatex (file psbb8r): Font psbb8r at 864 not found
==> Fatal error occurred, no output PDF file produced!
Why does it want to create any bitmap fonts in the first place? I just want vector fonts anyway. It's not the 20th century any more.
What am I missing and what should I be doing instead?
~/Library/texmf
. You should be able to put the files in/usr/local/texlive/texmf-local
.updmap-sys
command doesn't search your$TEXMFHOME
directory, andupdmap-usr
is a trap. You never want to run it, because it will override your system map instead of supplementing it.updmap-sys --force --cnffile=~/Library/texmf/web2c/updmap.cfg
, though.