andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Unexpected doi output in plain text export #21

Closed bdarcus closed 3 years ago

bdarcus commented 3 years ago

Per list, I'm finding in this case a doi is getting output as an http link when using plain text export, and it makes no sense to me.

Details.

  1. chicago-note-bibliography-16th-edition.csl
  2. this json file

citeproc-el output:

Low, Setha M. “The Edge and the Center: Gated Communities and the
Discourse of Urban Fear.” /American Anthropologist/ 103, no. 1 (March 1,
2001): 45–58. <https://doi.org/10.1525/aa.2001.103.1.45>.

pandoc output:

Low, Setha M. “The Edge and the Center: Gated Communities and the
Discourse of Urban Fear.” American Anthropologist 103, no. 1 (March 1,
2001): 45–58. doi:10.1525/aa.2001.103.1.45.

My reading of the style (see here, in particular) says the latter is correct, but I really can't understand why the former.

This is also what I see with the default chicago-author-date style, which does specify this sort of formatting:

Low, Setha M. 2001. “The Edge and the Center: Gated Communities and the
Discourse of Urban Fear.” /American Anthropologist/ 103
(1):45–58. <https://doi.org/10.1525/aa.2001.103.1.45>.

Clearly they are different styles.

~I also wondered if it was something about the export backend, but confirmed the same with HTML.~ (edit: sorry; made a mistake here)

Any other ideas?

Or can someone else confirm I'm not crazy (or maybe just over-tired!) here?

Edit: looking at this again next day, still doesn't seem right, but am still unsure why (I note, for example "doi" doesn't show up in the code base at all).

cc @denismaier

andras-simonyi commented 3 years ago

I think I managed to track this down. First of all, the issue doesn't affect html and latex Org exports, which use the html and latex output of citeproc-el directly, the problematic behavior occurs only when citeproc-el produces org output and this gets embedded in the Org document before exporting. In the latter case, the Org exporter treats the doi links in the bibliography as it would any doi link in the document, and, apparently, this means converting them to urls by default. (I don't know what is the easiest way of turning this off.)

bdarcus commented 3 years ago

I think I managed to track this down. First of all, the issue doesn't affect html and latex Org exports, which use the html and latex output of citeproc-el directly, the problematic behavior occurs only when citeproc-el produces org output and this gets embedded in the Org document before exporting. In the latter case, the Org exporter treats the doi links in the bibliography as it would any doi link in the document, and, apparently, this means converting them to urls by default. (I don't know what is the easiest way of turning this off.)

Thanks for looking into this!

I'm glad I was wrong about it also happening with the HTML output; I got confused as I was switching styles. Sorry for the error there. Edit: I changed the title to better clarify.

If this doesn't happen with HTML and LaTeX, it's much less of an issue. But still, ideally it would work consistently.

denismaier commented 3 years ago

FWIW, the recommendation on doi.org is to use the link format for DOIs anyway. So, I don't think that's much of a problem. I don't know what the Chicago FAQ say about using DOIs in their old styles. Might be a good idea to look this up.

bdarcus commented 3 years ago

FWIW, the recommendation on doi.org is to use the link format for DOIs anyway. So, I don't think that's much of a problem. I don't know what the Chicago FAQ say about using DOIs in their old styles. Might be a good idea to look this up.

I just checked; Chicago says the same.

But a) the visual formatted text is a style-side question, while b) is a processor-side. For the latter, see #22.

As a related, but separate, matter, seems we should get org-mode to link those doi links.

EDIT: actually, org export does link doi in HTML output; just not, apparently, in the bibliography!

andras-simonyi commented 3 years ago

I think the issue has been addressed by implementing the external linking recommendations of the CSL 1.0.2 standard, so if there are no objections I'm going to close it soon.