BibCite

BibCite let’s you cite from your BibTeX files using a markdown-like syntax. It depends on jQuery and underscore.js.

Note: all this is still pretty experimental.

JS

Load the dependencies and you’re good to go:

<script src="jquery.min.js"></script>
<script src="underscore-min.js"></script>
<script src="bibcite.min.js"></script>
<script>
    B = new BibCite('path/to/my/bib/file.bib', { /* options */ })
    B.replace();
    B.references('.bibliography')
</script>

Markdown

Parenthesized citations are very common @(Lazaridou2016).
You can add a tooltip showing the full reference just
as easily @@(Lazaridou2016). Alternatively, cite in the
running text, just like @@Descartes2006. If you prefer
footnotes @^Lazaridou2016 that is also fine.[^fn1] Or cite
without showing the reference @!Banerjee2015; or get the
full reference: @@Lazaridou2016

[^fn1]: `BibCite` works nicely with footnotes in Jekyll

# References
<div class="bibliography"></div>

Result

Parenthesized citations are very common @(Lazaridou2016). You can add a tooltip showing the full reference just as easily @@(Lazaridou2016). Alternatively, cite in the running text, just like @@Descartes2006. If you prefer footnotes @^Lazaridou2016 that is also fine.1 Or cite without showing the reference @!Banerjee2015; or get the full reference: @@Lazaridou2016

References

Syntax

The citation syntax follows the general pattern [@ or @@][mode][citation key]{[before]}{[after]}. Each part is explained below.

Syntax Meaning Example Method
@key Default inline citation @Descartes2006 citet
@(key) Parenthesized citation @(Descartes2006) citep
@^key Footnote citation @^Descartes2006 footcite
@*key Full reference @*Descartes2006 fullcite
@!key Show in references only @!Descartes2006 nocite

Options

The BibCite object takes various options. These are always passed along internally and you can overwrite them in, e.g. individual citations MyBibCite.pcite(myCitation, myOptions).

More examples

  1. BibCite works nicely with footnotes in Jekyll