Skip to content

Commit 84169ff

Browse files
author
maechler
committed
doc for r88132: help() pdf rendering can turn off message via print(*, msg=FALSE)
git-svn-id: https://svn.r-project.org/R/trunk@88165 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent ce600a1 commit 84169ff

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/library/utils/R/help.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ print.help_files_with_topic <- function(x, ...) # ... may contain msg=FALSE
253253
on.exit(unlink(texfile)) ## ? leave to helper
254254
helper <- get0("offline_help_helper", envir = .GlobalEnv) %||% offline_help_helper # <-> below
255255
if (attr(texfile, "has_figure"))
256-
helper(texfile, type, texinputs=texinputs, msg=msg)
257-
else helper(texfile, type, msg=msg)
256+
helper(texfile, type, msg=msg, texinputs=texinputs)
257+
else helper(texfile, type, msg=msg)
258258
invisible()
259259
}
260260

@@ -273,7 +273,7 @@ print.help_files_with_topic <- function(x, ...) # ... may contain msg=FALSE
273273
}
274274

275275

276-
offline_help_helper <- function(texfile, type, texinputs = NULL, msg = TRUE)
276+
offline_help_helper <- function(texfile, type, msg = TRUE, texinputs = NULL)
277277
{
278278
## Some systems have problems with texfile names like ".C.tex"
279279
tf <- tempfile("tex", tmpdir = ".", fileext = ".tex"); on.exit(unlink(tf))

src/library/utils/man/help.Rd

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/utils/man/help.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2018 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{help}
@@ -120,9 +120,11 @@ help(topic, package = NULL, lib.loc = NULL,
120120
If there is a function \code{offline_help_helper} in the workspace or
121121
further down the search path it is used to do the typesetting,
122122
otherwise the function of that name in the \code{utils} namespace (to
123-
which the first paragraph applies). It should accept at least two
124-
arguments, the name of the LaTeX file to be typeset and the type
125-
(which is nowadays ignored). It accepts a third argument,
123+
which the first paragraph applies). It should accept at least three
124+
arguments, the name of the LaTeX file to be typeset, the type
125+
(which is nowadays ignored), and a logical \code{msg} indicating if a
126+
\code{\link{message}()} about the pdf creation should be signalled. It
127+
accepts also an argument
126128
\code{texinputs}, which will give the graphics path when the help
127129
document contains figures, and will otherwise not be supplied.
128130
}

0 commit comments

Comments
 (0)