31

I use MikTeX in order to compile pdf files when creating R packages. Today I found out that I run into the following error:

* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
!pdfTeX error: pdflatex.EXE (file ts1-zi4r): Font ts1-zi4r at 540 not found
 ==> Fatal error occurred, no output PDF file produced!
* checking PDF version of manual without hyperrefs or index ... ERROR

Any suggestion on how I might be able to fix this problem?

(this is after I've updated Rd.sty in R, following the suggestion here)

Thanks!

Tal Galili
  • 1,389
  • 1
    Try if it works if you run updmap on the command line. – Ulrike Fischer Jul 24 '13 at 13:37
  • I have exactly the same problem when using \usepackage{zi4} instead of \usepackage{inconsolata} as suggested in http://tex.stackexchange.com/questions/119925/inconsolata-missing-after-miktex-update, but unrelated to Rd (not using anything related to R). I don't know if I should open a separate question. – grssnbchr Jul 24 '13 at 13:44
  • I just changed from \usepackage{zi4} to \usepackage{inconsolata} and got the error: LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! LaTeX Error: File `inconsolata.sty' not found.

    Type X to quit or to proceed, or enter new name. (Default extension: sty)

    ! Emergency stop. <read *>

    l.281

    – Tal Galili Jul 24 '13 at 13:51
  • @UlrikeFischer - could you please give more details? simply running updmap does not seem to do much. – Tal Galili Jul 24 '13 at 13:52
  • 1
    Run this document: \documentclass{article} \begin{document} \font\test=ts1-zi4r \test \char95 \end{document} with pdflatex. Does it work? – Ulrike Fischer Jul 24 '13 at 14:06
  • Hi Ulrike, I just ran it and got: !pdfTeX error: pdflatex.EXE (file ts1-zi4r): Font ts1-zi4r at 600 not found ==> Fatal error occurred, no output PDF file produced! texify: pdflatex failed for some reason (see log file). – Tal Galili Jul 24 '13 at 14:20
  • @UlrikeFischer I got exactly the same error when running this document. – grssnbchr Jul 25 '13 at 06:56
  • @wnstnsmth: Well it works fine for me on a current miktex and in texlive. And the error indicates that the map files are not up-to-date. So 1. run the update manager (in miktex as user + as admin) and check for update of inconsolata or zi4, 2. run updmap on the command line (as user). If it doesn't help run updmap --verbose >updmap.log and show the created log-file. – Ulrike Fischer Jul 25 '13 at 07:04
  • @UlrikeFischer I ran mpm --admin --verbose --find-updates, but couldn't find any package with name inconsolata or zi4. Then I ran updmap both as user and as admin, but I still get the same error. This is the updmap log: http://pastebin.com/Ucb7Ew5R – grssnbchr Jul 25 '13 at 08:48
  • @wnstnsmth: I wrote: check for update as admin and as user. If you did install the package as user than you must also update it as user. – Ulrike Fischer Jul 25 '13 at 09:16
  • @UlrikeFischer I actually tried both. This is the output for user http://pastebin.com/CW7jnzdK and this is the output for admin http://pastebin.com/6qmc84qX -- both look quite the same and I have no clue which package could be related to zi4 or inconsolata. The only thing I know is that the inconsolata package I installed (as user) yesterday was packaged on 2013-07-09. – grssnbchr Jul 25 '13 at 09:48
  • It is a bit unusual imho that only one updmap.cfg is parsed. What do you get if you run kpsewhich zi4.map? And if you run initexmf --report where is the user install root? – Ulrike Fischer Jul 25 '13 at 10:48
  • Did you find a solution? – Tal Galili Jul 28 '13 at 12:47
  • This was likely due to some backward-incompatible changes to the inconsolata package, which has since been sorted out - the latest version on CTAN should be compatible again. Can you check if updating MikTeX now fixes the problem? – Christian Clason Oct 22 '13 at 09:13
  • (Note that the patch described in the link is then no longer necessary.) – Christian Clason Oct 22 '13 at 09:19

5 Answers5

34

I ran into this issue, and after some time spent banging my head against a post, I did reach a solution. After installing the package, run the following steps from inconsolata README. Open a cmd and run:

initexmf --update-fndb
initexmf --edit-config-file updmap

The latter command should open updmap.cfg in your default editor, commonly Notepad. Add the line below, then save and close.

Map zi4.map 

Now in the command window, type

initexmf --mkmaps
Ian Fellows
  • 531
  • 3
  • 7
  • 7
    Hallelujah I was banging my head against the wall for 3hrs with this. Came across this post and it worked. – Tyler Rinker Sep 15 '13 at 13:01
  • This worked for me. For users not so experienced: put line 1 and 2 in a windows console (cmd). Line 3 and 4 of the answer are description for you how to handle line 5. Line 6 is a description for you. Enter line 7 and you're done! – agoldev Jul 26 '17 at 13:22
5

In ubuntu, try to install

texlive-fonts-extra

for me, it did the trick.

EDIT:

this problem is not specific to windows/MikTeX. It's caused by the engine used to compile R-help files.

In particular it will also happen if you are using ubuntu (in my case 12.04, with standard laTex install from the ubuntu reps, e.g. no PPA).

The lines above solved the problem for me.

user1933
  • 335
4

R 3.0.2 is normally completely compliant with the latest version of inconsolata (July 2013 or later), so if you still have problems, start with updating your TEX installation, your R installation and your TEX packages.

On a Windows machine with a MIKTEX installation, try the following steps :

  • update R to at least R3.0.2 (that one is adapted for the new inconsolata package)
  • update your MIKTEX installation to the latest version
  • Run the update manager to make sure you have the latest version of inconsolata installed

  • If you use a different account for administrator and user, check if you don't have the inconsolata package installed twice (once as administrator, once as user). If so, either delete one of both installations, or make sure both versions are updated to the latest.

I had an old version of inconsolata floating around in my user installation, which kept me busy for a couple of hours. This post of Duncan Murdoch led me to the solution.

If all the above is OK, it should work without having to update Rd.sty or installing extra fonts on all main OS's.

0

I got the same error when I installed R, Rtools and MiKTeX in a Windows 8 machine. I followed the suggestions made in https://stat.ethz.ch/pipermail/r-devel/2013-June/066850.html, and installed the patched version of R-3.0.1. However the problem remained with the same message error.

The solution for me was just to uninstal the inconsolata package in the MiKTeX Package Manager, and then run the command R CMD Rd2pdf --pdf mypackage again, and it worked for me!

Best, Tonio

Toño
  • 516
  • 3
  • 15
0

Currently the link

suggestion here

does not work but I imagine it is the same solution given in https://stackoverflow.com/a/60856519/997979, as I got the same problem. When I run the command updmap-user I got the warning:

*************************************************************                                  
*                                                           *                                  
* WARNING: you are switching to updmap's per-user mappings. *                                  
*            Please read the following explanations.        *                                  
*                                                           *                                  
*************************************************************

You have run updmap-user (as opposed to updmap-sys) for the first time; this
has created configuration files which are local to your personal account.

Any changes in system map files will not be automatically reflected in
your files; furthermore, running updmap-sys will no longer have any
effect for you. As a consequence, you have to rerun updmap-user yourself
after any change in the system directories; for example, if a new font
package is added.

See http://tug.org/texlive/scripts-sys-user.html for details.

If you want to undo this, remove the files mentioned above.

Looking at the referenced webpage I followed the suggestion of undo that and remove the files in ~/TEXMFVAR/fonts/map and then, as I had already installed the package texlive-fonts-extra, I run as root updmap-sys.

Then, all worked nice.

iago
  • 927