3

I am installing Tex Live for the first time. I am able to generate PDFs for the basic LaTeX files sample2e.tex, small2e.tex, testpage.tex, and nfssfont.tex, mentioned here.

When I try to build a book from R using the code below I get this (very long) error:

>system("xelatex -interaction=batchmode r-packages ")
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata/BI, rootname = Inconsolata/BI, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata/BI.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata/BI.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata/B, rootname = Inconsolata/B, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata/B.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata/B.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata/I, rootname = Inconsolata/I, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata/I.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata/I.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Inconsolata.mf

The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm
kpathsea: Appending font creation commands to missfont.log.

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata/BI

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata/B

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata/I

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

kpathsea: Running mktextfm Inconsolata

The command name is C:\texlive\2018\bin\win32\mktextfm

I think the relevant part of the error message is:

name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf Inconsolata.mf
The command name is C:\texlive\2018\bin\win32\mktexmf
Cannot find Inconsolata.mf.
name = Inconsolata, rootname = Inconsolata, pointsize = 
mktexmf: empty or non-existent rootfile!

I've tried running the code suggested here, which seems to find Inconsolata on my computer:

C:\Users...>tlmgr search --global --all Inconsolata
  tlmgr.pl: package repository 
  http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (not
  verified: gpg unavailable)
  inconsolata - A monospaced font, with support files for use with TeX
  inconsolata:
        texmf-dist/fonts/opentype/public/inconsolata/InconsolataN-Bold.otf
        texmf-dist/fonts/opentype/public/inconsolata/InconsolataN-Regular.otf
        texmf-dist/fonts/opentype/public/inconsolata/Inconsolatazi4-Bold.otf
        texmf-dist/fonts/opentype/public/inconsolata/Inconsolatazi4-Regular.otf
        texmf-dist/fonts/type1/public/inconsolata/Inconsolata-zi4b.pfb
        texmf-dist/fonts/type1/public/inconsolata/Inconsolata-zi4r.pfb
        texmf-dist/fonts/type1/public/inconsolata/InconsolataN-Bold.pfb
        texmf-dist/fonts/type1/public/inconsolata/InconsolataN-Regular.pfb
C:\Users...>tlmgr search --global --file Inconsolata.mf
  tlmgr.pl: package repository 
  http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (not
  verified: gpg unavailable)
C:\Users...>tlmgr install tlmgr.pl
  tlmgr.pl: package repository 
  http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (not
  verified: gpg unavailable)
  tlmgr.pl install: package tlmgr.pl not present in repository.
  tlmgr.pl: action install returned an error; continuing.
  tlmgr.pl: An error has occurred. See above messages. Exiting.

And when I run tlmgr-gui.exe it lists the Inconsolata package as already being installed. So why do I get the error `Cannot find Inconsolata.mf.'? Thanks.

2 Answers 2

4

There is a inconsolata.fontspec in the package, which is used if you try to load the font by name. But it works for me on windows only correctly, if I call the font with a lowercase i, with uppercase I it breaks with your error message:

\documentclass{article}

\usepackage{fontspec}
%\setmainfont{Inconsolata} %breaks
\setmainfont{inconsolata}  %works
\begin{document}
abc

\end{document}
0

Before starting I should list my environment info. This should apply to versions of R and latex in circulation as of the previous year. This is, of course, a linux-specific guide but with simple modifications, should port to other OS'es

uname -a Linux First-Floor 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux

latex -v pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) kpathsea version 6.2.3

Before I continue, I should say that I found the following post extremely useful in helping to understand how mktexlsr or texhash finds the directory trees from the texlive configuration:

https://ipfs-sec.stackexchange.cloudflare-ipfs.com/tex/A/question/20160.html

Having read that page, we learn that my distro at home (windows subsystem linux, ubuntu has the distro in /usr/share/texlive/texmf-dist and the local tree in /usr/local/share/texmf while at work, CENTOS 7.4, from about two or three years ago, has distro in /usr/share/texlive/texmf-dist and the local tree in /usr/share/texlive/texmf-local. That looks problematic because of course local trees are supposed to be in /usr/local/share so they don't get written over by package updates, but so far so good. These are the steps I took at home.

  1. Find the main branch of your tex distribution. For my fairly recent texlive its /usr/share/texlive/texmf-dist
  2. As mentioned in the post linked above, find out where your local tree goes by looking at the texmf.cnf file in the web2c subfolder within your main distro texmf root.

    cd /usr/share/texlive/texmf-dist/web2c
    less texmf.cnf
    
  3. It is there that we learn, in my case, that

    % Local additions to the distribution trees.
    TEXMFLOCAL = /usr/local/share/texmf
    
  4. So this is where we start. If you don't have the following subdirectories, make them

    sudo mkdir -p /usr/local/share/texmf
    sudo mkdir -p /usr/local/share/texmf/doc
    sudo mkdir -p /usr/local/share/texmf/fonts
    sudo mkdir -p /usr/local/share/texmf/tex/latex/inconsolata
    
  5. download the inconsolata-zi4.zip package

    cd ~/Downloads
    wget http://tug.ctan.org/tex-archive/fonts/inconsolata-zi4.zip
    unzip inconsolata-zi4.zip
    
  6. As root, execute the following commands (the first is to become root). NOTE "MyName" is the name of your user home directory

    sudo su -
    cp ~/Downloads/inconsolata/doc /usr/local/share/texmf/doc
    cp -ru ~/Downloads/inconsolata/tex/* /usr/local/share/texmf/tex/latex/inconsolata
    dns="enc map opentype tfm type1"
    for d in $dns; do
      mkdir -p /usr/local/share/texmf/fonts/$d/inconsolata
      cp -ru /home/MyName/Downloads/inconsolata/$d/* /usr/local/share/texmf/fonts/$d/inconsolata
    done
    
  7. Execute some of the commands in block "A" of the README file, being careful to customize the paths to your local texmf tree.

    sudo echo Map zi4.map >> /usr/local/share/texmf/web2c/updmap.cfg
    sudo mktexlsr
    sudo -H updmap-sys
    

This worked out great for me. Now R CMD check mypkg is able to build the manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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