CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

Including arxiv refs in papers
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Teaching, Papers and Presentations
View previous topic :: View next topic  
Author Message
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: July 21 2005  Reply with quote

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)
Back to top
View user's profile [ Hidden ] Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: March 30 2006  Reply with quote

The email service described at

http://www.slac.stanford.edu/spires/hep/bib/bibtex.shtml

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

Code:
@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:
@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)
Back to top
View user's profile [ Hidden ] Visit poster's website
Oliver Zahn



Joined: 10 Mar 2005
Posts: 9
Affiliation: Berkeley Center for Cosmological Physics

PostPosted: April 02 2006  Reply with quote

Has anybody figured out by any chance how to make eprint numbers appear in the bibliography when using emulateapj? Thanks.
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: April 10 2006  Reply with quote

Here are modified bibtex style files:

apj: http://cosmologist.info/utils/apj_hyperref.bst
elsevier: http://cosmologist.info/utils/h-elsevier-hyperref.bst

To use them include the following in your tex file (for apj):

Code:

\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).
Back to top
View user's profile [ Hidden ] Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: April 14 2006  Reply with quote

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.
Back to top
View user's profile [ Hidden ] Visit poster's website
Boud Roukema



Joined: 24 Feb 2005
Posts: 82
Affiliation: Torun Centre for Astronomy, University of Nicolaus Copernicus

PostPosted: April 14 2006  Reply with quote

(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:

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:
$item =~ s/%\n//g;


or with context:

Code:

@@ -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
Back to top
View user's profile   Visit poster's website
Boud Roukema



Joined: 24 Feb 2005
Posts: 82
Affiliation: Torun Centre for Astronomy, University of Nicolaus Copernicus

PostPosted: April 14 2006  Reply with quote

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 :(
Back to top
View user's profile   Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: July 14 2007  Reply with quote

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:

\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:
  eprint    = "arXiv:0706.0849 [astro-ph]"


as well as the old form

Code:
   eprint    = "astro-ph/0611862"
Back to top
View user's profile [ Hidden ] Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: July 29 2008  Reply with quote

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:

\usepackage{natbib,hyperref,ifthen}
...
\bibliographystyle{arxiv}
Back to top
View user's profile [ Hidden ] Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1239
Affiliation: University of Sussex

PostPosted: May 28 2012  Reply with quote

Now also bst for A&A at

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

(useful for people writing Planck papers).


Code:

\usepackage{natbib,hyperref,ifthen}
...
\bibliographystyle{aa_arxiv}
Back to top
View user's profile [ Hidden ] Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Teaching, Papers and Presentations All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.