Exporting to BibTeX: Patent Applicant in Braces

Jan P. shared this question 2 years ago
Answered

Hi,


when exporting my references to a BibTeX file, I store the Applicant to the "holder" field. The information is usually stored in braces, so that "Glaxo Group Limited" becomes

holder = {{Glaxo Group Limited}}
for example and is not abbreviated in the bibliography.


However, when I have "Glaxo Group, Ltd." in Citavi, it es exported to

holder = {{Glaxo Group}, Ltd.}
With the citation style, I use, this becomes "L. Glaxo Group", as "Ltd." it is interpreted as a first name.


Is there a way to have the field exported in braces, with braces surrounding the whole name? I want it to be exported as

holder = {{Glaxo Group, Ltd.}}
If I add them manually in citavi, it becomes

holder = {{{Glaxo Group}, Ltd.}}
in the .bib-file which leads to errors.


I do not want to manually change every patent in the .bib-file every time I export my references.


Thanks,

Jan

Comments (1)

photo
1

Hey Sebastian,

thank you for your answer. Because I did not want to manually replace anything after exporting my references and I did not want to have to change them in Citavi, I came up with the following solution within the preamble of my document:


\DeclareNameFormat{patentcompany}{%
  \nameparts{#1}%
  \usebibmacro{name:last-first}
    {\namepartfamily}
    {\namepartgiven}
    {\namepartprefix}
    {\namepartsuffix}%
  \usebibmacro{name:andothers}%
}
\renewbibmacro*{byholder}{%
  \ifnameundef{holder}%
  {}
  {\printtext[parens]{\printnames[patentcompany]{holder}}}
}


What this does:

It first creates a new NameFormat to be used by the \printnames macro. This NameFormat uses the name:last-first bibmacrowith family and given name unshortened in the "last, first" format.

Then the bibmacro byholder is renewed to use this NameFormat when printing the holder field.

I hope, this helps others in the future.

Kind regards,

Jan