Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inconsolata missing to build R vignette

On ubuntu 14.04 with texlive, checking an R package, for example with devtools check() would return :

LaTeX errors found:
! LaTeX Error: File `inconsolata.sty' not found.

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

! Emergency stop.
<read *> 

l.276 ^^M

!  ==> Fatal error occurred, no output PDF file produced!
like image 998
cmbarbu Avatar asked Dec 30 '15 06:12

cmbarbu


3 Answers

Installing texlive-fonts-extra should take care of it.

You can also (though probably not recommented) tell Rd not to use inconsolata. Just change:

\DeclareOption{inconsolata}{\setboolean{Rd@use@inconsolata}{true}}

to

\DeclareOption{inconsolata}{\setboolean{Rd@use@inconsolata}{false}}

in your Rd.sty file. On my installation it is at :

/usr/share/R/share/texmf/tex/latex/Rd.sty

but a

locate Rd.sty

should find it on any system.

like image 118
cmbarbu Avatar answered Nov 18 '22 07:11

cmbarbu


I'm on macOS using Homebrew and this worked for me:

# LaTeX tools like pdflatex
brew cask install basictex

# Install texlive packages needed to build R package vignettes
sudo tlmgr update --self
sudo tlmgr update --all
sudo tlmgr install titling framed inconsolata
sudo tlmgr install collection-fontsrecommended
like image 43
Kamil Slowikowski Avatar answered Nov 18 '22 09:11

Kamil Slowikowski


If you are using the Travis Continuous Integration service, your problem could be related to the CTAN mirrors having yet to update.

The issue appears in the Travis R community forum:

might be related to the recent switch to TexLive-2019 as the LaTeX package manager seems to fail finding inconsolata in the repository.

...

It looks to me like the mirror chosen was has not updated to 2019, so I think this will resolve itself naturally when the mirrors catch up. If not I can look into it.

In the meantime, I solved it by forcing a previous version of TeXLive with a downgrade to OSX 10.12 in .travis.yml:

# macOS 10.12 version
osx_image: xcode9.2

See this Travis page for the correspondence between XCode and OSX versions and the original thread in DevOps StackExchange.

like image 3
miguelmorin Avatar answered Nov 18 '22 09:11

miguelmorin