timj / mn2e-bst

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

Style incorrectly adds full expanded URLs for DOIs and ADS URL #13

Open DJRumble opened 10 years ago

DJRumble commented 10 years ago

In my latex document I am calling the file with:

\bibliographystyle{/Users/damian/Documents/Thesis/mn2e-bst-master/mn2e} - a direct link to the folder I downloaded in the link below.

However when I run this in Latex it produces reference in the following format.

Alonso-Albi T., Fuente A., Bachiller R., Neri R., Planesas P., Testi L., Bern ́e O., Joblin C., 2009, http://dx.doi.org/10.1051/0004-6361/200810401 A&A, http://adsabs.harvard.edu/abs/2009A

timj commented 9 years ago

@nxg I have asked @DJRumble for example tex and bib files.

keithtsmith commented 9 years ago

This is the same problem as I mentioned in issue #7

timj commented 9 years ago

With current mn2e style it works (ish) for me but I think one of the problems is that most people are trying to use the new style file with the old class file. I think it's when the old class file is used that the full URLs turn up. When I tested the example sent to me by @DJRumble I did not reproduce that behaviour. It also inserted the arXiv identifier and preprint but only in the specific case where the journal name is "ArXiv e-prints".

segasai commented 8 years ago

I've had the same issue as described above and the solution for me was to remove spaces in the make.href.hyperref function (in mnras.bst), i.e.

FUNCTION {make.href.hyperref}
{
  "\href{" swap$ * "}{" * swap$ * "}" *
}

instead of "\href {" swap$ * "} {" * swap$ * "}" *

I've got no clue however why it works.