[R] Format utils::bibentry with a 'corporate name'

Erin Hodgess er|nm@hodge@@ @end|ng |rom gm@||@com
Fri Oct 29 19:34:54 CEST 2021


Maybe use \{ for the second one?

On Fri, Oct 29, 2021 at 11:22 AM Sam Albers <tonightsthenight using gmail.com>
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:
>
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodgess using gmail.com

	[[alternative HTML version deleted]]



More information about the R-help mailing list