[R-pkg-devel] Two problems with fda

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Apr 26 02:24:07 CEST 2022


On 25/04/2022 4:40 p.m., Ivan Krylov wrote:
> On Mon, 25 Apr 2022 15:06:28 -0500
> Spencer Graves <spencer.graves using effectivedefense.org> wrote:
> 
>> GitHub action reports, <<'"pdflatex"' not found>> with
>> vignettes.
> 
> No personal experience with GitHub Actions, but have you tried
> following the advice by Gábor Csárdi from a few days ago?
> 
> https://stat.ethz.ch/pipermail/r-package-devel/2022q2/007970.html
> 
> You probably need to declare that your workflow needs tinytex installed
> (as described at
> <https://github.com/r-lib/actions/tree/v2-branch/setup-tinytex#usage>),
> but if you get different advice from more experienced people, follow
> that first.
> 
>> (1.2) We don't  know what in the vignettes require pdflatex, so we
>> cannot easily remove that.
> 
> This line sets the output format of the vignette to PDF:
> 
> https://github.com/JamesRamsay5/fda/blob/master/vignettes/monotoneFunctions.Rmd#L5
> 
>> "fRegress.Rd:325:22: Warning: nested emphasis <code>"
> 
> This is a new check, which runs HTML Tidy on the HTML version of the
> manual. If you install HTML Tidy on your local machine and a recent
> enough version of R (R-4.2 is good enough, and so was R-devel for a few
> weeks), you'll get the same check on your local machine, too.
> 
>> (2.1) We cannot find any "nested emphasis" to fix in this.
>> (2.2) We don't know what the numbers "325:22" mean.
> 
> Row and column number in the HTML file, I beleive. Use R CMD Rdconv to
> produce an HTML file from man/fRegress.Rd, or use help(fRegress, help =
> 'html') to see it. If I check the HTML documentation on my machine, my
> HTML file ends up slightly different, and the error is found on line
> 313 instead:
> 
> <tr valign="top"><td><code>The <code>fRegress</code> fit object
> case:</code></td>
> 
> A code tag is apparently not allowed inside another code tag. I guess
> this means that \code{} is not allowed inside \item{} any more, since
> the original source line for that is:
> 
> \item{The \code{fRegress} fit object case:}

That doesn't sound right:  items aren't necessarily code.  I just took a 
look at the file, which has:

\value{
   These functions return either a standard \code{fRegress} fit object or
   or a model specification:
   \item{The \code{fRegress} fit object case:}{


Aha, in a \value{} section, bare \items are supposed to mark components 
of the value, so they are automatically code.  I think the fix for this 
is to make it an explicit \describe list:

\value{
   These functions return either a standard \code{fRegress} fit object or
   or a model specification:
   \describe{
     \item{The \code{fRegress} fit object case:}{

   ... eventually ...

   }

Duncan Murdoch



More information about the R-package-devel mailing list