[R-pkg-devel] help using \Sexpr in .Rd documentaiton file results in error in windows

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sat Sep 10 11:30:34 CEST 2022


On 09/09/2022 11:23 a.m., Jairo Hidalgo Migueles wrote:
> Dear list,
> 
> I tried to write a dynamic help file following the Writing R Extensions
> manual (section 2.12, "Dynamic pages"). When using the \Sexpr macro, the
> package does not longer pass the R CMD CHECK. I get the following error:
> 
> ── R CMD build ─────────────────────────────
> ✔  checking for file 'C:\R\pkgs\GGIR/DESCRIPTION' ...
> ─  preparing 'GGIR': (8.5s)
> ✔  checking DESCRIPTION meta-information ...
> ─  cleaning src
> ─  installing the package to process help pages (427ms)
> ─  building the PDF package manual (13.9s)
>     Warning in system2(..., stdout = FALSE, stderr = FALSE) :
>       '"makeindex"' not found
>     Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,
>   :
>       unable to run 'makeindex' on 'Rd2.idx'
>     Warning in system2(..., stdout = FALSE, stderr = FALSE) :
>       '"makeindex"' not found
>     Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,
>   :
>       unable to run 'makeindex' on 'Rd2.idx'
>     Error in running tools::texi2pdf()
> Error in proc$get_built_file() : Build process failed
> 
> It seems there is something wrong when building the package manual, but
> after some attempts, I have not been able to fix this. Any advice is
> welcome.
> 
> Here an example of the \Sexpr usage in the .Rd file, consider "argument"
> the name of a parameter to function "fn" in package "pkg":
> 
> \usage{
> fn(argument= \Sexpr{format(formals(pkg::fn)[[" argument "]])})
> }
> 

There doesn't appear to be any complaint specifically about your Rd 
file.  The problem is that to evaluate that line, the package needs to 
be installed, and the installation is failing because the installer 
couldn't find the `makeindex` program.  That should be part of your 
LaTeX distribution.

You can ask INSTALL not to build the manual, and then this might succeed.

Duncan Murdoch



More information about the R-package-devel mailing list