6

I am trying to install newtx from CTAN for my user only. At first, I tried to follow the README which is available there.

First of, I am using TeXlive 2011 on Archlinux. I have also checked if all my TEXMF... variables point to the right places using kpsewhich --var-value:

  • TEXMFHOME = /home/$USER/texmf
  • TEXMFCONFIG = /home/$USER/.texlive/texmf-config

Then I did the "installation":

  • mkdir -p /home/$USER/texmf/tex/latex/newtx
  • cp -r everything from newtx.zip to that file
  • Create the ls-R by running texhash /home/$USER/texmf/
  • Run updmap --enable Map=ntx.map
  • Get the first error:

$ updmap --enable Map=ntx.map:

copy /etc/texmf/web2c/updmap.cfg => /home/$USER/.texlive/texmf-config/web2c/updmap.cfg
Config file: "/home/$USER/.texlive/texmf-config/web2c/updmap.cfg"
dvips output dir: "/home/$USER/.texlive/texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/home/$USER/.texlive/texmf-var/fonts/map/pdftex/updmap"
dvipdfm output dir: "/home/$USER/.texlive/texmf-var/fonts/map/dvipdfm/updmap"
pxdvi output dir: "/home/$USER/.texlive/texmf-var/fonts/map/pxdvi/updmap"

/usr/bin/updmap is creating new map files
using the following configuration:
  LW35 font names                  : URWkb
  prefer outlines                  : true
  texhash enabled                  : true
  download standard fonts (dvips)  : true
  download standard fonts (pdftex) : true
  create a mapfile for pxdvi       : false

Scanning for LW35 support files  [  3 files]
Scanning for MixedMap entries    [ 36 files]
Scanning for KanjiMap entries    [  0 files]
Scanning for Map entries         [129 files]


ERROR:  The following map file(s) couldn't be found:
    ntx.map

    Did you run mktexlsr?

    You can delete non-existent map entries using the option
      --syncwithtrees.

It can't find ntx.map! I found this guide for installing maps on Debian, and tried to adapt it to my system. So I did the same steps as above, but now putting ntx.map into /home/$USER/texmf/fonts/map/newtx/.

updmap --enable Map=ntx.map runs through nicely now, and I can find an entry Map ntx.map in /home/$USER/.texlive/texmf-config/web2c/updmap.cfg, as it should.

But having a minimal example:

\documentclass{minimal}

\usepackage{mathtools}
\usepackage{newtxmath}

\begin{document}
\begin{equation*}
    \Phi(u) = \frac{1}{\sqrt{2\pi}} \int^u_{-\infty} e^{-t^2/2} dt
\end{equation*}
\end{document}

I get a compilation error with pdflatex now, it can't find the font ntxmi (just a small excerpt from the log):

kpathsea: Running mktextfm ntxmi
/usr/share/texmf/web2c/mktexnam: Could not map typeface abbreviation tx for ntxmi.
/usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ntxmi
This is METAFONT, Version 2.718281 (TeX Live 2012/dev/Arch Linux)


kpathsea: Running mktexmf ntxmi
! I can't find file `ntxmi'.
<*> ...e:=ljfour; mag:=1; nonstopmode; input ntxmi

Please type another input file name
! Emergency stop.
<*> ...e:=ljfour; mag:=1; nonstopmode; input ntxmi

Transcript written on mfput.log.
grep: ntxmi.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ntxmi' failed to make ntxmi.tfm.

What to do?

EDIT: kpsewhich newtxmath.sty correctly points to /home/$USER/texmf/tex/latex/newtx/newtxmath.sty, and kpsewhich ntx.map to /home/$USER/texmf/fonts/map/newtx/ntx.map.

lockstep
  • 250,273
mSSM
  • 3,152
  • 1
    You probably have the tfm and vf files in the wrong place: they should go under /home/$USER/texmf/fonts/tfm and /home/$USER/texmf/fonts/vf respectively. However it's in general not a good idea to use updmap and install font packages in TEXMFHOME. Better use TEXMFLOCAL and updmap-sys, if you have administrator privileges. – egreg Jun 20 '12 at 11:56
  • @egreg: I guess the same applies to .pfb and .fd files? Also, I just realized: is the place for ntx.map correct, or do I need to place it into TEXMFHOME/fonts/dvips/newtx (or change dvips to pdftex or something like that alternatively)? You are right about TEXMFLOCAL; but since the TeXlive 2012 update is supposed to come soon, I just wanted to have this in my $HOME to get rid of it quickly. – mSSM Jun 20 '12 at 12:03
  • 1
    .fd files should go in .../tex/latex/newtx. Note that texhash (or mktexlsr as it's called now) is not necessary for things in TEXMFHOME – egreg Jun 20 '12 at 12:16
  • Aha, we are getting somewhere! Thanks a lot; I had to also put the .pfb files into TEXMFHOME/fonts/type1/newtx/, and now everything compiles. I am happy! :-D – mSSM Jun 20 '12 at 12:25
  • 1
    @egreg: Are you sure about not needing to run texhash on TEXMFHOME? If I do not do this, then pdflatex will not see newtxmath.sty. The same is true for any other package installed in TEXMFHOME (for example, I also have the developmental version of PGF in there). Without texhash and the proper ls-R in TEXMFHOME, pdflatex will always use TEXMFDIST (/usr/share/texmf-dst/). – mSSM Jun 20 '12 at 12:27
  • When you do kpsewhich -var-value TEXMF, the /home/$USER/texmf subpath should not be preceded by !!, like, for instance, /usr/local/texlive/2011/texmf-dist. If this is the case, remove the ls-R file and never force mktexlsr on TEXMFHOME. – egreg Jun 20 '12 at 12:39

2 Answers2

11

You can't copy all the content of your zip into tex/latex/. The various file types must go in different branches of your local texmf tree. E.g. the .tfm should go in /fonts/tfm/newtx, the .vf in fonts/vf/newtx and so on. Look in your main texmf tree for examples of correct pathes.

Ulrike Fischer
  • 327,261
  • see also: http://tex.stackexchange.com/questions/88423/manual-font-installation – 0 _ Jan 14 '16 at 22:01
6

You cannot simply copy everything into the latex directory, as mentioned above. The files should be placed in the following directories:

  • *.enc -> fonts/enc/public/newtx/
  • *.map -> fonts/map/dvips/public/newtx/
  • *.tfm -> fonts/tfm/public/newtx/
  • *.pfb -> fonts/type1/public/newtx/
  • *.vf -> fonts/vf/public/newtx/
  • *.fd, *.sty -> tex/latex/newtx/

If you put them in $HOME/texmf ($TEXMFHOME) then no need to run mktexlsr (or texhash, which is the same).

After that re-run the updmap call as you did.

norbert
  • 8,235
  • From those of us stuck behind proxy's and firewalls that block the auto installer I thank you. All I wanted was a List of locations and Files for those places and here it is. – Dan Aug 12 '13 at 22:55