bibimbap-io / bibimbap

A tool to import BibTeX entries from various sources
BSD 2-Clause "Simplified" License
10 stars 1 forks source link

Months are handled improperly in BibTeX parser #1

Open jowens opened 11 years ago

jowens commented 11 years ago

bibimbap, when running lint, converts a bibtex month abbreviation (e.g. jan) to a hardcoded text string (e.g. January). Bibtex has month abbreviations hardwired into the system; it knows how to sort them, for instance, and a bib style can choose to represent months in a different way (you're Swiss, yes? so you could write a bib style that took month=jan, year=2012 and rendered as Januar 2012; but other styles may prefer 1/2012 or Jan. 2012 etc.).

Lint should not do this. In fact lint should go in the /other/ direction: whenever possible, use bibtex's 3-letter abbreviations. (Those abbreviations are not in quotes either, i.e. month = jan, )

Hopefully lint will also respect the following formats when necessary for day-month or multiple-month:

month = "9~" # dec, // currently lint turns this into {9~December} month = aug # "\slash " # sep, // currently lint turns this into {August\slashSeptember}, which would fail to compile in LaTeX

psuter commented 11 years ago

Thanks for the report (and for reposting here). The problem is in the BibTeX parser, which treats month names as constants and expands them. This was admittedly a quick hack :) I'll fix it, but it requires some more structural changes, so may not be done immediately.

jowens commented 11 years ago

Super. I take my bibtex entirely too seriously — http://www.ece.ucdavis.edu/~jowens/biberrors.html — so count on me reporting stuff that's counter to my exacting standards. :)

jowens commented 11 years ago

Would like to hack a bit over this holiday on bibimbap—just checking you're still workin' on it.

psuter commented 11 years ago

Absolutely, and all contributions are very welcome.

(The workflow for us is usually that we add features as we miss them, so the spikes in pushes correspond to periods when we're writing papers or, as recently, PhD dissertations.)

jowens commented 11 years ago

Love it. Also, from someone who's been there, stay in school as long as you can.