GeoBosh / Rdpack

R package Rdpack provides functions and macros facilitating writing and management of R documentation.
https://geobosh.github.io/Rdpack/
28 stars 6 forks source link

Feature Request: Inserting citations using the citation identifier/key #2

Closed aravind-j closed 6 years ago

aravind-j commented 6 years ago

Feature request

A provision to insert citation using a syntax similar to latex and rmarkdown.

For example the following code in the roxygen2documentation

Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].

Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].

Blah blah [@smith04; @doe99].

will add the relevant rdpack syntax (\insertRef{dow99}{package}, \insertRef{smith04}{package}) to the @references tag to be processed as a bibliography list by rdpackand roxygen2.

GeoBosh commented 6 years ago

Thanks for the suggestion. What you suggest is indeed desirable but it needs to be done by roxygen2 (or devtools), unless they provide hooks that are run at the time when the Rd files are generated. If they do, I would consider it.

I could add Rd macros for citations with a provision to generate a list of all cited works in the references section. But they would also use the Rd syntax, similar to \insertRef. I can do this, if there is sufficient interest,

I will keep this issue open to see if others will chip in with further comments.

GeoBosh commented 6 years ago

I am closing this due to lack of further comments.