[R] Cannot set correct miktex path for pdflatex

Eric Berger er|cjberger @end|ng |rom gm@||@com
Tue Aug 14 09:49:16 CEST 2018


Hi Claire,
In Unix (linux) the 'which' command is documented as searching for the
command according to the PATH environment variable.
The different results from
$ which
and
> Sys.which()
would point to the fact that the PATH variable is different in the two
cases.

Compare:
$ echo $PATH

versus

Sys.getenv("PATH")

HTH,
Eric




On Mon, Aug 13, 2018 at 8:18 PM, Kelley, Claire <ckelley using air.org> wrote:

> Hi all,
>
> I am having a problem in R where R is finding an old non existent version
> of miktex rather than the new version. This occurs despite having set the
> path to the correct location.
>
> For example in bash if I look for the location of pdflatex:
>
> $ which pdflatex
> /c/Program Files/MiKTeX 2.9/miktex/bin/x64/pdflatex
>
>
> It points to the correct MikTex installation.
>
> However in R:
>
> Sys.which("pdflatex")
>                                                 pdflatex
> C:\\PROGRA~1\\MIKTEX~1.9\\miktex\\bin\\x64\\pdflatex.exe"
>
> Points to the old  (1.9) version of Miktex.
>
> This is my session info:
>
> R version 3.5.1 (2018-07-02)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
> Matrix products: default
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] compiler_3.5.1
>
> Any thoughts?
>
> I have unsuccessfully tried:
>
>
>   1.  Adding correct MikTex path to my Renviorn.site. this adds MikTex to
> my path and I can see the addition, but doesn’t fix the problem
>   2.  Adding MikTex path to my $PATH variable. This lets bash find the
> right version of miktex but doesn’t help in R
>   3.  Making sure I only have on version of MIktex. I don’t have tiny tex
> installed (nor can I because I need the full MIkTex for other work) .
>
>
> Best,
> Claire
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]




More information about the R-help mailing list