0

As I see it, most BibTeX styles (.bst files) assume that the doi field in a BibTeX databases (.bib files) is saved without a http://dx.doi.org/ prefix. However, many scentific journals export bibtex recodrs with this prefix, eg,

doi = {http://dx.doi.org/10.1063/1.1408625},

although

doi = {10.1063/1.1408625},

is expected by the most of the BibTeX styles.

As a result a standard BibTeX style fails to produce correct doi output. Is it possible to invent a bibtex function that would check if the prefix http://dx.doi.org/ is already in the doi field value and append in only in the case when it is absent? If .bst style is not able for such manipulation, then it could pass the doi value to a LaTeX command that would make required check.

6
  • 6
    It would be easier to use search and replace to clean your .bib instead of messing with bibtex internals. Or let sed do the job for you, e.g. sed 's_http://dx.doi.org/__g' bibliography.bib – DG' Nov 28 '14 at 9:07
  • 2
    Certainly the fault here is with the export: the DOI itself clearly doesn't contain the web link part. As @DG' says, it seems best to fix the data in the database. – Joseph Wright Nov 28 '14 at 10:50
  • 2
    The aim is to fix it, where it is broken. – DG' Nov 28 '14 at 13:00
  • 1
    With biblatex you can make such changes on the fly. – Andrew Swann Feb 3 '15 at 13:52
  • 3
    I agree with @DG': BibTeX entries exported by scientific databases can almost never be taken "as is" – they simply contain too many errors (e.g., forced title capitalization, wrong escaping of special characters, ...). Basically, one has to edit them anyway, the doi-is-url issue is just another nuisance. – Daniel Feb 3 '15 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.