[R-pkg-devel] Appropriate usage of 'Suggests' -- package installed conditional on other software not found

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Thu Oct 3 17:45:20 CEST 2019


John,

On 3 October 2019 at 15:26, Fox, John wrote:
| In the original context of this thread, a simple error message indicating that LaTeX is absent probably would suffice.

Yes, I agree. Hence this earlier comment of mine you choose not to reply to:

| > Anyway, this is going off-topic.  It might be nice for R to offer a query
| > whether 'is tex available?' just how capabilities() and extSoftVersion()
| > gives hint on some other optional capabilities (which are arguably closer to
| > its core).

That still holds because it's actually complicated -- pdflatex is a default,
but some styles require xelatex for other fonts, and there are other front
ends such as lualatex and so on.

R knows what it is doing. So if you (or Charles) look at tools::texi2dvi
(which is called by tools::texi2pdf) then you see it already tries quite a
few things to find a suitable latex drivers. Other (though IIRC not base R)
use latexmk. And the long and the short of it is that Charles probably just
wanted a Suggests: for tinytex followed by an if (requireNamespace("tinytex"))

But then "kids these days" don't care as they go from Rmd to html. Which may
be another reason not to prompt for 'pdflatex'.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list