timj / mn2e-bst

Monthly Notices of the Royal Astronomical Society bibtex style file
13 stars 5 forks source link

Add support for arxiv and doi entries #1

Closed sbird closed 11 years ago

sbird commented 11 years ago

Updated version that adds arXiv:1209.1234 and doi:10.0.0/XXXX to the reference list. For now, the style can be over-ridden by redefining \eprint and \doi in the user's tex file to be a hyperlink, but this is not done by default.

Following our discussion, this does not use the adsurl field - one additional complication with them is that they can contain '%' characters - eg, an A&A reference will contain A%26A, which makes them difficult to reliably include in LaTeX.

timj commented 11 years ago

Thanks. My main thought is whether there is an official MNRAS style guide for DOI/Arxiv rendering in references. I haven't looked recently.

Git commit messages should have a summary line and then a blank line before the detail starts.

Did Antony Lewis write the patch (so should be the actual person listed in the commit), or did he write a version for another bibtex style and this patch is a reworking of the original to make it conform to the mn2e file?

sbird commented 11 years ago

I think there is no official style guide - the publishers seemed a bit surprised by my doing it last time until I explained it.

Antony wrote the original patch for an older version of the mn2e.bst style file, and I forward-ported it to this one. See here: http://cosmocoffee.info/viewtopic.php?t=304 . I don't mind who is attributed.

I'll fix the commit message, if accepted.

timj commented 11 years ago

I looked through my email and last year this came up in a discussion with MN and I got a ruling on arXiv:

Finally, to answer Tim's last question, the style for arxiv papers is:

    Smith P. et al., 2002, preprint (arXiv:0123.4567)

Note the capital X. We don't currently include hyperlinks in the final
PDF; that's a possible improvement but one that we would need to discuss
with both the publishers and editorial board first.

Although I imagine if we snuck in hyperlinks I can't imagine much of a problem.

sbird commented 11 years ago

Sorry, I wasn't clear in my original request - that is the style for preprint (ie, as-yet-unrefereed) papers, where the actual citation is the arXiv link.

What this patch does is to add a link to the arxiv copy for all papers, even journal refereed ones, after the citation, in this style:

Smith P. et al., 2002, MNRAS 408 571-581 [0123.4567] [ADS]

where the [] denote links. So I'm not sure the email you got applies - but I could change the patch so it uses the style:

Smith P. et al., 2002, MNRAS 408 571-581 [arXiv:0123.4567] [ADS]

if you like.

timj commented 11 years ago

Looking at Elsevier journal styles arXiv:0123.4567 and doi:abcd.345/67 seem to be used so we should definitely have arXiv: in there I think.

timj commented 11 years ago

I should add that I am keen on getting DOI and arXiv support into the style. I'm not sure that MN will go for an ADS reference but if they did maybe we would have more chance if the the text should said ads:bibcode

sbird commented 11 years ago

I'm not sure about ads:bibcode - arxiv bibcodes are short, while ADS bibcodes tend to be quite long, which seems a waste, especially as no-one will ever actually type it in (they will search by paper or use the arXiv ref). So I'm willing to ditch ADS from the patch if you think they won't like a pure hyperlink.

Note that what the current patch does is to emit \eprint{} and \adsurl, so you can get the arXiv style you like either with \newcommand{\eprint}[1]{\href{http://arxiv.org/abs/#1}{#1}} or \newcommand{\eprint[1]{\href{http://arxiv.org/abs/#1}{arXiv:#1}}

I can change the bst to emit \href{http://arxiv.org/abs/#1}{arXiv:#1} to enforce a particular style, but then the bib will not compile well for people who don't have a working hyperref package (previously they could do: \newcommand{\eprint[1]{arXiv:#1}}). I think the only way to get around that is to define \eprint in mn2e.cls, right?

timj commented 11 years ago

I assume the purpose is for MN to accept the new version of the bibtex style file (although that's easier said than done). In that case I feel that the text arXiv:blah should appear automatically without the user having to define \eprint in their document. The purpose of the style file is to enforce the style.

ADS use reasonably short bibcodes: 2013MNRAS.430.2545C but I'm guessing that would be too much for MN to handle at this time. DOIs are also long but in that case I think it is worth adding them so that they start to appear automatically. doi:10.1093/mnras/stt052 appearing is fine and Elsevier already do that in their bibtex style files.

Assuming hyperref is available is fine with me. I'm not sure how easily we can convince MN to adopt \eprint although I'm happy to start a dialogue up with them again (as we were discussing adding arXiv). I think an initial approach may well be for arXiv: and doi: to appear in the references as text and not hyperlinks. Get that accepted and then push for the hyperlink.

sbird commented 11 years ago

To be honest, your aim is higher than mine; I hadn't thought it possible to get MN to accept the new bibtex.

I never read the journal papers anyway, just the arxiv, and I was sick of typing, eg, "Wright AND Mather AND Bennett" etc into ADS every time I wanted to look up the COBE paper, particularly when arXiv searching is so clumsy. So I thought that if I could make this style more widely used, I could save myself and everyone else some effort.

Thinking about it some more, actually, how about this for a radical idea: Right now we have "and seminal result <CITE Someone 1963>" and the citation is a hyperlink to the page in the reference list with that citation on. Then you read through that page to find the reference you were actually interested in and type the names into ADS, click through a few pages to double check that you have actually the right paper, then you download a pdf and open it.

The reference hyperlink eliminates the second step (typing into ADS), but why can't we have the citation just be an actual hyperlink to the actual paper somewhere on the internet? Journal versions of the paper could link to the journal version, and arXiv versions the arXiv version. The references would still be printed, but there would be less messing about.

Anyway, I will post a patch adding arXiv: and doi: with no hyperlinks for now

sbird commented 11 years ago

Ok, extra commit done.