Skip to content
Philip Cooksey edited this page Jul 12, 2018 · 20 revisions

Installing BibTeX-js

Load javascript, add this to your html code (the source bibtex file below may not be the most recent):

<script type="text/javascript" src="https://cdn.rawgit.com/pcooksey/bibtex-js/ef59e62c/src/bibtex_js.js"></script>

Place BibTeX file link(s) into <bibtex> tag(s) or insert bibtex text into a (hidden) textarea with id="bibtex_input":

<bibtex src="test.bib"></bibtex>
<bibtex src="text1.bib"></bibtex>

<textarea id="bibtex_input" style="display:none;">
@book{book1,
  author = "Donald Knuth",
  title = "Concrete Mathematics"
}
</textarea>

Output will be displayed in the element with id="bibtex_display", add this to HTML:

<div id="bibtex_display"></div>

That's it!

Unless you want to only display a few bibtex entries. Then see the next section. If you would like finer control or search abilities check out the last section.

Selecting BibTeX Entries

Use the class attribute instead of id. Include all bibtex keys you want displayed in bibtexkeys="key1|key2|...|keyN".

See example:

<div class="bibtex_display" bibtexkeys="sammet2003programming|bauer1998ubersetzung"></div>
<div class="bibtex_display" bibtexkeys="parr1995antlr"></div>
<div class="bibtex_display" bibtexkeys="wiki:chomskyh|sammet2003programming|parr1995antlr"></div>

Unless you want to get fancy

Customize how publications are displayed using styles.

Search entries, hide certain bibtex entries, additional bibtex variables, and more with extra functionality.

Clone this wiki locally