Page 1 of 1

Including arxiv refs in papers

Posted: July 21 2005
by Antony Lewis
Modified BibTex files for including arxiv eprint references in most paper styles are available at

http://arxiv.org/hypertex/bibstyles/

Just include the eprint option in your bibtex file, and it will appear in your paper citation after the paper reference. RevTex4 (Phys Rev) also has built in support for this. Much easier to use than doing a reverse arxiv search from the reference!

(For those that don't know, you can get pre-formatted BibTex entries automatically from the arxiv: on the paper abstract page click "SLAC-SPIRES HEP", then click "BibTex"- which includes the arxiv reference)

Re: Including arxiv refs in papers

Posted: March 30 2006
by Antony Lewis
The email service described at

http://www.slac.stanford.edu/spires/hep ... btex.shtml

has now been repaired, and works well for automatically updating SPIRES bibtex reference files as papers become published. E.g. sending

Code: Select all

@Article{Lewis:2005tp,
     author    = "Lewis, Antony",
     title     = "Lensed CMB simulation and parameter estimation",
     eprint    = "astro-ph/0502469",
     SLACcitation  = "%%CITATION = ASTRO-PH 0502469;%%"
}
would return

Code: Select all

@Article{Lewis:2005tp,
     author    = "Lewis, Antony",
     title     = "Lensed CMB simulation and parameter estimation",

     journal   = "Phys. Rev.",
     volume    = "D71",
     year      = "2005",
     pages     = "083008",
     eprint    = "astro-ph/0502469",
     SLACcitation  = "%%CITATION = ASTRO-PH 0502469;%%",
}

(you can include as many references as you like and they will all be automatically updated)

Including arxiv refs in papers

Posted: April 02 2006
by Oliver Zahn
Has anybody figured out by any chance how to make eprint numbers appear in the bibliography when using emulateapj? Thanks.

Re: Including arxiv refs in papers

Posted: April 10 2006
by Antony Lewis
Here are modified bibtex style files:
[q]
apj: http://cosmologist.info/utils/apj_hyperref.bst
elsevier: http://cosmologist.info/utils/h-elsevier-hyperref.bst
[/q]
To use them include the following in your tex file (for apj):

Code: Select all

\usepackage{hyperref}
\bibliographystyle{apj_hyperref}
\newcommand{\eprint}[1]{\href{http://arxiv.org/abs/#1}{#1}}
\newcommand{\ISBN}[1]{\href{http://cosmologist.info/ISBN/#1}{ISBN: #1}}
\newcommand{\adsurl}[1]{\href{#1}{ADS}}
\providecommand{\url}[1]{\href{#1}{#1}}
\providecommand{\newblock}{}
This includes arXiv references after the paper info, and PDF (and dvi) files will be hyperlinked directly to the relevant arXiv (or ADS) web pages. An example using elsevier is astro-ph/0601594.

Note that to see hyperlinks in postscript you need to use dvips -z (not all postscript viewers support hyperlinks).

Re: Including arxiv refs in papers

Posted: April 14 2006
by Antony Lewis
There's also now a bst file for MNRAS:

http://cosmologist.info/utils/mn2e_eprint.bst

This also automatically converts SPIRES 'Astrophys. J.' to ApJ, and similarly for MNRAS, AJ, A&A and ApJS. Works the same way as in previous post.

A&A; nat2jour.pl needs to handle bibtex broken long line

Posted: April 14 2006
by Boud Roukema
(1) A&A

Previously i've been using a script which does:
latex
bibtex
nat2aa.pl (a slight variation on nat2jour.pl, which fixes a few trivial things like maximum no of authors etc.)
latex
latex
dvips

and using a copy of apj.bst with a one-line hack in this part, choosing "oldname" instead of "---"

Code: Select all

STRINGS {oldname}

FUNCTION {name.or.dash}
{ 's :=
   oldname empty$
     { s 'oldname := s }
     { s oldname =
         { oldname }
         { s 'oldname := s }
       if$
     }
   if$
}
IMHO the same should work for apj_hyperref.bst - it seems to work for me.

(2) nat2jour.pl needs to handle bibtex broken long lines

bibtex cuts lines longer than 79 characters, putting %\\n at the break, so that other programs can glue the pieces back together later on.

nat2jour.pl 2004/10/06 glues all lines back together, but does not remove these % signs. Since latex considers % as a comment, this causes a problem for long URLs like from the ADS urls (in principle, \\url and \\href know about % or _ in urls).

In any case, the hack to nat2jour is just one line:

Code: Select all

$item =~ s/%\n//g;
or with context:

Code: Select all

@@ -182,6 +182,9 @@
     $item =~ s/([0-9]+)\+\n/$1\n/g;           # AA replace +\n with \n # OK :)
 #    $item =~ s/\{pages[^\+}]\}\+}/\1}/g;          # failed test
 #    $item =~ s/Untangling/Tangunling/g;           # test that script functions
+
+#   14 April 2006 Boud Roukema
+    $item =~ s/%\n//g;                                  # paste together broken lines
 #
     $item =~ s/\n//g;                                  # remove newlines
     $item =~ s/\{\\natexlab\{(.*?)\}\}/\1/g;           # remove \natexlab's

nat2jour.pl

Posted: April 14 2006
by Boud Roukema
nat2jour.pl is here:

http://ads.harvard.edu/pubs/bibtex/astronat/nat2jour.pl

and it doesn't seem to have been updated (since 26-Apr-2000 03:37) to handle internal hyperrefs :(

Re: nat2jour.pl

Posted: July 14 2007
by Antony Lewis
To use the above method of hyperlinking arxiv references with the new arxiv numbering scheme, you need to change the definition of \eprint to something like

Code: Select all

\usepackage{ifthen}

\def\eprinttmp@#1arXiv:#2 [#3]#4@{
\ifthenelse{\equal{#3}{x}}{\href{http://arxiv.org/abs/#1}{#1}
}{\href{http://arxiv.org/abs/#2}{arXiv:#2} [#3]}}

\renewcommand{\eprint}[1]{\eprinttmp@#1arXiv: [x]@}
(yup, I couldn't see a neat way to do it with just latex...)

This will work with bibtex entries of the form

Code: Select all

  eprint    = "arXiv:0706.0849 [astro-ph]"
as well as the old form

Code: Select all

   eprint    = "astro-ph/0611862"

Re: nat2jour.pl

Posted: July 29 2008
by Antony Lewis
ADS and SPIREs keep changing the format of their arXiv eprint entries... here's a version of the revtex4 style file that should link them all correctly

http://cosmologist.info/utils/arxiv.bst

To use just do

Code: Select all

\usepackage{natbib,hyperref,ifthen}
...
\bibliographystyle{arxiv}

Re: nat2jour.pl

Posted: May 28 2012
by Antony Lewis
Now also bst for A&A at

http://cosmologist.info/utils/aa_arxiv.bst

(useful for people writing Planck papers).

Code: Select all

\usepackage{natbib,hyperref,ifthen} 
...
\bibliographystyle{aa_arxiv}