cboettig / knitcitations

:package: Generate citations for knitr markdown and html files
http://carlboettiger.info
Other
220 stars 28 forks source link

Add Option to create pandoc-formatted inline citations #57

Closed cboettig closed 10 years ago

cboettig commented 10 years ago

I'm thinking the more sensible thing might be to have knitcitations write an external bibtex file, and convert its citations into pandoc's format instead, from whence you could then use pandoc (+ the CSL stylesheet) to process and format the references that kniticitations has generated.

In this case something like:

options("citation_format", "pandoc")
citet("10.1098/rspb.2013.1372")

would create the citation such as [@Boettiger2013], and bibliography("refs.bib") would generate the output bib file to be used in pandoc. Alternatively, references could be added as a yaml (note that the yaml metadata blocks can be anywhere in the document).

johnstantongeddes commented 10 years ago

I like this. Since discovering rmarkdown and it's render function it seems that there's a trend towards using pandoc, which would be consistent with your proposal. This would also allow for an easy workaround in the cases where DOI fails to find the correct reference.

cboettig commented 10 years ago

Okay, this is implemented in 0.6. Give it a try, feeback welcome.