retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.34k stars 287 forks source link

XPW67IUN underscore in doi field #532

Closed cdriveraus closed 8 years ago

cdriveraus commented 8 years ago

It seems that the underscore is causing latex problems, and should probably be handled differently?

retorquere commented 8 years ago

Is this for bibtex or biblatex?

cdriveraus commented 8 years ago

Using natbib / bibtex. And when I say problems, I mean 'missing $ inserted', though still compiles.

retorquere commented 8 years ago

@nickbart1980 I don't think bibtex knows about DOIs, correct? I output them in verbatim mode, and bibtex doesn't seem to like it.

njbart commented 8 years ago

It’s certainly not in the original bibtex specs, but if some bibtex style does render the content of a doi field, but chokes on special characters, I’d consider that style to be broken. I’d say this is not a BBT bug, and would recommend to contact the style author instead.

cdriveraus commented 8 years ago

Aha ok... it's the apa6 style, for interest.

retorquere commented 8 years ago

I've sent the apa6 maintainer (brian@beitzel.com) an email asking his advice.

retorquere commented 8 years ago

I got back a somewhat cryptic response:

"The apa6 class does not handle bibliographies, so this question is best addressed to the maintainers of whichever bibliography packages are involved.  However, I see no reason to treat DOIs for BibLaTeX any differently from BibTeX."

Does that mean it'd be a natbib issue?

njbart commented 8 years ago

I would guess so. An alternative might be to try an addon like the uri package (see https://tex.stackexchange.com/questions/53993/natbib-of-doi-with-bad-characters). Anyway, an MWE demonstrating the OP’s problem would be very helpful …

retorquere commented 8 years ago

grin it's cryptic to me because all of BibTeX is cryptic to me. I didn't mean it as a slight against you, I just didn't want to bother you again until I have my resident BibTeX expert look at it. Sorry for raising the idea you specifically were cryptic.

On Tue, Jul 12, 2016 at 2:12 PM, Brian Beitzel brian@beitzel.com wrote:

It’s not an apa6 issue, because apa6 does not handle bibliographies at all. I don’t know how to be less “cryptic” than that.

Brian

From: Emiliano Heyns [mailto:emiliano.heyns@iris-advies.com] Sent: Tuesday, July 12, 2016 1:49 AM To: Brian Beitzel brian@beitzel.com Subject: RE: DOI in APA6

Really? So it'd be a natbib issue, not an apa6 issue?

On Jul 12, 2016 4:26 AM, "Brian Beitzel" brian@beitzel.com wrote:

Hi Emile,

The apa6 class does not handle bibliographies, so this question is best addressed to the maintainers of whichever bibliography packages are involved. However, I see no reason to treat DOIs for BibLaTeX any differently from BibTeX.

Brian

Brian D. Beitzel, Ph.D.

Professor

Department of Educational Psychology,

Counseling and Special Education

366 Fitzelle Hall

SUNY Oneonta

Oneonta, NY 13820

(607) 436-3933

brian.beitzel@oneonta.edu

From: Emiliano Heyns [mailto:emiliano.heyns@iris-advies.com] Sent: Monday, July 11, 2016 2:09 PM To: brian@beitzel.com Subject: DOI in APA6

Hello Brian,

I maintain a BibTeX exporter for the Zotero reference manager, and I have an error report regarding DOI handling with APA6 ( https://github.com/retorquere/zotero-better-bibtex/issues/532). Right now, I export DOIs in verbatim mode, the way BibLaTeX expects them. I am aware BibTeX is not BibLaTeX, but is there a specific reason to not do the same for the BibTeX style? It's easy to amend, but I'd like to make sure that this is the right way to go.

Regards,

Emile

retorquere commented 8 years ago

Well, that was rather embarrassing. As @nickbart1980 said, an MWE would be very helpful -- I need to know your bibliography style in use rather than the document style.

cdriveraus commented 8 years ago

Ok - here you are...

doiproblem.zip

retorquere commented 8 years ago

@nickbart1980 i've put it up at https://www.sharelatex.com/project/54feca38f58d781e0c982eeb so we can experiment, but it has no bib style specified -- do you know what the default style is if none is specified? Would that be plain?

retorquere commented 8 years ago

Wow, I'm on a roll today. @nickbart1980 already pointed to the solution -- adding \usepackage{uri} or \usepackage{doi} to your document should fix it.

cdriveraus commented 8 years ago

Sure, thanks I appreciate it being looked into - I thought you must have been wanting to implement something on your end! :)

retorquere commented 8 years ago

I fix what I can, but BibTeX in particular doesn't make life easy. I've settled on BibLaTeX myself. Which, make no mistake, has tons of issues too, but they tend to be slightly more sane problems in today's world. Alas, not everyone can use BibLaTeX, but if you can, you're doing yourself a favor.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.