Re: [R] LaTeX Error in creating manual from Rd files

2019-06-12 Thread Bert Gunter
This is really the wrong list for this discussion. Post on r-package-devel
instead.

Cheers,
Bert


On Wed, Jun 12, 2019 at 4:38 AM Helmut Schütz 
wrote:

> Hi,
>
> Duncan Murdoch wrote on 2019-06-12 01:15:
> > you should have
> >
> >  \describe{
> >\item{bar}{
> >  \tabular{ll}{
> >  ...
> >}
>
> Sorry, I have to come back. As I wrote before, no more errors/warnings,
> manual built.
> \itemize{
>\item example
>\describe{
>  \item{foo}{
>  \tabular{ll}{
>...
>  }
>}
>  \item{bar}{}
>}
> }
>
> where both foo and bar /may/ be long lines.
> Gives the table
> /below/
> foo but intended paragraph in bold (possibly overrunning the margin)
> /below)
> bar but intended paragraph in bold (possibly overrunning the margin)
>
> Removed the second pair of curly brackets at the end, i.e., to \item{bar}
> Warning: bad markup (extra space?) at expl.Rd:x:y
> where x:y is the location of the closing curly bracket in \item{bar}
> PDF as before
>
> Removed the curly brackets at the end, i.e., to \item bar
> Warning:
> prepare_Rd: man/TR.RT.TT.RR.Rd:x: unexpected TEXT 'bar
> ', expecting '{'
> PDF:
> table
> below foo as before
> then /without a new line/ bar in a normal font
>
> What I want:
> bar in a normal paragraph & font
> table
> foo in a normal paragraph & font
>
> Is that possible at all?
>
> Helmut
>
> --
> 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.schu...@bebac.at
> W https://bebac.at/
> C https://bebac.at/Contact.htm
> F https://forum.bebac.at/
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] LaTeX Error in creating manual from Rd files

2019-06-12 Thread Helmut Schütz

Hi,

Duncan Murdoch wrote on 2019-06-12 01:15:

you should have

 \describe{
   \item{bar}{
 \tabular{ll}{
 ...
   }


Sorry, I have to come back. As I wrote before, no more errors/warnings, 
manual built.

\itemize{
  \item example
  \describe{
    \item{foo}{
    \tabular{ll}{
  ...
    }
  }
    \item{bar}{}
  }
}

where both foo and bar /may/ be long lines.
Gives the table
/below/
foo but intended paragraph in bold (possibly overrunning the margin)
/below)
bar but intended paragraph in bold (possibly overrunning the margin)

Removed the second pair of curly brackets at the end, i.e., to \item{bar}
Warning: bad markup (extra space?) at expl.Rd:x:y
where x:y is the location of the closing curly bracket in \item{bar}
PDF as before

Removed the curly brackets at the end, i.e., to \item bar
Warning:
prepare_Rd: man/TR.RT.TT.RR.Rd:x: unexpected TEXT 'bar
   ', expecting '{'
PDF:
table
below foo as before
then /without a new line/ bar in a normal font

What I want:
bar in a normal paragraph & font
table
foo in a normal paragraph & font

Is that possible at all?

Helmut

--
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.schu...@bebac.at
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] LaTeX Error in creating manual from Rd files

2019-06-11 Thread Duncan Murdoch

On 11/06/2019 5:54 p.m., Helmut Schütz wrote:

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):


You have \describe with no \item.  That leads to illegal LaTeX.

Instead of

 \describe{
   bar
   \tabular{ll}{
   ...

you should have


 \describe{
   \item{bar}{
 \tabular{ll}{
 ...
   }

Duncan Murdoch




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)



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] LaTeX Error in creating manual from Rd files

2019-06-11 Thread Helmut Schütz

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.schu...@bebac.at
W https://bebac.at/
C https://bebac.at/Contact.htm
F https://forum.bebac.at/

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.