[R] Format utils::bibentry with a 'corporate name'
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Fri Oct 29 19:46:34 CEST 2021
On 29/10/2021 1:21 p.m., Sam Albers wrote:
> Hi all,
>
> Does anyone know of a way to force utils::bibentry to mimic the BibTex
> behaviour of using double { to force a "corporate name" in the author
> field to print correctly? For example take this bibentry:
Enter it like this:
entry <- utils::bibentry(
bibtype = "Manual",
title = "The Thing",
author = person("The Data People"),
organization = "The Data Org",
year = format(Sys.Date(), "%Y")
)
There's an example just like this in the help page. Sometimes it helps
to look there.
Duncan Murdoch
>
> entry <- utils::bibentry(
> bibtype = "Manual",
> title = "The Thing",
> author = "The Data People",
> organization = "The Data Org",
> year = format(Sys.Date(), "%Y")
> )
>
> entry
> #> People TD (2021). _The Thing_. The Data Org.
> print(entry, style = "citation")
> #>
> #> People TD (2021). _The Thing_. The Data Org.
> #>
> #> A BibTeX entry for LaTeX users is
> #>
> #> @Manual{,
> #> title = {The Thing},
> #> author = {The Data People},
> #> organization = {The Data Org},
> #> year = {2021},
> #> }
>
> I can simply add "{" right in the author string which then passes that
> to the Bibtex entry but the author field is still thinking it is a
> person with a name and I also get some warnings:
>
> entry <- utils::bibentry(
> bibtype = "Manual",
> title = "The Thing",
> author = "{The Data People}",
> organization = "The Data Org",
> year = format(Sys.Date(), "%Y")
> )
>
>
> print(entry, style = "citation")
> #> Warning in parseLatex(x): x:1: unexpected '}'
> #> Warning in parseLatex(x): x:1: unexpected END_OF_INPUT 'The'
> #> Warning in parseLatex(x): x:1: unexpected '}'
> #> Warning in parseLatex(x): x:1: unexpected END_OF_INPUT 'The'
> #> Warning in withCallingHandlers(.External2(C_parseRd, tcon, srcfile,
> "UTF-8", :
> #> <connection>:1: unexpected '}'
> #> Warning in withCallingHandlers(.External2(C_parseRd, tcon, srcfile,
> "UTF-8", : <connection>:4: unexpected END_OF_INPUT 'The Data Org.
> #> '
> #>
> #> People D (2021). _The Thing_. The Data Org.
> #>
> #> A BibTeX entry for LaTeX users is
> #>
> #> @Manual{,
> #> title = {The Thing},
> #> author = {{The Data People}},
> #> organization = {The Data Org},
> #> year = {2021},
> #> }
>
> Any thoughts?
>
> Thanks in advance,
>
> Sam
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list