diff --git a/doc/manual/R-intro.texi b/doc/manual/R-intro.texi index 2c31d3b4da..bbf9efe570 100644 --- a/doc/manual/R-intro.texi +++ b/doc/manual/R-intro.texi @@ -7220,9 +7220,9 @@ R CMD latex.exe mydoc @end example @noindent will run @LaTeX{} on @file{mydoc.tex}, with the path to @R{}'s -@file{share/texmf} macros appended to @env{TEXINPUTS}. (Unfortunately, -this does not help with the @I{MiKTeX} build of @LaTeX{}, but -@command{R CMD texify mydoc} will work in that case.) +@file{share/texmf} macros appended to @env{TEXINPUTS}. +(With the @I{MiKTeX} build of @LaTeX{}, using +@command{R CMD texify mydoc} is often more convenient.) @node Invoking R under macOS @appendixsec Invoking R under macOS diff --git a/src/library/base/man/Sys.which.Rd b/src/library/base/man/Sys.which.Rd index 96e1dc0f3a..1080e82129 100644 --- a/src/library/base/man/Sys.which.Rd +++ b/src/library/base/man/Sys.which.Rd @@ -48,7 +48,7 @@ Sys.which(names) } \examples{ ## the first two are likely to exist everywhere -## texi2dvi exists on most Unix-alikes and under MiKTeX +## texi2dvi exists on most Unix-alikes but not under MiKTeX Sys.which(c("ftp", "ping", "texi2dvi", "this-does-not-exist")) } \keyword{ utilities } diff --git a/src/library/tools/R/utils.R b/src/library/tools/R/utils.R index e26aa36560..5904d50752 100644 --- a/src/library/tools/R/utils.R +++ b/src/library/tools/R/utils.R @@ -444,17 +444,15 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE, extra <- "" ## look for MiKTeX (which this almost certainly is) - ## and set the path to R's style files. - ## -I works in MiKTeX >= 2.4, at least ## http://docs.miktex.org/manual/texify.html - ## FIXME: is -I still needed? It documents EnvVars since at least 2016. ver <- system(paste(shQuote(texi2dvi), "--version"), intern = TRUE) if(length(grep("MiKTeX", ver[1L]))) { - ## AFAICS need separate -I for each element of texinputs. - texinputs <- c(texinputs, Rtexinputs, Rbstinputs) - paths <- paste ("-I", shQuote(texinputs)) extra <- "--max-iterations=20" - extra <- paste(extra, paste(paths, collapse = " ")) + ## setting TEXINPUTS via -I is long obsolete, EnvVars are respected + ## () + ## texinputs <- c(texinputs, Rtexinputs, Rbstinputs) + ## paths <- paste ("-I", shQuote(texinputs)) + ## extra <- paste(extra, paste(paths, collapse = " ")) } ## 'file' could be a file path base <- basename(file_path_sans_ext(file))