cboettig / knitcitations

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

Provide options for citation formats #1

Closed cboettig closed 11 years ago

cboettig commented 12 years ago

R's text print for citations doesn't allow different formats, and doesn't handle missing entries elegantly.

richfitz commented 12 years ago

Along these lines, the citet() function puts a comma between the author and year: Author, (year) not Author (year) which was not what I was expecting -- is that intentional?

natbib has a \bibpunct{} macro that probably covers most of the possibilities. A function set.bibpunct() that checks and sets set possibilities might be nice and easy to remember (and work well with LaTeX output).

cboettig commented 11 years ago

I should check out http://crosscite.org/cn/#sec-4-1 for citeproc formatting. Unclear how this will work with R's native bibentry data format; may have to store the "display" version of the citation returned from crosscite api as separate part of the bibentry data.

cboettig commented 11 years ago

Brilliant: CrossRef API for resolving plain-text citations http://labs.crossref.org/quick_and_dirty_api_guides/resolving_citations.html