1

[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?

9
  • 1
    I don’t have a Mac to test this on. However, from the messages you’re getting, it does not seem to be searching your ~/Library/texmf. You should be able to put the files in /usr/local/texlive/texmf-local.
    – Davislor
    Aug 26, 2020 at 11:34
  • @Davislor: QM 05 FAQ of mactex (tug.org/mactex/faq/faq.html#qm05): "Where do I put my personal additions to the texmf tree? AM.05: They go in ~/Library/texmf". So I'm doing what they're telling me to do, and am slightly wary of putting things elsewhere instead...
    – st01
    Aug 26, 2020 at 11:41
  • Yeah, but font map files are an exception. The updmap-sys command doesn't search your $TEXMFHOME directory, and updmap-usr is a trap. You never want to run it, because it will override your system map instead of supplementing it.
    – Davislor
    Aug 26, 2020 at 11:48
  • You could also run updmap-sys --force --cnffile=~/Library/texmf/web2c/updmap.cfg, though.
    – Davislor
    Aug 26, 2020 at 11:49
  • At least, that’s how it works on other OSes. I don’t know the quirks of MacTeX.
    – Davislor
    Aug 26, 2020 at 11:52

1 Answer 1

3

After some discussion in the comments, the best solution was to unpack the files in your TEXMFLOCAL directory (Here, /usr/local/texlive/texmf-local), instead of TEXMFHOME (Here, ~/Library/texmf).

The MacTeX FAQ recommands putting local files in the latter, but 8-bit font maps are an exception. You never want to run updmap in user mode. It’s a trap that will override your system font maps instead of supplementing them, and get more and more out of date as you update your system tree. However, updmap-sys does not search TEXMFHOME.

6
  • 1
    Thanks for wrapping up the discussion into an answer I can now accept.
    – st01
    Aug 26, 2020 at 12:20
  • I always recommend TEXMFLOCAL. TherE is a Preference setting in TeX Live Utility, a front end for to tlmgr and more, that will automatically run updmap-usr when you use it to do you TeX Live updates. Aug 26, 2020 at 13:38
  • @HerbSchulz Does that work with MacTeX?
    – Davislor
    Aug 26, 2020 at 14:04
  • @HerbSchulz I almost always use TEXMFLOCAL as well
    – Davislor
    Aug 26, 2020 at 14:05
  • 1
    @Davislor : that works with TeX Live Utility which is a front end for tlmgr and Mac Only. It works with the TeX Live installed with MacTeX or directly from TUG. Aug 26, 2020 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .