[Rd] R CMD Rd2pdf and macros

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Wed Oct 4 16:12:56 CEST 2017


No, I do not get the same as you.

I have tested with R-devel and R-patched compiled today.  When I do

R CMD Rd2pdf mpra

I get (as reported a few days ago)
  Hmm ... looks like a package
  Converting Rd files to LaTeX Error : mpra/man/mpra-package.Rd:6: file
'./DESCRIPTION' does not exist
whereas you (Kurt) reports that this works on zTree.

When I do
R CMD Rd2pdf mpra/man

I get
  - a pdf produced
  - warnings about missing macros

This is for a package with a
  PKGNAME-package.Rd
man page containing \packageDescription, \packageAuthor, \packageTitle,
\packageMaintainer, \doi

R-versions:

R version 3.4.2 Patched (2017-10-04 r73462) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin16.7.0 (64-bit)

R Under development (unstable) (2017-10-04 r73461) -- "Unsuffered
Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin16.7.0 (64-bit)


On Wed, Oct 4, 2017 at 3:56 AM, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote:

> >>>>> Kasper Daniel Hansen writes:
>
> Interesting.  When I take e.g. zTree as the last CRAN package using the
> \packageTitle macro,
>
>    R CMD Rd2pdf zTree
>
> seems to work fine, but
>
>    R CMD Rd2pdf zTree/man
>
> gives
>
> Converting Rd files to LaTeX Warning in parse_Rd("zTree/man/zTree-package.Rd",
> encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:6: unknown macro '\packageTitle'
> Warning in parse_Rd("zTree/man/zTree-package.Rd", encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:9: unknown macro '\packageDescription'
> Warning in parse_Rd("zTree/man/zTree-package.Rd", encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:13: unknown macro '\packageDESCRIPTION'
> Warning in parse_Rd("zTree/man/zTree-package.Rd", encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:14: unknown macro '\packageIndices'
> Warning in parse_Rd("zTree/man/zTree-package.Rd", encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:17: unknown macro '\packageAuthor'
> Warning in parse_Rd("zTree/man/zTree-package.Rd", encoding = "unknown",  :
>   zTree/man/zTree-package.Rd:18: unknown macro '\packageMaintainer'
>
> Same in your case?
>
> Best
> -k
>
>
> > When I run R CMD Rd2pdf on the man pages of a package, ie
> >   R CMD Rd2pdf man
>
> > I get
>
> > Converting Rd files to LaTeX Warning in parse_Rd("man/mpra-package.Rd",
> > encoding = "unknown", fragment = FALSE,  :
> >   man/mpra-package.Rd:6: unknown macro '\packageTitle'
> > Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown",
> fragment =
> > FALSE,  :
> >   man/mpra-package.Rd:9: unknown macro '\packageDescription'
> > Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown",
> fragment =
> > FALSE,  :
> >   man/mpra-package.Rd:15: unknown macro '\packageAuthor'
> > Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown",
> fragment =
> > FALSE,  :
> >   man/mpra-package.Rd:17: unknown macro '\packageMaintainer'
> > Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown",
> fragment =
> > FALSE,  :
> >   man/mpra-package.Rd:24: unknown macro '\doi'
>
> > It would appear that installed, system level macros are not read and
> used?
>
> > Best,
> > Kasper
>
> >       [[alternative HTML version deleted]]
>
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list