bibtex-citations-and-references

README

Gitbook plugin: bibtex citations and references

Description

Plugin for Gitbook that handles citations and references. Beta quality, still some missing functionality.

WARNING

NOTE: this WILL NOT WORK on Gitbook's cloud servers since they continue to use Node v5, and modules required by this plugin require Node v6 or above. Consequently you will need to run this in your own Gitbook/Node environment.

How to use it

In your book.json file in your Gitbook repo, add this as a plugin:

{
    "plugins": [
        "bibtex-citations-and-references"
    ]
}

Tell Gitbook to install this and any other plugins:

gitbook install

Create or edit literature.bib in the root of your Gitbook repository. It needs to be valid bibtex. Here's an example:

@article{Wallace2013,
  url = {http://apt.rcpsych.org/content/19/4/250},
  year = {2013},
  publisher = {{Royal College of Psychiatrists}},
  doi = {10.1192/apt.bp.112.010389},
  volume = {19},
  number = {4},
  pages = {250-258},
  journal = {{BJPsych Advances}},
  author = {John Wallace},
  title = {{Lost in translation: transferring knowledge from research to clinical practice}},
}

@article{Glasziou2005,
  url = {http://ebn.bmj.com/content/8/2/36.full},
  year = {2005},
  publisher = {{British Medical Journal}},
  doi = {10.1136/ebn.8.2.36},
  volume = {8},
  pages = {36-38},
  journal = {{Evidence Based Nursing}},
  author = {Paul Glasziou and Brian Haynes},
  title = {{The paths from research to improved health outcomes}},
}

Note that citation-js does not recognise all entry-types. You may see error messages during the Gitbook rendering process.

Add citations and references in your Gitbook

Exposed functions/API:

  • cite
  • citeNoBraces
  • citeNoYear
  • citeYearOnly
  • citeYearOnlyNoBraces

For example, the following in your Gitbook source...:

The 'research-to-practice gap' describes the well-recognised struggle to put evidence into effective practice. {{"Glasziou2005"|cite}} use a 'pipeline' analogy and describe evidence 'leaking' at all stages along this pipeline.

...will render like this:

The 'research-to-practice gap' describes the well-recognised struggle to put evidence into effective practice. Glasziou and Haynes (2005) use a 'pipeline' analogy and describe evidence 'leaking' at all stages along this pipeline.

To insert a complete list of references, add this into a Gitbook source page:

{% references %}

{% endreferences %}

This uses citation-js to style the references, which in turn uses CSL. Full styling here is a work-in-progress.

The above bibtex example will produce the following references:

Glasziou, P., & Haynes, B. (2005). The paths from research to improved health outcomes. Evidence Based Nursing, 8, 36–38. https://doi.org/10.1136/ebn.8.2.36

Wallace, J. (2013). Lost in translation: transferring knowledge from research to clinical practice. BJPsych Advances, 19(4), 250–258. https://doi.org/10.1192/apt.bp.112.010389

Obviously, you need to gitbook build to see the output.

Thanks

Uses Citation Style Language stylesheets to generate references courtesy of https://github.com/larsgw/citation.js

Plugin

Beta quality, still some bugs. Plugin for Gitbook that handles citations and references. Expects bibtex references in 'literature.bib'. Uses Citation Style Language stylesheets to generate references. NOTE: this WILL NOT WORK on Gitbook's cloud servers si

https://github.com/austinjp/gitbook-plugin-bibtex-citations-and-references#readme


Latest: 0.10.4

0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.41, 0.0.42, 0.0.43, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.1.16, 0.1.17, 0.1.18, 0.1.19, 0.1.20, 0.1.21, 0.1.22, 0.1.23, 0.1.24, 0.1.25, 0.1.26, 0.1.27, 0.1.28, 0.1.29, 0.1.30, 0.1.31, 0.1.32, 0.1.33, 0.1.34, 0.1.35, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19, 0.2.20, 0.2.21, 0.2.22, 0.2.23, 0.2.24, 0.2.25, 0.2.26, 0.2.27, 0.2.28, 0.2.29, 0.2.30, 0.2.31, 0.2.32, 0.2.33, 0.2.34, 0.2.35, 0.2.36, 0.2.37, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.21, 0.3.22, 0.3.23, 0.3.24, 0.3.25, 0.3.26, 0.3.27, 0.3.28, 0.3.29, 0.3.30, 0.3.31, 0.3.32, 0.3.33, 0.3.34, 0.3.35, 0.3.36, 0.3.37, 0.3.38, 0.3.39, 0.3.40, 0.3.41, 0.3.42, 0.3.43, 0.3.44, 0.3.45, 0.3.46, 0.3.47, 0.3.48, 0.3.49, 0.3.50, 0.3.51, 0.3.52, 0.3.53, 0.3.54, 0.3.55, 0.3.56, 0.3.57, 0.3.58, 0.3.59, 0.3.60, 0.3.61, 0.3.62, 0.3.63, 0.3.64, 0.3.65, 0.3.66, 0.3.67, 0.3.68, 0.3.69, 0.3.70, 0.3.71, 0.3.72, 0.3.73, 0.3.74, 0.3.75, 0.3.76, 0.3.77, 0.3.78, 0.3.79, 0.3.80, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.4.11, 0.4.12, 0.4.13, 0.4.14, 0.4.15, 0.4.16, 0.5.0, 0.5.1, 0.5.2, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.9, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4,

Requirements

GitBook
0.10.4 >=2.0.0

Maintainers

Open on NPM