Giter Club home page Giter Club logo

mn2e-bst's Introduction

mnras.bst

mnras.bst is the bibliography style file used for the latex2e Monthly Notices of the Royal Astronomical Society style file. See the journal's instructions for authors at OUP (Sect. 6.3), and the downloadable files at CTAN.

Previously this file was distributed by Blackwell Scientific.

Style-file support

Recent changes to the .bst file potentially require support from the mnras.cls class file.

  • The .bst file generates references to DOIs, and to URIs mentioned in the .bib file, but using macros \doi and \url. The hyperref package defines the \url macro, but one can define suitable alternatives which typeset the URIs appropriately, even if they don't actually make the hyperlink. These macros are used only within the generated .bbl file. See below.

  • The style file also generates references which implement MN's 'three authors' rule using a macro \mniiiauthor. These macros are used in citations (that is, via the \cite macro) and so outside the generated bibliography (in .bbl).

The file mnras-bst.sty contains the definitions required to support the newly-generated .bst output.

Currently, mnras.bst is configured so that (i) it incorporates the content of the mnras-bst.sty file into the generated .bbl file (see the function begin.bib, at the bottom), and (ii) the \mniiiauthor functionality is disabled, using the setting #0 threeauthorvar := in initialise.mnras. This means that the generated .bbl file is standalone, but doesn't support the MN 'three-authors' prescription.

Ideally, this file will be incorporated directly into the mnras.cls file, or at a pinch loaded as usual using the usual \usepackage{mnras-bst}. In this case, (i) the function begin.bib should be edited to remove the now-superfluous definitions; and (ii) the line #0 'threeauthorvar := in mnras.bst can be changed to #1 'threeauthorvar :=.

If hyperref is not used, then it is necessary to define the \href and \url macros as follows:

