Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I installed a font locally under $HOME/texmf, and after running texhash everything seems to be in place:

> kpsewhich mtpro2.map
/home/mafp/texmf/fonts/map/dvips/mtpro2/mtpro2.map
> kpsewhich mt2exe.tfm
/home/mafp/texmf/fonts/tfm/pctex/mtpro2/mt2exe.tfm
> kpsewhich mt2exe.pfb
/home/mafp/texmf/fonts/type1/pctex/mtpro2/mt2exe.pfb

Then I ran

> updmap --enable Map=mtpro2.map
updmap is using the following updmap.cfg files (in precedence order):
  /etc/texmf/web2c/updmap.cfg
  /usr/share/texmf/web2c/updmap.cfg
updmap is using the following updmap.cfg file for writing changes:
  /etc/texmf/web2c/updmap.cfg
/etc/texmf/web2c/updmap.cfg unchanged.  Map files not recreated.
updmap: Updating ls-R files.

which sounds fishy, I guess it should use a updmap.cfg under TEXMFHOME. And indeed, translating a simple test file using the font gives

> pdflatex mtpro2test
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux)
 restricted \write18 enabled.
entering extended mode
(./mtpro2bug.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/home/mafp/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/home/mafp/texmf/tex/latex/amsmath/amstext.sty
(/home/mafp/texmf/tex/latex/amsmath/amsgen.sty))
(/home/mafp/texmf/tex/latex/amsmath/amsbsy.sty)
(/home/mafp/texmf/tex/latex/amsmath/amsopn.sty))
(/home/mafp/texmf/tex/latex/mtpro2/mtpro2.sty) (./mtpro2test.aux) [1{/usr/share/
texmf/fonts/map/pdftex/updmap/pdftex.map}] (./mtpro2test.aux)
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 2+0/600 --dpi 1200 mt2exe
mktexpk: don't know how to create bitmap font for mt2exe.
mktexpk: perhaps mt2exe is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
 )
!pdfTeX error: pdflatex (file mt2exe): Font mt2exe at 1200 not found
 ==> Fatal error occurred, no output PDF file produced!

What am I missing here?

share|improve this question
    
do you need to run updmap with superuser privileges and/or should you be running updmap-sys (again via sudo)? A separate comment: Lots of other files (e.g., amsmath.sty and its subordinated style files) also seem to live in /home/mafp/texmf/tex/latex/... rather than in the more common location /usr/local/texlive/2013/texmf-dist/tex/latex/... -- do you install most packages under $HOME/texmf? –  Mico Feb 16 '14 at 16:29
2  
Never install fonts in TEXMFHOME unless you really don't have superuser privileges. Use TEXMFLOCAL and sudo updmap-sys. If you do this way, remember to remove the pdftex.map file created with updmap –  egreg Feb 16 '14 at 16:57
    
@egreg OK, I will try that. Is this a technical limitation of updmap, or is there a good reason behind that? –  mafp Feb 16 '14 at 17:50
    
@mafp When you run tlmgr or, in general, update the TeX distribution and some new font is installed (or an old one is modified), updmap-sys is called. It won't touch your pdftex.map file generated with updmap, so you have to run it periodically. –  egreg Feb 16 '14 at 22:00
    
Just as reference: See also Problems installing MathTime Professional 2 font on TexLive –  Speravir Feb 17 '14 at 0:00

2 Answers 2

Installing fonts in TEXMFHOME should be the last resort only for somebody who has no super user privilege or, more precisely, no write access to TEXMFLOCAL.

The environment variable TEXMFLOCAL points to

/usr/local/texlive/texmf-local

on “vanilla” TeX Live installations, to

/usr/local/share/texmf

on TeX Live/Debian. I have no idea what it points to with SuSE Linux, but it's unimportant, because the shell command

kpsewhich --var-value=TEXMFLOCAL

will always give the right answer.

From the 2013 release, TeX Live uses a slightly different mechanism for building pdftex.map with updmap or updmap-sys. Each of the three trees TEXMFMAIN, TEXMFLOCAL and TEXMFHOME can have a updmap.cfg file under the subdirectory web2c and the recommended procedure is to add map files to the relevant updmap.cfg file; so, instead of updmap(-sys) --enable Map=mtpro2.map one should append the line

Map mtpro2.map

to the chosen updmap.cfg file and then run either updmap or updmap-sys without arguments.

So, for a user's only addition, the line should be appended to

$(kpsewhich --var-value=TEXMFHOME)/web2c/updmap.cfg

(I assume Bash shell), while for the better method (if one has write access to TEXMFLOCAL), the line should be appended to

$(kpsewhich --var-value=TEXMFLOCAL)/web2c/updmap.cfg

Then run updmap in the first case, sudo updmap-sys in the second case (or just updmap-sys from a superuser shell, depending on your OS idiosyncrasies).

Of course, all the font related files will have been installed using the appropriate tree. NEVER use TEXMFDIST for installing fonts not included in TeX Live.

Why is it better to use TEXMFLOCAL whenever possible? Because when tlmgr (vanilla TeX Live) or the OS specific package manager do an update to TeX Live which involves font packages, they will run updmap-sys that of course won't use the updmap.cfg file in TEXMFHOME (which would only refer to the one specific for the root user).

Thus, anybody who has run updmap, will have their pdftex.map file unupdated, so updmap should be manually run periodically, in order to reflect possible changes to the main, distribution managed, updmap.cfg file. Always using updmap-sys (with additional fonts in TEXMFLOCAL) avoids the problem. Note that TEXMFLOCAL is never touched by updates, and will be used as is by future releases of TeX Live.

There is always the risk of installing in TEXMFLOCAL something that later finds its place in the main distribution (it happened to me with the STIX fonts, for instance).

Anyway, my advice is to use only the vanilla TeX Live, even on Debian, Fedora, SuSE or whatnot systems.

share|improve this answer
    
(+1) Is the advantage of appending the line to the .cfg file that it will be automatically picked up when updating to a new version of TeX Live? I've mostly used the argument to updmap-sys and the getnonfreefonts-sys script must also do it that way. The only disadvantage I can see is that these changes won't be transferred when I get TL 2015. Do you have a reference for the new recommendation? The manual pages for updmap.cfg and updmap-sys don't seem to mention it, for example. –  cfr Apr 3 at 14:50
    
@cfr Look for updmap.cfg in texdoc tlmgr –  egreg Apr 3 at 15:13
    
Thanks. It isn't clear to me that that is supposed to mean that updmap-sys --enable Map= shouldn't be used, though. Isn't the point that the local updmap.cfg should be used rather than updmap-local.cfg? –  cfr Apr 3 at 15:49
    
If you are correct then the instructions in $(kpsewhich -var TEXMFDIST)/web2c/updmap-hdr.cfg are incorrect. –  cfr Apr 3 at 15:54
    
@cfr Yes; I guess they didn't update it. See updmap --help –  egreg Apr 3 at 15:59

For SuSE users: you should check the TEXMFVAR definition in /etc/texmf/web2c/texmf.conf. It probably points to the system wide directory defined in TEXMFSYSVAR. You should change it to TEXMFHOME:

TEXMFVAR = ${TEXMFHOME}

Then use updmap as a non-root user should do the job as advertised.

share|improve this answer
2  
Sorry but this is absolutely terrible advice in part for just the reasons egreg explained in his comments above. Do NOT do this. If you can alter that configuration file, then you have root privileges, and not having such privileges is the only reason to use updmap in the first place. If you have to use updmap, it will be a pain. But, if you have no choice, you have to live with the pain. There is nothing special about SuSE. egreg's advice is good there, too. –  cfr Apr 3 at 1:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.