Skip to content

Commit 188a97b

Browse files
author
smeyer
committed
fix Rd2pdf for source packages using \figure in man/*/*.Rd
git-svn-id: https://svn.r-project.org/R/trunk@87658 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 984655d commit 188a97b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/library/tools/R/Rd2pdf.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,12 @@
288288
domain = NA)
289289
macros <- loadPkgRdMacros(pkgdir)
290290
macros <- initialRdMacros(pkglist, macros)
291-
} else {
291+
} else {
292292
## (Be nice and find Rd files & system macros also when 'pkgdir' is
293293
## not a package root directory.)
294-
files <- c(Sys.glob(file.path(pkgdir, "*.Rd")),
295-
Sys.glob(file.path(pkgdir, "*.rd")))
294+
mandir <- pkgdir
295+
files <- c(Sys.glob(file.path(mandir, "*.Rd")),
296+
Sys.glob(file.path(mandir, "*.rd")))
296297
if (!length(files))
297298
stop("this package does not have either a ", sQuote("latex"),
298299
" or a (source) ", sQuote("man"), " directory",
@@ -343,7 +344,7 @@
343344
macros = macros)
344345
if (attr(res, "hasFigures")) {
345346
lines <- readLines(outfilename)
346-
graphicspath <- file.path(dirname(paths[i]), "figures")
347+
graphicspath <- file.path(mandir, "figures")
347348
writeLines(c(.file_path_to_LaTeX_graphicspath(graphicspath),
348349
lines),
349350
outfilename)

0 commit comments

Comments
 (0)