Whakerexa > Extras > Book > Publications

Description

Overview

This page demonstrates a publication list built from BibTeX data written inside the page itself. Nothing is fetched from the internet: the data is read where it stands, parsed in the browser, and turned into a table.

There is no citation anywhere in this page. The bibliography does not need any: it lists what the BibTeX data contains. Because no reference is ever cited, the table has no number column and no back links to the text. The same code, used in a book with citations, adds both — see bibliography.html.

How the bibliography is designed, what it does not do and why: bibliography-design.html.

How to use

Three steps: write the data, add the placeholder, call the JS API.

Put the BibTeX entries in a pre element. Keep it hidden, and reveal it when JavaScript is disabled, so that the data stays readable.

<noscript>
    <style> #bibtex { display: block; } </style>
</noscript>

<pre id="bibtex" hidden>
@inproceedings{bigi2022lrec,
    author = {Brigitte Bigi and Maryvonne Zimmermann and Carine André},
    title  = {CLeLfPC: a Large Open Multi-Speaker Corpus of French Cued Speech},
    ...
}
</pre>

Add an empty element where the table is to be placed.

<div id="bibliography"></div>

Instantiate BookBibliography with the id of the data, the id of the placeholder, and the id of the content to scan for citations. Then call run(), which returns a promise.

const biblio = new BookBibliography('bibtex', 'bibliography', 'main-content');
biblio.run();

What the table shows

Columns of the generated table
Column Content Present here
Number The number given to a reference the first time it is cited. No: nothing is cited in this page.
Year The publication year, used to sort. Yes
Reference The formatted reference. Every author is listed, never "et al." Yes
More The abstract, the BibTeX source, and the links to the publication. Yes

Entries are shown even when a field is missing or when the entry type is unknown to the formatter: what is missing is made visible rather than silently dropped. The last entry of the demonstration data below is there to show it.

Two entries sharing the same key are reported through Wexa.logger, and the second one replaces the first.

Demonstration