Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeX-like comments (for use with biber) #132

Open
igneus opened this issue Nov 15, 2018 · 1 comment
Open

TeX-like comments (for use with biber) #132

igneus opened this issue Nov 15, 2018 · 1 comment

Comments

@igneus
Copy link

igneus commented Nov 15, 2018

I only use biber, never bibtex, and frequently make use of TeX-like comments (% and anything up to the end of line) just anywhere:

% outside of an entry
@book{ book,
% inside, separate line
author = "John Doe" % inside, after a field
}

biber is ok with that, bibtex-ruby crashes just like bibtex would. I usually strip comments before parsing the database:

BibTeX.parse(File.read(bib_path).gsub(/%.+?$/, ''))

My question is: do you find it desirable to handle bibtex-incomplatible biber-style comments in the gem? (Another question would be how - silently and always? optionally?) Or do you prefer to support only standard bibtex features?

@inukshuk
Copy link
Owner

Content outside of an entry are totally fine (they are thrown away by the parser unless you include :meta_content in the options): this example should parse fine, for instance.

Comments inside entries are a different matter. It would be a good idea to have a 'strip_comments' option like you suggest (though, to be safe, I'd disable it by default for backwards compatibility).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants