Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using R to run pdflatex from within the console and I have a wrapper written like the following:

pdflatex <- function(infile, outputdir=NULL, jobname=NULL) {
  syscomm <- 'pdflatex "infile"'
  syscomm <- sub('infile', infile, syscomm)

  if (!is.null(outputdir))
  syscomm <- paste(syscomm, ' --output-directory="', outputdir, '"', sep='')

  if (!is.null(jobname))
  syscomm <- paste(syscomm, ' --jobname=', jobname, sep='')

  system(syscomm)
}

When the infile is in R's current working directory, it's able to successfully generate the PDF report. This even works when the infile is not in R's working dir. However, when I specify the output directory using the flag --output-directory=<path>, pdflatex can't find the aux file, gets angry at me, and then breaks down.

Are there more flags to the system command to indicate where to store and look for the aux files?

share|improve this question
On Linux you might want to try the strace tool to see which files/directories are actually accessed. On Windows there's ProcMon from SysInternals. – krlmlr Oct 18 '12 at 23:19

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.