[R-SIG-Mac] checking for pdflatex
John Fox
jfox at mcmaster.ca
Tue Mar 17 16:50:27 CET 2015
Dear JJ,
> -----Original Message-----
> From: JJ Allaire [mailto:jj at rstudio.com]
> Sent: March-17-15 11:33 AM
> To: Simon Urbanek
> Cc: John Fox; Berend Hasselman; r-sig-mac at r-project.org
> Subject: Re: [R-SIG-Mac] checking for pdflatex
>
> >
> > I guess that would be less disruptive. If the user has picked a custom order
> at least it would be preserved. But as noted earlier I also think that this
> should be better fixed in rmarkdown - preferably by using the full path so it
> doesn't depend on PATH. I'm told RStudio is providing pandoc binaries so I
> would guess it's easy for them to guarantee the functionality but JJ is
> included so he can weigh in.
>
> rmarkdown calls pandoc which in turn calls pdflatex. We have some logic to
> discover the path to pdflatex and forward that on to pandoc
> here:
>
> https://github.com/rstudio/rmarkdown/blob/master/R/util.R#L186-L203
>
> I'm not sure in this particular case why the right version isn't found. What
> happens if you call rmarkdown:::find_program("pdflatex")
> from the R prompt.
Actually, I already looked at the code in rmarkdown and tried exactly this. On my Mac under R.app, where the default path is
> Sys.getenv("PATH")
[1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
I get
> rmarkdown:::find_program("pdflatex")
[1] ""
Best,
John
>
> Would be happy to make any change you suggest to the way we forward
> paths on to pandoc in order to make this work.
---
This email has been checked for viruses by Avast antivirus software.
More information about the R-SIG-Mac
mailing list