doi2bib icon indicating copy to clipboard operation
doi2bib copied to clipboard

Abbreviating journal name fails when the full name has uppercase terms in it (e.g. ACM)

Open tzok opened this issue 11 months ago • 1 comments

You can reproduce the problem with doi:10.1145/3589263

  1. BibTeX generated by crossref.org has a protected term in the journal field: {ACM}

    $ curl http://api.crossref.org/works/10.1145/3589263/transform/application/x-bibtex
    
    @article{Kuschewski_2023,
     ...
     journal = {Proceedings of the {ACM} on Management of Data}
    }
    
  2. Because of that, the regular expression to replace the journal field with the abbreviated name fails: https://github.com/bibcure/doi2bib/blob/master/doi2bib/crossref.py#L91

  3. In effect, the BibTeX produced by doi2bib has this malformed line:

    @article{Kuschewski_2023,
     ...
         journal = {Proc. ACM Manag. Data} on Management of Data}
    }
    
  4. In the end, bibtexparser recognizes the whole section as a comment and not an @article

tzok avatar Jul 25 '23 13:07 tzok