Comment 8 for bug 1099754

Revision history for this message
jesse andries (jesse-andries) wrote :

I looked back into the case issue. It seems bibtex itself is case insensitive, so in that sense it does not really make any difference how the case is normalised in referencer. In fact referencer properly avoids conflicts between keys with different case.
line 731 of Document.C is a comment referring to that, though I could not really identify the piece of code that actually establishes this (my programming knowledge is rather limited). As an example: if there is already a field "mOnth" with value "something" then both "paste bibtex" and the ads-plugin replace "something" with the actual value rather than creating an additional "Month" or "month" field.
Currently, the BibUtils library indeed normalises the case of newly created extra fields through a function firstCap (doing the obvious thing) (see lines 340-341 of BibUtils.C).
It seems to me the case normalisation in the BibUtils library was clearly thought through so I would suggest to try to stick to that and therefore replace the "month" key in the ads-plugin back into a "Month" key.
For further consistency I would suggest to also normalise the case if a field is added through the Document Properties dialog, which is not so at the moment. This just requires calling the firstCap function there as well (line 379 in DocumentProperties.C).

I'm happy to commit the above modifications if you agree.