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:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/1649

14 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

et al. and numbers of authors

Hi, I am working with your style .bst and I think that It’s very cool and nice. I have a question.

I have several references with large quantity of authors and I like to obtain my references as the first author, et al.
In this moment I try modify your style .bst with numbers of authors from 128 to 3, but I can’t.
Can your style do this?, How?

Thanks for your time and your suggestions.

Posted by: mfduqued on March 5, 2011 8:55 PM | Permalink | Reply to this

Re: et al. and numbers of authors

I’m not sure I understand what you are after. Is there a standard bibtex style that behave the way you want?

As far as I understand, if you append “and others” to the AUTHOR field, it gets turned into “et al.” by the standard bibtex styles.

You want something that automatically truncates an author list (after how many authors?)?

Posted by: Jacques Distler on March 6, 2011 11:20 PM | Permalink | PGP Sig | Reply to this

Re: et al. and numbers of authors

Hi, thanks for your response.

My problem is:

I have several references with ten authors, I write in the field “author =” of my file bib all authors, then I wait to obtain
first author, et al.
but I am obtaining
first author, second author, ….. ten author
I thought the problem was the numebrauthor field at your style, because with other styles I obtained
first author, et al.

But these styles don’t add the hiperlinks and all functions of the your style.

How do I obtain this with your style?

Thanks for your time and your suggestions.

Posted by: mfduqued on March 7, 2011 5:41 AM | Permalink | Reply to this

Re: et al. and numbers of authors

I thought the problem was the numebrauthor field at your style, because with other styles I obtained

first author, et al.

I am not aware of any bibtex style that supports a “numebrauthor” field.

What “other styles” are you talking about?

Posted by: Jacques Distler on March 7, 2011 8:24 AM | Permalink | PGP Sig | Reply to this

Re: et al. and numbers of authors

Dr. Distler,

I talk the others styles like h-physrev5 or h-physrev at the sprires. I look that this style has the option numbers authors as
FUNCTION {format.names}
{ ‘s :=
#1 ‘nameptr :=
s num.names$ ‘numnames :=
numnames #5 >
s numnames “{ll}” format.name$ “others” = numnames #1 > and
or ‘etal :=
etal
I look for these lines or similares but I don’t find these at your style, then I try add these lines but I don’t working well.

In this moment I solved my problem (with your suggestion of to write others), but I want to know if at this style can to do this.

Posted by: mfduqued on March 7, 2011 8:55 AM | Permalink | Reply to this

Re: April Fool

Dr. Distler,

Thank you for response. In this moment I obtain my references how
First author, et al.
Thank for your suggestion.

But my question is,

Necessarily I must add the word “others” at the author field or this is implicit at your style, i.e., Does your style have the option “numbers of authors”?

Posted by: mfduqued on March 7, 2011 7:08 AM | Permalink | Reply to this

Re: April Fool

In the function format.crossref.editor, the string et.~al. should be et~al. (From the changelog, I guess that this was fixed elsewhere but not here.)

Posted by: Blake Stacey on August 3, 2011 12:39 PM | Permalink | Reply to this

Re: April Fool

Missed that one. Fixed now.

Thanks.

Posted by: Jacques Distler on August 3, 2011 1:35 PM | Permalink | PGP Sig | Reply to this

Post a New Comment