Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

April 1, 2008

April Fool

Back in 1996, I created a Bibtex style file, which would generate hypertex links to the referenced paper at the arXivs. And I coaxed Harv Galic at SPIRES, who was working on a Bibtex output format, to support it.

With a few minor tweaks, this worked quite satisfactorily for over a decade, until the arXivs introduced their new identifier format. The change in format made it rather tricky to craft something that would work seamlessly with both old- and new-style identifiers. And SPIRES’s lackadaisical implementation (lumping everything into the eprint field) didn’t help.

I no longer knew who to contact at SPIRES, and folks at the arXivs didn’t seem too interested in taking up the issue. So things languished … for a year.

But, then, last week, the arXiv Admins contacted me, and the ball started rolling. After some back-and forth discussions, Travis Brooks implemented the new scheme at SPIRES. So, just in time for the 1st anniversary of the new arXiv identifier scheme, there’s a new version of utphys.bst.

The following (optional) fields are recognized:

archive
A Base-URL (defaults to “http://arxiv.org/abs”, if absent).
eprint
The eprint identifier. For an old-style eprint, this would be something like
eprint = "hep-th/9605023"
For a new-style eprint, this would be something like
eprint = "0707.3168"
primaryClass
The primary classification of new-style eprints; should be omitted for old-style eprints.
archivePrefix
The “archive prefix,” usually, the string “arXiv”.

Here are some examples.

  • Old-style arXiv identifier (the previous behaviour):

    eprint = "hep-th/9605023",

    produces

    \href{http://arxiv.org/abs/hep-th/9605023}{{\tt hep-th/9605023}}
  • New-style arXiv identifier:

    archivePrefix = "arXiv",
    eprint = "0707.3168",
    primaryClass = "hep-th",

    produces

    \href{http://arxiv.org/abs/0707.3168}{{\tt arXiv:0707.3168 [hep-th]}}
  • Old-style arXiv identifier, with a prefix:

    archivePrefix = "arXiv",
    eprint = "hep-th/9605023",

    produces

    \href{http://arxiv.org/abs/hep-th/9605023}{{\tt arXiv:hep-th/9605023}}
  • A different eprint archive

    
    archive = "http://cogprints.org",
    eprint = "5542",
    archivePrefix = "Cogprints",

    produces

    \href{http://cogprints.org/5542}{{\tt Cogprints:5542}} 
  • Yet another eprint archive

    
    archive = "http://www.ncbi.nlm.nih.gov/pubmed",
    eprint = "2277438",
    archivePrefix = "PMID",

    produces

    \href{http://www.ncbi.nlm.nih.gov/pubmed/2277438}{{\tt PMID:2277438}} 

Enjoy version 2.0. Sorry it took this long to get it out the door.

Update:

It may be that, while you were waiting, you have amassed some .bib files with SPIRES’s previous incarnation of the new-style arXiv identifiers. This Perl script will convert such .bib files to the new format.

Update (4/3/2008):

Per AF’s request, I’ve added automatic hyperlinking for the url field to utphys.bst. I had an ulterior motive: this will make it easier to cite things like, well, this blog. For intance:
@Misc{Distler:Lisi1,
   author = "Distler, Jacques",
   title = "A Little Group Theory",
   howpublished ="weblog entry",
   month = "November",
   year = "2007",
   url = "http://golem.ph.utexas.edu/~distler/blog/archives/001505.html",
   note = "See also \cite{Distler:Lisi2}."
}
@Misc{Distler:Lisi2, author = "Distler, Jacques", title = "A Little More Group Theory", howpublished ="weblog entry", month = "December", year = "2007", url = "http://golem.ph.utexas.edu/~distler/blog/archives/001532.html", note = "Followup to \cite{Distler:Lisi1}." }

Of course, no one has the slightest interest in citing those two particular posts, but you get the idea …

Enjoy version 2.1.

Update (4/7/2008): DOI Support

Niklas Beisert suggested adding DOI support. So, in version 2.2, a bibtex entry, like

@Article{Distler:2006if,
     author    = "Distler, Jacques and Grinstein, Benjamin and Porto, Rafael
                  A. and Rothstein, Ira Z.",
     title     = "Falsifying Models of New Physics via {WW} Scattering",
     journal   = "Phys. Rev. Lett.",
     volume    = "98",
     year      = "2007",
     pages     = "041601",
     eprint    = "hep-ph/0604255",
     doi       = "10.1103/PhysRevLett.98.041601",
     SLACcitation  = "%%CITATION = HEP-PH/0604255;%%"
}

turns the journal-reference into a clickable link to the online-journal version of the paper. SPIRES outputs a doi field for all published papers for which a DOI identifier is available.

Posted by distler at April 1, 2008 1:41 PM

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/1649

6 Comments & 0 Trackbacks

Re: April Fool

Hi,

It is hypercool that I can hyperlink to papers in the arXivs using utphys. Can one do the same for SLAC as well, say this SPIRES entry?

The two option seem to be:

1) Not use utphys.bst, and use the CV format produced by SPIRES, or
2)Put in hyperlinks by hand in url field for each bibtex entry.

There must be an easier way…

Posted by: AF on April 1, 2008 9:15 PM | Permalink | Reply to this

Hyperlinking URLs

I’ll have to look at the CV style. Automatic hyperlinking for the url field would be a cool addition.

Thanks for the suggestion!

Posted by: Jacques Distler on April 2, 2008 12:11 AM | Permalink | PGP Sig | Reply to this

Re: Hyperlinking URLs

Many thanks for including the new feature so promptly!

AF

Posted by: AF on April 6, 2008 8:31 PM | Permalink | Reply to this

Re: April Fool

In case you’re interested, it is actually not all that tricky to let BibTeX take care of parsing both the old-style and the new-style Spires eprint entries (i.e. avoiding your Perl script).

Here’s a function that takes either

  eprint = "hep-th/0123456"

or

  eprint = "arXiv:0123.4567 [hep-th]"

and spits out

  hep-th/0123456

and

  0123.4567

respectively. Which you can then use to build the URL.

FUNCTION { format.hyperlink }
{ duplicate$ #1 #5 substring$ "arXiv" =
  { #7 #9 substring$ }
  { "" * }
 if$
}

If you need a full working .bst, let me know.

Posted by: Kasper Peeters on April 2, 2008 4:26 AM | Permalink | Reply to this

Re: April Fool

There’s a reason why, in Bibtex, we write

journal   = "Phys. Rev. Lett.",
volume    = "98",
year      = "2007",
pages     = "041601",

rather than smushing all that information into a single field.

Sure, if the single field adhered to a particular syntax convention, we could always parse out the relevant information, in the fashion you suggested.

Your suggestion works if all eprints are from the arXivs (see my PubMed and Cogprints examples above), and if the eprint field rigidly adheres to a particular syntax.

But it’s better to follow the Bibtex practice of separating out, say, the primaryClass from the eprint-identifier, etc, and putting them in separate fields.

Hence the change.

Posted by: Jacques Distler on April 2, 2008 7:36 AM | Permalink | PGP Sig | Reply to this

Re: April Fool

Sure, I agree completely, thanks for making the SPIRES folks see the light.

Posted by: Kasper Peeters on April 2, 2008 9:05 AM | Permalink | Reply to this

Post a New Comment