\def\href#1#2{#2}
\def\urlinner#1{#1\endgroup}
\def\url{\begingroup\def\do##1{\catcode`##1 12 }%
  \do\\\do\$\do\&\do\#\do\^\do\_\do\%\do\~ \ttfamily \urlinner}

(there is a more compact alternative at the top of mnras-bst.sty, which can be used within a class file).

Authors

This style file was originally written by John Sleath and Tim Jenness at the Mullard Radio Astronomy Observatory in the summer of 1995. It was derived from the astron.bst style file which itself was derived from the apalike.bst style file.

Norman Gray (http://nxg.me.uk and http://8ameter.com) provided the multi-author style fixes, and the additions to the style-file to support DOIs and the MN three-author requirement.

This style was originally known as mn2e.bst but has been renamed to mnras.bst to match the new naming convention for the recently upgraded mnras.cls.

mn2e-bst's People

Contributors

jaredgabor avatar nxg avatar sbird avatar timj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mn2e-bst's Issues

Bibliography sorting for "surnames" starting with lower case letters

The latest version, mnras.bst, incorrectly sorts the bibliography when one of the authors has a surname beginning with a lower case letter. See the attached pdf for an example with "Angulo et al.", "Zwicky" and "de Kool".

The older version, mn2e.bst, correctly sorts the references.

mnras_bst_test.pdf

mnras_bst_test.tex:

\documentclass[usenatbib]{mnras}

\title[Title]{Title}
\author[Author]{Author}

\begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\begin{keywords}
\end{keywords}

\section{Introduction}
\citet{1999NuPhA.656....3A}, \citet{1992A&A...261..188D}, \citet{1933AcHPh...6..110Z}.

\bibliographystyle{mnras}
\bibliography{mnras_bst_test}

\end{document}

mnras_bst_test.bib:

@ARTICLE{1999NuPhA.656....3A,
   author = {{Angulo}, C. and {Arnould}, M. and {Rayet}, M. and {Descouvemont}, P. and {Baye}, D. and {Leclercq-Willain}, C. and {Coc}, A. and {Barhoumi}, S. and {Aguer}, P. and {Rolfs}, C. and {Kunz}, R. and {Hammer}, J.~W. and {Mayer}, A. and {Paradellis}, T. and {Kossionides}, S. and {Chronidou}, C. and {Spyrou}, K. and {degl'Innocenti}, S. and {Fiorentini}, G. and {Ricci}, B. and {Zavatarelli}, S. and {Providencia}, C. and {Wolters}, H. and {Soares}, J. and {Grama}, C. and {Rahighi}, J. and {Shotter}, A. and {Lamehi Rachti}, M.},
    title = "{A compilation of charged-particle induced thermonuclear reaction rates}",
  journal = {\nphysa},
     year = 1999,
    month = aug,
   volume = 656,
    pages = {3-183},
      doi = {10.1016/S0375-9474(99)00030-5}
}

@ARTICLE{1992A&A...261..188D,
   author = {{de Kool}, M.},
    title = "{Statistics of cataclysmic variable formation}",
  journal = {\aap},
 keywords = {Cataclysmic Variables, Main Sequence Stars, Star Formation, White Dwarf Stars, Monte Carlo Method, Stellar Envelopes, Stellar Mass Accretion, Stellar Models, Stellar Orbits},
     year = 1992,
    month = jul,
   volume = 261,
    pages = {188-202}
}

@ARTICLE{1933AcHPh...6..110Z,
   author = {{Zwicky}, F.},
    title = "{Die Rotverschiebung von extragalaktischen Nebeln}",
  journal = {Helvetica Physica Acta},
     year = 1933,
   volume = 6,
    pages = {110-127}
}

Eprint and DOI entries only for preprints and 'in press'

Keith T Smith, summarising an email exchange, on 2013 September 5:

  1. arxiv numbers and dois are being added to every entry which includes them in the .bib . Whilst I can see why this is attractive to some, MNRAS style is not to include this information, except for

Yes. Elsevier style files do it and I think it's a great idea. DOIs seem to be absolutely perfect because they
unambiguously point to the actual paper.

It would also be great if the MN class file enabled hyperref with approved styling for the links.

I agree that including these links would be helpful, but writing them out in full is not. To access them you need to be on a computer anyway, so a clickable link is fine. See next comment.

I'm not sure what ApJ do. What does "including but not writing mean"? You mean it somehow gets in the PDF?

Yes. ApJ include two clickable links as part of their reference lists: the journal name is clickable and goes to the DOI, whilst the volume and page numbers go to the entry on ADS. See e.g. http://iopscience.iop.org/0004-637X/775/1/1/pdf/0004-637X_775_1_1.pdf (paywall) as an example. I think this is a very good solution and something MNRAS should adopt. But until we do it in the final journal, we shouldn't do it in the latex preprints. hyperref for URLs and clickable citations is something I always do in my own papers, but the final version of MNRAS only has clickable URLs (and they're just black so it's not obvious). I'll definitely raise this at the next board meeting, which unfortunately isn't until March. I'd need to discuss it with the publishers first.

Style incorrectly adds full expanded URLs for DOIs and ADS URL

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

Add license

There is no license file. @nxg has taken a look and given the history of apalike.bst and astron.bst determined that the LPPL (standard latex license) is consistent.

Handle presence/absence of eprint prefix

The BibTeX 'eprint' field may or may not include an 'arXiv:' prefix, and there may or may not be an 'archivePrefix' field.

Proposed solution:

  • If the eprint includes 'foo:', then include it
  • If not, and if there's an 'archivePrefix' field, use that
  • If not, then use 'arXiv:'

It's probably infeasible to do the string matching in bst-language, so this might be a case for another macro in mn2e.cls

eprint field left out and not working for field other than arxiv?

The eprint number isn't being added correctly somehow -- I have this .bib entry:

@ARTICLE{Koss:2014,
   author = {{Koss}, M. and {Blecha}, L. and {Mushotzky}, R. and {Hung}, C.~L. and 
    {Veilleux}, S. and {Trakhtenbrot}, B. and {Schawinski}, K. and 
    {Stern}, D. and {Smith}, N. and {Li}, Y. and {Man}, A. and {Filippenko}, A.~V. and 
    {Mauerhan}, J.~C. and {Stanek}, K. and {Sanders}, D.},
    title = "{SDSS1133: An Unusually Persistent Transient in a Nearby Dwarf Galaxy}",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {1401.6798},
 primaryClass = "astro-ph.GA",
 keywords = {Astrophysics - Galaxy Astrophysics, Astrophysics - High Energy Astrophysical Phenomena},
     year = 2014,
    month = jan,
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

but using mn2e.bst I get in the .bbl file

\bibitem[\protect\citeauthoryear{{Koss} et~al.,}{{Koss}
  et~al.}{2014}]{Koss:2014}
{Koss} M.,  et~al., 2014, ArXiv e-prints

Is there smomething else I'm supposed to do (an option to turn on) to get the eprint number in the bibliography? On a related note, it seems that it doesn't work with non-arxiv eprints -- for example, the Astronomy Source Code Library bibtex fails:

@MISC{Pontzen:2013,
   author = {{Pontzen}, A. and {Roskar}, R. and {Stinson}, G. and {Woods}, R.
    },
   title = "{pynbody: N-Body/SPH analysis for python}",
   note = {Astrophysics Source Code Library},
   year = 2013,
   archivePrefix = "ascl",
   eprint = {1305.002},
   month = may,
   adsurl = {http://adsabs.harvard.edu/abs/2013ascl.soft05002P},
   adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

after running latex and bibtex and running latex the second time, it crashes with

! Extra \fi.
\mn@eprint@ ...c \@tempb \let \@tempb \@tempa \fi 
                                                  \ifx \@tempb \@empty \def ...
l.161 ...for python}, \mn@eprint {ascl} {1305.002}

Bloggs J. et al., 2016, in the bibliography

For an article with more than 8 named authors, mnras.bst gives "Bloggs J., et al., 2016, ..." but MNRAS style looks to be "Bloggs J. et al., 2016, ...", i.e., no comma between the author's initial and "et al.". This applies to authors of articles and editors of conference proceedings.

It seems this can be fixed by removing the comma in line 474 of mnras.bst.

Identify repository versions

This is a log of an email discussion.

Norman: It could get confusing to have multiple versions of this mn2e.bst
knocking around. Can you think of an easy way of getting a changeset
checksum into the file? One way would be to move mn2e.bst to mn2e.bst.in,
edit the latter to the former with a bit of sed magic in a Makefile, and
somehow indicate that it's the resulting file that should be used. But
that's messy. Another possibility is to create a little distribution
tarball with a README and the .bst file, with the checksum edited into it
at that point -- I presume github can host that.

Tim: We can put version numbers in. (the history is already kept up to date in
that file). I'd prefer it if no Makefile was required so that people can
download it directly from the style file.


A possible resolution is to use the ident attribute in gitattributes, as described in this stackoverflow answer. I've never done this myself, but it sounds as if this is the right sort of solution for this particular case, where we're anticipating the mn2e.bst file being deployed right out of the repository, rather than through a release process (which would be over the top for this case).

How does this sound?

License information is missing

It seems that it is not indicated un­der which kind of li­cense this file is distributed. It would be great to have the mn2e latex and bibtex files under an open-source license to be included in the texlive distribution.

Cope with ADS page-range with '+'

ADS sometimes gives page ranges as 'nnn-+' (or as 'nnn+' -- which?). This may or may not be an ADS bug, but we have to cope with it here. The MN style is to give just the starting page number.

It may or may not be feasible to handle this in bst-language.

First mention in caption confuses \mniiiauthor

If the first use of \mniiiauthor is in a \caption, then it is expanded to its 'second-use' form (the '...et al' version), and never expanded to its 'first-use' form. See attachment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.