Dear expeRts! Thanks for suggestions about getting MiKTeX... I have that installed.. The Sys.getenv("PATH") also reflects the path of "pdflatex"..
I noticed that the function creates ".dvi", ".aux" files in the "current working directory but looks for these files in Sys.getenv("TEMP") folder. Is there away to make "latex" point to the correct folder? I have similar problems with other functions like texi2dvi. owd <- getwd() setwd("../Tables") latex(a1,output="test",file="t1.tex",here=T) This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) entering extended mode (C:/Users/santosh/AppData/Local/Temp/RtmpeA78Zj/filefac46aa1ac3.tex LaTeX2e <2011/06/27> Babel <v3.8m> <deleted text>....loaded. ("C:\Program Files\Latex\tex\latex\base\report.cls" Document Class: report 2007/10/19 v1.4h Standard LaTeX document class ("C:\Program Files\Latex\tex\latex\base\size10.clo")) ("C:\Program Files\Latex\tex\latex\geometry\geometry.sty" ("C:\Program Files\Latex\tex\latex\graphics\keyval.sty") ("C:\Program Files\Latex\tex\generic\oberdiek\ifpdf.sty") ("C:\Program Files\Latex\tex\generic\oberdiek\ifvtex.sty") ("C:\Program Files\Latex\tex\generic\ifxetex\ifxetex.sty") ("C:\Program Files\Latex\tex\latex\geometry\geometry.cfg")) No file filefac46aa1ac3.aux. *geometry* driver: auto-detecting *geometry* detected driver: dvips ! Undefined control sequence. l.5 \toprule ! Undefined control sequence. <recently read> \midrule l.8 \midrule ! Undefined control sequence. <recently read> \bottomrule l.24 \bottomrule [1] (.\filefac46aa1ac3.aux) ) (see the transcript file for additional information) Output written on filefac46aa1ac3.dvi (1 page, 1664 bytes). Transcript written on filefac46aa1ac3.log. Warning messages: 1: running command 'C:\Windows\system32\cmd.exe /c cd "C:\Users\santosh\AppData\Local\Temp\RtmpeA78Zj" & latex -interaction=scrollmode "C:\Users\santosh\AppData\Local\Temp\RtmpeA78Zj\filefac46aa1ac3"' had status 1 2: In shell(cmd, wait = TRUE, intern = output) : 'cd "C:\Users\santosh\AppData\Local\Temp\RtmpeA78Zj" & latex -interaction=scrollmode "C:\Users\santosh\AppData\Local\Temp\RtmpeA78Zj\filefac46aa1ac3"' execution failed with error code 1 On Mon, Apr 22, 2013 at 7:41 AM, Duncan Murdoch <murdoch.dun...@gmail.com>wrote: > On 22/04/2013 10:34 AM, Santosh wrote: > >> Dear Rxperts, >> Apologize for posting it to a wrong thread..Hence, the re-post... >> >> I am trying to use pdflatex from Hmisc, I get the error message. "pdflatex >> is not available"... The version of Hmisc is the latest one (got the >> warning that it was compiled under R version 2.15.3) . >> >> The version of R on my machine is >> > version >> >> platform i386-w64-mingw32 >> arch i386 >> os mingw32 >> system i386, mingw32 >> status >> major 2 >> minor 15.2 >> year 2012 >> month 10 >> day 26 >> svn rev 61015 >> language R >> version.string R version 2.15.2 (2012-10-26) >> nickname Trick or Treat >> > >> >> Is it not available anymore? I created a latex file using "tables" package >> and am unable to create the pdf file using pdflatex ... I am also not able >> to use Sweave with the above version of R as it is not available. >> > > In this context, "not available" means not listed in your system PATH. > Use Sys.getenv("PATH") to get your current PATH; it will be a list of > directories. If none of those directories contain pdflatex.exe, then > pdflatex is "not available". > > Duncan Murdoch > > >> I also tried texi2dvi (from tools); and it says "latex is not available". >> But, I was earlier able to use "latex" with tabular to generate a "tex" >> file. I am confused with such conflicting messages. >> >> Also.. when I tried to use latex again, >> latex(summ2,title=outfile,**file="a1.tex") # summ2 is a "tabular" >> output >> using "tables" package >> 'latex' is not recognized as an internal or external command, >> operable program or batch file. >> Error in system(cmd, intern = TRUE, wait = TRUE) : 'yap' not found >> In addition: Warning messages: >> 1: running command 'C:\Windows\system32\cmd.exe /c cd >> "C:\Users\santosh\AppData\**Local\Temp\RtmpsZ3tP9" & latex >> -interaction=scrollmode >> "C:\Users\santosh\AppData\**Local\Temp\RtmpsZ3tP9\**file13207cb8d2c"' had >> status 1 >> 2: In shell(cmd, wait = TRUE, intern = output) : >> 'cd "C:\Users\santosh\AppData\**Local\Temp\RtmpsZ3tP9" & latex >> -interaction=scrollmode >> "C:\Users\santosh\AppData\**Local\Temp\RtmpsZ3tP9\**file13207cb8d2c"' >> execution >> failed with error code 1 >> >> >> Any suggestions welcome! >> Thanks, >> Santosh >> >> [[alternative HTML version deleted]] >> >> ______________________________**________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >> PLEASE do read the posting guide http://www.R-project.org/** >> posting-guide.html <http://www.R-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> > > [[alternative HTML version deleted]] ______________________________________________ R-help@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.