Open mjy opened 3 years ago
If you pass the author as a single string, it will try to parse it. The {}
cause the parsing to fail, so it falls back to the literal input instead. So this behavior is incidental, the brackets do not preserve the string by definition.
In order to by-pass name passing you can pass the author as an object. Since this is a literal name and not a personal name with family/given parts you would want to set it to: { "literal" => "Consortium of Grand Poobahs" }
.
Wonderful, thanks.
A followup, we're getting to citeproc form using the BibTeX::Entry.new(bibtex_type: bibtex_type).to_citeproc
pattern. Is there a similar convention for BibTeX::Entry for literals that could be used so that I won't have to tweak the to_citeproc
return?
E.g. this transition:
b.author = {literal: 'foo and the bar'}
=> {:literal=>"foo and the bar"}
2.7.4 :028 > b.to_citeproc
=> {"publisher-place"=>"d", "author"=>[{"family"=>"{:literal=>\"foo and the bar\"}"}],
I don't think bibtex-ruby
has the concept of literal names, so you'll likely need to implement or tweak the conversion to CSL-JSON.
Checking to see if I'm missing something obvious.
When I want to render a verbatim author string (e.g.
Consortium of Grand Poobahs
), then the author string is parsed.Code is a wrapper, not native, but you can see what I'm getting at here:
vs.
I note that
{}
inauthor
is being assigned into_citeproc
as"author"=>[{"family"=>"{Consortium of Grand Poobahs}"}
, this is probably why it renders "cleanly".Questions:
{}
handled this way by chance, or by design?{}
struck, or is this .csl specific?{}
?Thanks!