[R] Cannot set correct miktex path for pdflatex

Kelley, Claire ckelley @ending from @ir@org
Mon Aug 13 19:18:16 CEST 2018


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]]



More information about the R-help mailing list