Skip to content

Commit 0dc7853

Browse files
author
smeyer
committed
MiKTeX nowadays respects TEXINPUTS
git-svn-id: https://svn.r-project.org/R/trunk@87699 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent bceb5e2 commit 0dc7853

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

doc/manual/R-intro.texi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7220,9 +7220,9 @@ R CMD latex.exe mydoc
72207220
@end example
72217221
@noindent
72227222
will run @LaTeX{} on @file{mydoc.tex}, with the path to @R{}'s
7223-
@file{share/texmf} macros appended to @env{TEXINPUTS}. (Unfortunately,
7224-
this does not help with the @I{MiKTeX} build of @LaTeX{}, but
7225-
@command{R CMD texify mydoc} will work in that case.)
7223+
@file{share/texmf} macros appended to @env{TEXINPUTS}.
7224+
(With the @I{MiKTeX} build of @LaTeX{}, using
7225+
@command{R CMD texify mydoc} is often more convenient.)
72267226

72277227
@node Invoking R under macOS
72287228
@appendixsec Invoking R under macOS

src/library/base/man/Sys.which.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Sys.which(names)
4848
}
4949
\examples{
5050
## the first two are likely to exist everywhere
51-
## texi2dvi exists on most Unix-alikes and under MiKTeX
51+
## texi2dvi exists on most Unix-alikes but not under MiKTeX
5252
Sys.which(c("ftp", "ping", "texi2dvi", "this-does-not-exist"))
5353
}
5454
\keyword{ utilities }

src/library/tools/R/utils.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,17 +444,15 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
444444
extra <- ""
445445

446446
## look for MiKTeX (which this almost certainly is)
447-
## and set the path to R's style files.
448-
## -I works in MiKTeX >= 2.4, at least
449447
## http://docs.miktex.org/manual/texify.html
450-
## FIXME: is -I still needed? It documents EnvVars since at least 2016.
451448
ver <- system(paste(shQuote(texi2dvi), "--version"), intern = TRUE)
452449
if(length(grep("MiKTeX", ver[1L]))) {
453-
## AFAICS need separate -I for each element of texinputs.
454-
texinputs <- c(texinputs, Rtexinputs, Rbstinputs)
455-
paths <- paste ("-I", shQuote(texinputs))
456450
extra <- "--max-iterations=20"
457-
extra <- paste(extra, paste(paths, collapse = " "))
451+
## setting TEXINPUTS via -I is long obsolete, EnvVars are respected
452+
## (<https://docs.miktex.org/manual/localadditions.html>)
453+
## texinputs <- c(texinputs, Rtexinputs, Rbstinputs)
454+
## paths <- paste ("-I", shQuote(texinputs))
455+
## extra <- paste(extra, paste(paths, collapse = " "))
458456
}
459457
## 'file' could be a file path
460458
base <- basename(file_path_sans_ext(file))

0 commit comments

Comments
 (0)