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
Maybe use \{ for the second one?
On Fri, Oct 29, 2021 at 11:22 AM Sam Albers <tonightsthenight at
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 at 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 at gmail.com
[[alternative HTML version deleted]]
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 at 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. >