[Start of ChangeLog: Changes noted here are reflected in the original text further below.
Update(08/08/19):
- DOI hyperlinking for inCollection and inProceedings/Conference has been changed from “chapter, pages” to “title”.
- The keyword “chapter” has been made optional for inCollection.
Update(15/11/21):
- DOI hyperlinking for inBook has been changed from “chapter, pages” to “title”.
- inBook is treated as inCollection if both authors and editors are present in the data entry! (This specific update is inspired by Warren Siegel citing this paper in his paper.)
- The keyword “pages” has been made optional for inCollection and inProceedings/Conference.
- A minor hyperlinking bug in Misc has been fixed.
End of ChangeLog.]
You should have come from here.
Reiterating, I have created ‘hephys’ bibliography style which can be used to add references in hep-th papers. I was planning to compare hephys with “utphys” (my preferred style before I thought of creating my own) but that may leave a bad taste in some mouths including my own so let me just highlight some features of hephys, with no ulterior motive. hephys is optimized for InSpire’s BibTeX data so it’s mostly intended for people writing hep-th papers. In fact, utphys is quite general so anyone not writing hep-th papers should just stick to it.
Some interesting facts about hephys:
- hephys tries to follow mostly LaTeX(EU) style typesetting of citations.
- hephys correctly typesets and links both old-style and new-style arXiv-identifiers.
- hephys treats url field as doi if doi field is not present.
- If doi field is present, then hephys appends url at the end of the citation only if it is a different link (it can’t be an arXiv link either; as I said before, very specialized to hep-th papers).
- hephys clubs number and volume together as in vol [num] for journal articles.
- After everything’s thought and written, there’s a possible deal-breaker: “Title”, vs. “Title,”. (No prizes for guessing which one hephys outputs!
)
On to some history now: I used ‘makebst’ command (available in any LaTeX installation) to create a skeleton style file ages ago. Why was it a skeleton, you ask? Because it had no (when I say no, I mean NO) support for hyperlinking or any idea for handling arXiv data properly. So where do we go from there? I don’t know about ‘we’ but I learnt that .bst files are written in an unnamed programming language using postfix notation! That brought back ‘great’ memories from class IX (nearly 2 decades ago) when we were taught some ‘computer theory’ along with BASIC (a basic programming language). Never thought that there would be a ‘serious’ language based on this notation. I have seen some discussion about prefix / infix / postfix notation in Mathematica somewhere but still as a curiosity rather than in any actual programming usage. But, here there was an opportunity to explore the thing that I once thought was ‘unexplore-able’. Considering myself a programming expert, I was able to edit a few things to make arXiv links appear as I wanted, after going through this manual half a dozen times.
Then I remembered there’s something called DOI which can be used to hyperlink journal info! That was the time to open utphys.bst file and steal Jacques Distler’s code (basically the function “add.doi”). My expert senses, not to rest so easily, went on to give me sleepless nights till I fixed the behaviour of url field as highlighted in points 3 & 4 above. Oh boy! writing if-else and for-loop in postfix notation is not child’s play (read: mind-numbingly frustrating) but wow, I’d be lying if I didn’t say It’s Quite Fulfilling! Also, I made very few keywords mandatory for a given citation style so not many errors pop up even if the BibTeX data is not up to the mark (i.e., cobbled up while in a half-awake state at midnight without any regards for health & safety instructions). After that, to reduce the chances of hephys clashing with utphys too much, I removed a few things to make it unappealing to people writing non-hep-th papers. The following are the only citation styles (with the accepted / expected keywords; only bold ones are required) supported in hephys and their sample outputs (the blue colouring just means the expected hyperlink as explained in points 2, 3 & 4 above):
1. Article: author, collaboration, title, journal, volume, number, year, pages, doi, note, eprint, primaryClass, url.
Samples:
@article{art:1, author = “author”, collaboration = “collaboration”, title = “article with both doi and url”, journal = “journal”, volume = “vol”, number = “num”, year = “year”, pages = “pages”, doi = “doi”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[1] author (collaboration), “article with both doi and url”, journal vol[num] (year) pages, note, arXiv:eprint [pClass], URL.
@article{art:2, author = “author”, collaboration = “collaboration”, title = “article with both doi and url but duplicate url not used”, journal = “journal”, volume = “vol”, number = “num”, year = “year”, pages = “pages”, doi = “doi”, note = “note”, eprint = “pClass/eprint”, primaryClass = “pClass”, url = “····://··.doi.···/10.1086⋯x”}
[2] author (collaboration), “article with both doi and url but duplicate url not used”, journal vol[num] (year) pages, note, arXiv:pClass/eprint.
@article{art:3, author = “author”, collaboration = “collaboration”, title = “article with only url used as doi”, journal = “journal”, volume = “vol”, number = “num”, year = “year”, pages = “pages”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[3] author (collaboration), “article with only url used as doi”, journal vol[num] (year) pages, note, arXiv:eprint [pClass].
@article{art:4, author = “author”, collaboration = “collaboration”, title = “article with neither doi nor url”, journal = “journal”, volume = “vol”, number = “num”, year = “year”, pages = “pages”, note = “note”, eprint = “pClass/eprint”, primaryClass = “pClass”}
[4] author (collaboration), “article with neither doi nor url”, journal vol[num] (year) pages, note, arXiv:pClass/eprint.
@article{art:5, author = “author”, collaboration = “collaboration”, title = “article with no journal”, year = “year”, pages = “pages”, note = “note”, eprint = “pClass/eprint”, primaryClass = “pClass”}
[5] author (collaboration), “article with no journal”, year, note, arXiv:pClass/eprint.
2. Book: author/editor, collaboration, title, doi, volume/number, series, edition, publisher, address, year, note, eprint, primaryClass, url.
Samples:
@book{boo:1, author = “author”, collaboration = “collaboration”, title = “book”, doi = “doi”, number = “num”, series = “series”, edition = “edn”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[6] author (collaboration), book, number num in series, edn edition, publisher, address year, note, arXiv:eprint [pClass], URL.
@book{boo:2, editor = “editor”, title = “book”, doi = “doi”, volume = “vol”, series = “series”, edition = “edn”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[7] editor (Ed.) book, volume vol of series, edn edition, publisher, address year, note, arXiv:eprint [pClass], URL.
3. Booklet: author, collaboration, title, howpublished, doi, address, year, note, eprint, primaryClass, url.
Sample:
@booklet{boo:3, author = “author”, collaboration = “collaboration”, title = “booklet”, howpublished = “howpublished”, doi = “doi”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[8] author (collaboration), “booklet”, howpublished, address year, note, arXiv:eprint [pClass], URL.
4. inBook: author and/or editor, collaboration, title, doi, (booktitle if both author & editor are present), volume/number, series, chapter and/or pages, type, edition, publisher, address, year, note, eprint, primaryClass, url.
Sample:
@inbook{inb:1, editor = “editor”, title = “inbook”, volume = “vol”, series = “series”, chapter = “ch”, pages = “pages”, doi = “doi”, edition = “edn”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[9] editor (Ed.), inbook, volume vol of series, chapter ch, p. pages, edn edition, publisher, address year, note, arXiv:eprint [pClass], URL.
5. inCollection: author, collaboration, title, doi, booktitle, editor, edition, chapter, type, pages, volume/number, series, publisher, address, year, note, eprint, primaryClass, url.
Sample:
@incollection{inc:1, author = “author”, collaboration = “collaboration”, title = “incollection”, doi = “doi”, booktitle = “booktitle”, editor = “editor”, edition = “edn”, chapter = “ch”, type = “Section”, pages = “pages”, number = “num”, series = “series”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[10] author (collaboration), “incollection“, in booktitle (edited by editor), edn edition, section ch, p. pages, number num in series, publisher, address year, note, arXiv:eprint [pClass], URL.
6. inProceedings/Conference: author, collaboration, title, doi, booktitle, volume/number, series, editor, pages, organization, publisher, address, year, note, eprint, primaryClass, url.
Sample:
@inproceedings{inp:1, author = “author”, collaboration = “collaboration”, title = “inproceedings”, doi = “doi”, booktitle = “booktitle”, volume = “vol”, series = “series”, editor = “editor”, pages = “pages”, organization = “organization”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[11] author (collaboration), “inproceedings“, in booktitle, volume vol of series (edited by editor), p. pages, organization, publisher, address year, note, arXiv:eprint [pClass], URL.
7. MastersThesis: author, collaboration, title, doi, type, school, address, year, note, eprint, primaryClass, url.
Sample:
@mastersthesis{mas:1, author = “author”, collaboration = “collaboration”, title = “mastersthesis”, doi = “doi”, school = “school”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[12] author (collaboration), mastersthesis, Master’s thesis, school, address year, note, arXiv:eprint [pClass], URL.
8. PhdThesis: author, collaboration, title, doi, type, school, address, year, note, eprint, primaryClass, url.
Sample:
@phdthesis{phd:1, author = “author”, collaboration = “collaboration”, title = “phdthesis”, doi = “doi”, type = “{Ph.D.} dissertation”, school = “school”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[13] author (collaboration), phdthesis, Ph.D. dissertation, school, address year, note, arXiv:eprint [pClass], URL.
9. Proceedings: editor, title, doi, volume/number, series, organization, publisher, address, year, note, eprint, primaryClass, url.
Sample:
@proceedings{pro:1, editor = “editor”, title = “proceedings”, doi = “doi”, volume = “vol”, series = “series”, organization = “organization”, publisher = “publisher”, address = “address”, year = “year”, note = “note”, eprint = “eprint”, primaryClass = “pClass”, url = “⋯.url.⋯”}
[14] editor (Ed.), proceedings, volume vol of series, organization, publisher, address year, note, arXiv:eprint [pClass], URL.
10. Misc: author, collaboration, title, howpublished, doi, year, note, url.
Sample:
@misc{mis:1, author = “author”, collaboration = “collaboration”, title = “misc”, howpublished = “howpublished”, year = “year”, note = “note”, url = “⋯.url.⋯”}
[15] author (collaboration), “misc”, howpublished year, note.
11. Unpublished: author, collaboration, title, year, note.
Sample:
@unpublished{unp:1, author = “author”, collaboration = “collaboration”, title = “unpublished”, year = “year”, note = “note”}
[16] author (collaboration), “unpublished”, year, note.
So there you have it, the full ‘manual’ for hephys. If you find any bugs, do send me the offending citation’s BibTeX data & expected output and I’ll look into it. There is one bug regarding citations having erratum/addendum information and two doi’s. It’s not handled correctly for now but I’m thinking of doing something about it in the new year. On second thought, there may not be a universal format for such data so I’m a bit hesitant to start looking into separating multiple doi’s and journal ref’s just yet. Anyway, if you (yes You, the zeroth reader of this post) are up for programming these and more fixes in your own ‘hephys’, do let me know. After all, the world can only rejoice with more choices to consider!
Download Link for those who reached this point!