[R] seeking latex peace

peter dalgaard pdalgd at gmail.com
Sun May 25 13:34:39 CEST 2014


On 25 May 2014, at 12:56 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

> On 25/05/2014, 6:17 AM, Jim Lemon wrote:
>> Hi all,
>> I realize that this is not an R question, but in attempting to build a new
>> version of a package, I have encountered the error:
>> 
>> Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  :
>>   pdflatex is not available
>> 
>> As I could not find any way to install pdflatex (it didn't appear on a yum
>> search), I tried a method that claimed to install pdflatex via a package
>> named "texlive". Almost 300 packages later and minus over 300 Mb of
>> disk space, I then got the error:
>> 
>> ! LaTeX Error: File `zi4.sty' not found.
>> 
>> This seems to be an updated version of the "inconsolata.sty" error that
>> used to torment me (and after reading a lot of messages about this,
>> many other people as well), so I found the file "zi4.sty" and copied it into
>> what I thought was the appropriate directory. It seems to be, as I now get
>> the error:
>> 
>> ! LaTeX Error: File `upquote.sty' not found.
>> 
>> At this point, I wonder if someone would be kind enough to inform me
>> whether this is a potentially infinite task of finding ".sty" files, in which
>> case I will live without them, or if there is an easier method of satisfying
>> the apparently immense appetite of LaTeX? Thanks.
> 
> I don't use TeXLive, but most LaTeX distributions offer a way to automatically install packages as needed.
> 
> But if you can't find it, you can just install them one by one:  it's not actually an infinite task.  I believe there are only about 4700 packages on CTAN (the equivalent of CRAN for TeX, in fact I believe it was the first C*AN). At 5 minutes per attempt, you'll be done in a couple of weeks!
> 

However, before you do that, do check that your friendly distribution maintainers haven't already made things available by making pdflatex and friends a dependency of an R-devel (or so) meta-package.

I'm getting a bit rusty on Fedora, but as far as I recall, you can "yum search" for packages that contain a specific .sty file.  In general, try to use the yum discipline when installing; it is so much easier to get things done right that way than it is to maintain your own texmf tree and/or mucking around in a system-installed one.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list