Publication List using BibTeX and BibTeX-js
Sometimes it is useful to display a list of publications on a personal website.
There are many ways to do that, with the easiest being to write down each one by hand. While it is quite simple, it is also quite annoying and probably would leave the list not updated after few days (not a big issue for my few publications, but this is a different story).
One of the ways to deal with references is using BibTeX and the associated .bib files, which are the standard for and used also by JabRef as the default database format.
There is a nice Javascript library, BibTeX-js, which is able to parse and display .bib files, with the rendering done on the client side when the page is loaded.
The only thing to do is to keep an updated .bib file, which is not too demanding, since it is also used for references in the papers.
I therefore decided to share my template, which I personally feel quite clean and nice and would be maybe useful to someone else.
It is responsive and the bib link acts as a button to show the bibtex code of the single entry.
The books, journal papers and conference papers are separated automatically and ordered by the year, with the newest being first.
The clickable link on the DOI is automatically added using the doi value, while the link on the publication title is retrieved from the url value.
As an example see my publication list (Alex Pacini’s Publications).
Historical note: The original 2018 client-side BibTeX-js template is preserved in the code listing below, while the live publications page embedded above is now rendered statically at build time.
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>
Alex Pacini's Publications
</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/css/bootstrap.min.css" crossorigin="anonymous">
<script async src="https://cdn.jsdelivr.net/npm/popper.js@latest/dist/umd/popper.min.js" crossorigin="anonymous"></script>
<script async src="https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" async src="https://cdn.jsdelivr.net/gh/pcooksey/bibtex-js@1.0.0/src/bibtex_js.min.js"></script>
<bibtex src="./StaticContent/pubList/AlexPacini.bib"></bibtex>
<link href="./StaticContent/CSS/markDown.css" rel="stylesheet">
<style>
h1 {margin-left:2%; font-size: 32pt}
h1.header {
margin-left:-5%;
font-size: 42pt;
margin-bottom: 0pt;
}
h2.header {
margin-left:0%;
margin-bottom: 5%;
}
pre {
font-size: 9pt;
display: inline;
margin: 0px;
}
#bibtex_display p {
text-align: justify;
margin-bottom: 5px;
}
.card-body {
padding: 0;
margin-bottom: 20px;
}
div.section{
margin-bottom: 24px;
}
</style>
</head>
<body>
<h1 class="header"><strong>A</strong>lex <strong>P</strong>acini's <strong>P</strong>ublications</h1>
<h2 class="header">
(<span><a href="./StaticContent/pubList/AlexPacini.bib">.<strong>b</strong>ib</a></span>,
<span><a href="https://orcid.org/0000-0002-0316-4989/print"><strong>O</strong>rc<strong>I</strong>D</a></span>,
<span><a href="https://scholar.google.com/citations?user=zBUuFHEAAAAJ"><strong>G</strong>oogle <strong>S</strong>cholar</a></span>)
</h2>
<div class="bibtex_structure">
<div class="sections bibtextypekey">
<div class="section book">
<h1><strong>B</strong>ooks</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
<div class="section article">
<h1><strong>J</strong>ournal <strong>A</strong>rticles</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
<div class="section inproceedings">
<h1><strong>C</strong>onference and <strong>W</strong>orkshop <strong>P</strong>apers</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
<div class="section patent">
<h1><strong>P</strong>atents</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
<div class="section phdthesis|mastersthesis">
<h1><strong>T</strong>heses</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
<div class="section misc|techreport">
<h1><strong>O</strong>ther <strong>P</strong>ublications</h1>
<div class="sort year" extra="DESC date">
<div class="templates"></div>
</div>
</div>
</div>
</div>
<div id="bibtex_display">
<div class="bibtex_template">
<ul><li><p>
<!-- Authors -->
<span class="if author"><span class="author"><span class="first_initial"></span> <span class="last"></span></span>,</span>
<!-- Title: linked if URL exists -->
<span class="if url"><strong>"<a class="bibtexVar" href="+URL+" extra="url"><span class="title"></span></a>"</strong>,</span>
<span class="if !url"><strong>"<span class="title"></span>"</strong>,</span>
<!-- Journal articles -->
<span class="if journal"><em><span class="journal"></span></em>,</span>
<span class="if volume">vol. <span class="volume"></span>,</span>
<span class="if journal number">no. <span class="number"></span>,</span>
<span class="if pages">pp. <span class="pages"></span>,</span>
<!-- Conference papers -->
<span class="if booktitle"><em><span class="booktitle"></span></em>,</span>
<span class="if address"><span class="address"></span>,</span>
<!-- Books -->
<span class="if editor"><span class="editor"></span> (editors),</span>
<span class="if publisher"><em><span class="publisher"></span></em>,</span>
<!-- Theses: type and school -->
<span class="if type"><span class="type"></span>,</span>
<span class="if school"><span class="school"></span>,</span>
<!-- Tech reports: institution (mutually exclusive with school) -->
<span class="if institution"><span class="institution"></span>,</span>
<!-- Misc: howpublished (mutually exclusive with school/institution) -->
<span class="if howpublished"><span class="howpublished"></span>,</span>
<!-- Patents: bold number -->
<span class="if BIBTEXTYPEKEY==PATENT"><strong><span class="number"></span></strong>,</span>
<!-- Date -->
<span class="if month"><span class="month"></span></span>
<span class="if year"><span class="year"></span>.</span>
<!-- Notes (patent status, etc.) -->
<span class="if note"> <span class="note"></span></span>
<!-- DOI link -->
<span class="if doi"> DOI: <a class="bibtexVar" href="http://dx.doi.org/+DOI+" extra="doi"><span class="doi"></span></a></span>
</p></li></ul>
</div>
</div>
</body>
</html>
Please put a link to this page if you use it :)