Bug 16585 - citation() package version printing
Summary: citation() package version printing
Status: REOPENED
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R 3.2.2
Hardware: All All
: P5 trivial
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-10-31 11:28 UTC by jstachelek
Modified: 2017-12-19 10:15 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jstachelek 2015-10-31 11:28:26 UTC
The BibTeX entry results returned from citation() place the R package version in the "note" field. It would allow for cleaner bibtex parsing if it was in the "version" field. 

See:
http://stackoverflow.com/questions/31501388/how-do-i-get-r-package-versions-to-print-in-an-r-markdown-beamer-bibliography
Comment 1 Duncan Murdoch 2015-10-31 11:44:11 UTC
The "version" field is not used in standard styles.  See Patashnik's original documentation in <http://mirrors.ctan.org/biblio/bibtex/base/btxdoc.pdf>, or a more recent description as in <https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#Entry_and_field_types_in_.bib_files>.  

The format allows you to add extra fields and you can write styles to display them, but if R did that, its output wouldn't work for most people.
Comment 2 Duncan Murdoch 2015-10-31 11:46:50 UTC
Whoops, "version" *is* included in my second reference.  I missed it on first reading.
Comment 3 Duncan Murdoch 2015-10-31 16:10:16 UTC
And after a little more research, I can't find any BibTeX styles that support "version".  Only biblatex supports it, and R doesn't currently have any biblatex support.  So I'll leave this open and on the wishlist, but it seems to me it's more appropriate for a contributed package author to write, rather than putting it into core R.
Comment 4 Giorgio Alfredo Spedicato 2017-12-19 09:59:56 UTC
It would also be nice to remove the last comma...

@Manual{,
    title = {bupaR: Business Process Analysis in R},
    author = {Gert Janssenswillen},
    year = {2017},
    note = {R package version 0.3.2},
    url = {https://www.bupar.net},
  }
Comment 5 Martin Maechler 2017-12-19 10:15:57 UTC
(In reply to Giorgio Alfredo Spedicato from comment #4)
> It would also be nice to remove the last comma...
> 
> @Manual{,
>     title = {bupaR: Business Process Analysis in R},
>     author = {Gert Janssenswillen},
>     year = {2017},
>     note = {R package version 0.3.2},
>     url = {https://www.bupar.net},
>   }

Why?   AFAIK it / has become legal bibtex syntax,  and with the extra comma it's much easier to edit such entries, i.e. adding / deleting / shuffling the "fields" of a bibtex entry.