[R] latex{Hmisc} cannot find xdvi on MAC OS X

Frank E Harrell Jr f.harrell at vanderbilt.edu
Thu Jan 24 04:18:00 CET 2008


Charles C. Berry wrote:
> On Wed, 23 Jan 2008, Frank E Harrell Jr wrote:
> 
>> Kevin E. Thorpe wrote:
>>> Kevin E. Thorpe wrote:
>>>> Gabor Grothendieck wrote:
>>>>> It eliminates Hmisc and R by giving you a tex file.  Now its up
>>>>> to you to figure out how to handle tex files on your system.
>>>> I have suggested the student try options(xdvicmd="fullpathtoxdvi")
>>>> to see what happens.
>>>
>>> Here is the result of trying the above.
>>>
>>>> latex(describe(ps1d))
>>> This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
>>>  %&-line parsing enabled.
>>> entering extended mode
>>> (/tmp/RtmpMi0s95/file10d63af1.tex
>>> LaTeX2e <2005/12/01>
>>> Babel <v3.8h> and hyphenation patterns for english, usenglishmax,
>>> dumylang, noh
>>> yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak,
>>> german, ng
>>> erman, danish, esperanto, spanish, catalan, galician, estonian, farsi,
>>> finnish,
>>>  french, greek, monogreek, ancientgreek, croatian, hungarian,
>>> interlingua, ibyc
>>> us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk,
>>> polish, por
>>> tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian,
>>> swedish,
>>> turkish, ukenglish, ukrainian, loaded.
>>> (/usr/local/texlive/2007/texmf-dist/tex/latex/base/report.cls
>>> Document Class: report 2005/09/16 v1.4f Standard LaTeX document class
>>> (/usr/local/texlive/2007/texmf-dist/tex/latex/base/size10.clo))
>>> (/usr/local/texlive/2007/texmf-dist/tex/latex/setspace/setspace.sty
>>> Package: `setspace' 6.7 <2000/12/01>
>>> ) (/usr/local/texlive/2007/texmf-dist/tex/latex/ltxmisc/relsize.sty)
>>> (/usr/local/texlive/2007/texmf-dist/tex/latex/geometry/geometry.sty
>>> (/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/keyval.sty)
>>> (/usr/local/texlive/2007/texmf-dist/tex/xelatex/xetexconfig/geometry.cfg)) 
>>>
>>> No file file10d63af1.aux.
>>> [1] [2] (./file10d63af1.aux) )
>>> Output written on file10d63af1.dvi (2 pages, 10000 bytes).
>>> Transcript written on file10d63af1.log.
>>> /usr/texbin/xdvi: line 1: kpsewhich: command not found
>>> /usr/texbin/xdvi: line 46: exec: xdvi-xaw.bin: not found
>>>
>>>
>>> So, it appears to that something about the MAC environment is
>>> not being passed to the shell that is invoked when latex() is
>>> called in this way.
>>
>> That's exactly what it looks like.  Shame on Mac "-)
>>
>> On my linux systems xdvi is in /usr/bin
> 
> On my leopard, it is in /usr/texbin (as seen above) and
> 
>     Sys.setenv( PATH=paste(Sys.getenv("PATH"),"usr/texbin",sep=":") )
> 
> allows
>     system("xdvi")
> 
> and

Excellent.  I much prefer solutions to workarounds.  A .profile or 
.bashrc type of file can also extend the PATH this way.

Thanks Chuck
Frank

> 
>     system("kpsewhich --help")
> 
> to succeed.
> 
> HTH,
> 
> Chuck
> 
>>
>> Frank
>>
>>>
>>> Kevin
>>>
>>
>>
>> -- 
>> Frank E Harrell Jr   Professor and Chair           School of Medicine
>>                      Department of Biostatistics   Vanderbilt University
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> Charles C. Berry                            (858) 534-2098
>                                             Dept of Family/Preventive 
> Medicine
> E mailto:cberry at tajo.ucsd.edu                UC San Diego
> http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
> 
> 
>



More information about the R-help mailing list