Skip to content

Commit

Permalink
Enable arXiv identifier printing if bib entry is from arXiv
Browse files Browse the repository at this point in the history
Enabled ArXiv e-print identifier to be printed for articles that
are pre-prints only (and have "ArXiv e-print" in the journal field).
Still some problems with the use of commas.  Only 1 comma will appear
between the year and "arXiv..." for such preprints, but for e.g.
conference precedings there may be no comma at all
  • Loading branch information
jaredgabor authored and timj committed Sep 24, 2014
1 parent ea01c26 commit 78ff943
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions mn2e.bst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
%% May 2014 (NG):
%% Shorten some functions, so that bibtex's 'single function
%% space' parameter doesn't have to be above 100.
%% Sep 2014 (Jared M. Gabor):
%% Enabled ArXiv e-print identifier to be printed for articles that
%% are pre-prints only (and have "ArXiv e-print" in the journal field).
%% Still some problems with the use of commas. Only 1 comma will appear
%% between the year and "arXiv..." for such preprints, but for e.g.
%% conference precedings there may be no comma at all.
%%
%% License:
%% This work may be distributed and/or modified under the
Expand Down Expand Up @@ -531,7 +537,7 @@ FUNCTION {format.title}
FUNCTION {format.eprint}
{ eprint empty$
{ "" }
{ ", \mn@eprint {"
{ " \mn@eprint {"
archiveprefix empty$
{ "" }
{ archiveprefix }
Expand Down Expand Up @@ -689,10 +695,21 @@ FUNCTION {format.page}
if$
}

% If a paper is available as a preprint only, ADS will call the
% journal "ArXiv e-print". In this case MN suggests the journal
% should be called "preprint".
FUNCTION {format.journal.doi}
{ doi empty$
{ journal }
{ "\mn@doi [" journal * "] {" * doi * "}" * }
{ journal "ArXiv e-prints" =
{ "preprint" }
{ journal }
if$
}
{ journal "ArXiv e-prints" =
{ "preprint" }
{ "\mn@doi [" journal * "] {" * doi * "}" * }
if$
}
if$
}

Expand Down Expand Up @@ -891,6 +908,13 @@ FUNCTION {article}
format.page output
}
if$

% If the "journal" field is the arXiv, then print out the arXiv identifier
journal "ArXiv e-prints" =
{ format.eprint "eprint" output.check.nocomma }
{ }
if$

fin.entry
}

Expand Down

0 comments on commit 78ff943

Please sign in to comment.