ORCID / bibtexParseJs

A JavaScript library that parses BibTeX parser.
MIT License
107 stars 39 forks source link

JabRef @Comments tags in export files #14

Closed AlexandreRio closed 6 years ago

AlexandreRio commented 7 years ago

Hi all,

I noticed that when JabRef writes to the database file (.bib) it adds @Comment lines to save its preferences but its format seems to be unsupported by your library.

Should the comment rule be loosen up? Should I just remove my @Comment tags before processing it with bibtexParseJs?

Here is what JabRef comments look like:

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: saveActions:enabled;
date[normalize_date]
editor[unicode_to_latex]
pages[normalize_page_numbers]
journal[unicode_to_latex]
month[normalize_month]
author[unicode_to_latex]
all-text-fields[ordinals_to_superscript]
title[html_to_latex,unicode_to_latex]
booktitle[unicode_to_latex]
;}

@Comment{jabref-meta: saveOrderConfig:specified;bibtexkey;false;author;false;abstract;false;}
fuhrmanator commented 7 years ago

I confirm that @Comment lines in JabRef won't parse. Removing them is a work-around (Jabref is a pretty popular standard of BIB format).

To make ORCID easier for everyone to use, there should be some feedback on the error. I'm not sure how to do this best, but many people (especially researchers with lots of publications) won't make it here to debug the .bib file.

rcpeters commented 6 years ago

tested

    @Comment{jabref-meta: saveActions:enabled;
    date[normalize_date]
    editor[unicode_to_latex]
    pages[normalize_page_numbers]
    journal[unicode_to_latex]
    month[normalize_month]
    author[unicode_to_latex]
    all-text-fields[ordinals_to_superscript]
    title[html_to_latex,unicode_to_latex]
    booktitle[unicode_to_latex]
    ;}

    @Comment{jabref-meta: saveOrderConfig:specified;bibtexkey;false;author;false;abstract;false;}

    @article{sample1,title={sample title}}

and it parsed the article fine.