Hi Duncan, I think you're right. I should have read the texi2dvi help more carefully - it says Run latex and bibtex until all cross-references are resolved and create either a dvi or PDF file.
there doesn't seem to be a way to not run bibtex. But as you suggested, all I have to do is system("pdflatex onepager.tex") (I didn't know about this system command before you mentioned it). thanks for your help! Aidan On Wed, Dec 7, 2011 at 8:07 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: > On 07/12/2011 12:24 PM, Aidan Corcoran wrote: >> >> Hi Duncan, >> >> thanks for your help. Unfortunately >> >> texi2dvi("onepager", pdf = TRUE, texi2dvi = "pdflatex") >> >> seems to run into the same issue. I searched the documentation as you >> suggested (http://docs.miktex.org/2.9/manual/pdftex.html) and also >> checked pdflatex --help, but can't find a command line option to >> prevent the bibtex call. I think there should be one, since it's an >> option in texniccenter, but I guess this is now a latex not an r >> question (although I'm not sure exactly where I would put the command >> line option in the texi2dvi call above). If I can't find a way to do >> it then I'll take the batch approach as you suggested. > > > I suspect it's a different problem: pdflatex shouldn't run bibtex. But who > knows what MikTeX might choose to do... > > Duncan Murdoch > > >> Thanks again! >> >> Aidan >> >> >> >> I know texniccenter has an option to not run bibtex when calling >> pdflatex, but this is a tick box so I can’t find out what the command >> line option is from there. >> >> On Wed, Dec 7, 2011 at 3:13 PM, Duncan Murdoch<murdoch.dun...@gmail.com> >> wrote: >> > On 07/12/2011 6:47 AM, Aidan Corcoran wrote: >> >> >> >> Dear all, >> >> >> >> I was hoping someone may know a way of running texi2dvi while ignoring >> >> bibtex errors, or any other work around (such as not running bibtex at >> >> all, if possible). >> >> >> >> The context is that I have an R program that does some calculations >> >> and writes a table into various folders, one per country for several >> >> countries. I have a latex file that takes the table as an input, and >> >> this latex file is copied into each folder. I would like to use R to >> >> compile the latex files, to avoid having to open and compile them >> >> individually. The files are simple one page files with no citations, >> >> so need no biblio. >> >> >> >> If I switch to one of the folders containing a table and a latex file >> >> and >> >> run >> >> texi2dvi("onepager", pdf = TRUE, clean = FALSE, quiet = FALSE, >> >> texi2dvi = getOption("texi2dvi"), >> >> texinputs = NULL, index = TRUE) >> >> I get >> >> running command '"C:\PROGRA~1\MIKTEX~1.9\miktex\bin\texi2dvi.exe" >> >> --pdf "onepager" -I "C:/PROGRA~1/R/R-213~1.0/share/texmf/tex/latex" >> >> -I "C:/PROGRA~1/R/R-213~1.0/share/texmf/bibtex/bst"' had status 1 >> >> and no pdf produced. >> >> >> >> I think the problem is that the absence of a biblio causes an error. >> >> The files compile in Texniccenter (with a warning on "no \citation >> >> commands" etc). Does anyone know of a trick to avoid this problem? >> >> >> >> Thanks very much for any help! >> > >> > >> > You might want to check the MikTeX documentation to see if there's an >> > option >> > to do that, but I couldn't spot one listed in "texi2dvi --help". So >> > I'd >> > suggest that you don't use the texi2dvi executable, just run pdflatex >> > via >> > >> > texi2dvi("onepager", texi2dvi="pdflatex", ...) >> > >> > (or by setting the texi2dvi option) with the ... being appropriate >> > other >> > commands. If that doesn't work, then write a batch or cmd file to do >> > exactly what you want, and use system() to run it. >> > >> > Duncan Murdoch > > ______________________________________________ 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.