larsgw/citation.js

booktitle in inproceedings parses as journal

Closed this issue · 3 comments

Hello,

I tried to parse a bibtex entry of type inproceedings, but the output changes the field booktitle to journal. Here an example:

BibTeX input

@inproceedings{Bordea2014,
  author = {Paul Buitelaar and
               Georgeta Bordea and
               Barry Coughlan},
  title = {Hot Topics and Schisms in {NLP:} Community and Trend Analysis with Saffron on {ACL} and {LREC} Proceedings},
  booktitle = {Proceedings of the Ninth International Conference on Language Resources and Evaluation, {LREC}},
  pages = {2083--2088},
  year = {2014},
  biburl = {https://dblp.org/rec/bib/conf/lrec/BuitelaarBC14},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Output from BibTeX input

[{
  "label":"Bordea2014",
  "type":"inproceedings",
  "properties":{
    "journal":"Proceedings of the Ninth International Conference on Language Resources and Evaluation, LREC","title":"Hot Topics and Schisms in NLP: Community and Trend Analysis with Saffron on ACL and LREC Proceedings","author":"Buitelaar, Paul and Bordea, Georgeta and Coughlan, Barry","pages":"2083--2088","date":"2014","year":"2014"
  }
}]

Thank you for your help !

This line is the problem: https://github.com/citation-js/citation-js/blob/1226cde7518a44df37892ff431bcccfcc2087b94/packages/plugin-bibtex/src/output/json.js#L39, it should be paper-conference, the CSL equivalent of inproceedings. In the meantime, if you just need the BibTeX as JSON, you can also use the following snippet:

// Parses the input one step and returns the result. In the case
// of a BibTeX string, this outputs the JSON representation of the BibTeX
Cite.plugins.input.chainLink('...')

Demo on RunKit · Method docs

Thank you @larsgw!

This issue should be fixed in v0.5.0-alpha.10. If not, please re-open the issue.