cboettig / knitcitations

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

Author is not printed in citep with organization authors #55

Closed jbryer closed 10 years ago

jbryer commented 10 years ago

Here is my bibtex file

@Manual{devtools,
    title = {devtools: Tools to make developing R code easier},
    author = {Hadley Wickham and Winston Chang},
    year = {2013},
    note = {R package version 1.4.1},
    url = {http://CRAN.R-project.org/package=devtools}
}

@Manual{rcore,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2014},
    url = {http://www.R-project.org/}
}

@Manual{knitcitations,
    title = {knitcitations: Citations for knitr markdown files},
    author = {Carl Boettiger},
    year = {2014},
    note = {R package version 0.5-0},
    url = {http://CRAN.R-project.org/package=knitcitations},
}

The R Code with output:

> require(knitcitations)
> cleanbib()
> bib <- read.bibtex('rgitbook.bib')
> citep(bib['rcore'])
[1] "(<a href=\"http://www.R-project.org/\"></a>)"
cboettig commented 10 years ago

@jbryer Thanks for the bug report. I believe this may be due to how some of the underlying dependencies handle author objects now. Anyway this package is due for an update so I hope to be able to get to this in the near future. Meanwhile always open to pull requests if you feel like exploring!

jbryer commented 10 years ago

Thanks @cboettig . I wish I could, too many things on my plate now. Perhaps later this summer. Thanks for a great package.

cboettig commented 10 years ago

Okay, I still have to fix this, (think I have a good way to improve all the formatting), but meanwhile I'm curious if you might prefer the pandoc-based solution I've just released to address #57? Since pandoc will be handling the final formatting of the inline citation, this should sidestep the issue. (Note that a pandoc markdown parser is set to become a standard part of RStudio as well).

jbryer commented 10 years ago

I like the pandoc as an option, but I am trying get references to work with Gitbook.io and I am not sure passing the markdown through pandoc will work since Gitbook has their own parser.

cboettig commented 10 years ago

Good to know, might help motivate me to fix the native parser for this.

On Thu, May 29, 2014 at 3:57 PM, Jason Bryer notifications@github.com wrote:

I like the pandoc as an option, but I am trying get references to work with Gitbook.io and I am not sure passing the markdown through pandoc will work since Gitbook has their own parser.

— Reply to this email directly or view it on GitHub https://github.com/cboettig/knitcitations/issues/55#issuecomment-44596333 .

Carl Boettiger UC Santa Cruz http://carlboettiger.info/