[R] LaTeX Error in creating manual from Rd files

Helmut Schütz he|mut@@chuetz @end|ng |rom beb@c@@t
Tue Jun 11 23:54:34 CEST 2019


Hi,

I’m getting -- many -- errors/warnings (both when uploading to 
win-builder.r-project.org as well as locally):
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! LaTeX Error: Something's wrong--perhaps a missing \item.
  ...
* checking PDF version of manual without hyperrefs or index ... ERROR
* DONE
Status: 1 ERROR, 1 WARNING, 0 NOTE

All errors are generated in man-pages where I describe datasets of my 
package.
Snippet causing the error (confirmed by my.package-manual.log, 
my.package-manual.tex, Rdlatex.log):

Rd:
\format{
   \itemize{
     \item an item\cr
     foo
       \describe{
       bar
       \tabular{ll}{
         \code{a} \tab a factor with x levels: 1, 2, \ldots, x\cr
         \code{b} \tab a factor with 4 levels: 1, 2, 3, 4\cr
         \code{c} \tab a numeric vector of responses
       }
       baz
       \tabular{ll}{
         \code{x} \tab x.x\%\cr
         \code{y} \tab y.y\%
       }
     }
     \item yet another item\cr
     foo
       \describe{
       bar
       \tabular{ll}{
         \code{a} \tab a factor with x levels: 1, 2, \ldots, x\cr
         \code{b} \tab a factor with 4 levels: 1, 2, 3, 4\cr
         \code{c} \tab a numeric vector of responses
       }
       baz
       \tabular{ll}{
         \code{x} \tab x.x\%\cr
         \code{y} \tab y.y\%
       }
     }
   }
}

Translated to:

\begin{Format}
   \begin{itemize}
     \item an item\\{}
     foo
     \begin{description}
       bar
       \Tabular{ll}{
         \code{a} & a factor with x levels: 1, 2, \ldots, x\\{}
         \code{b} & a factor with 4 levels: 1, 2, 3, 4\\{}
         \code{c} & a numeric vector of responses{}
       }
       baz
         \Tabular{ll}{
         \code{x} & n.n\%\\{}
         \code{y} & n.n\%
       }
     \end{description}
     \item yet another item\\{}
     foo
     \begin{description}
       bar
       \Tabular{ll}{
       \code{x} & a factor with x levels: 1, 2, \ldots, x\\{}
       \code{y} & a factor with 4 levels: 1, 2, 3, 4\\{}
       \code{z} & a numeric vector of responses
       }
       baz
         \Tabular{ll}{
         \code{x} & n.n\%\\{}
         \code{y} & n.n\%
       }
     \end{description}
   \end{itemize}
\end{Format}

Maybe I’m blind but (a) I think that the nesting is correct and (b) I 
don’t see a missing item. BTW, translating the Rd to HTML in building 
gives valid XHTML 1.0Strict -- as expected.

Cheers,
Helmut

R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7050 64-bit)

-- 
Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
Neubaugasse 36/11
1070 Vienna, Austria
T +43 1 2311746
M +43 699 10792458
E helmut.schuetz using bebac.at
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/



More information about the R-help mailing list