GithubHelp home page GithubHelp logo

gitbook-plugin-bibtex-citation's Introduction

Bibtex Citations Gitbook Plugin

This plugins requires gitbook >=2.0.0.

Install

Add this to your book.json, then run gitbook install:

{
    "plugins": ["bibtex-citation"]
}

Usage

The plugin expects a literature.bib file in your books root folder. You can use the bibtex keys defined within the file to reference the literature.

{{ "some-key" | cite }}

You can also add a table of references through:

{% references %} {% endreferences %}

Only used literature is included in the table of references. They are ordered by the usage within the text.

Limitations

The plugin currently only supports IEEE referencing style. Feel free to submit pull requests to add additional styles.

gitbook-plugin-bibtex-citation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gitbook-plugin-bibtex-citation's Issues

Bibliography in a separated file

Since pages are parsed alphabetically, citation numbers are attached to bibliography items page by page. As a consequence, if the bibliography file is the first file to be processed (e.g. if it is called bibliography.md), the table of references will be empty (only used items are shown). As a workaround bibliography.md could be renamed zbibliography.md, but it would be nice to avoid this dirty hack.

Can't get it working

I'm on gitbook 2.6.7 and can't get bibtex plugin working:

bibtex.md:

# BibTeX

See here: {{ "test" | cite }}

References:

{% references %} {% endreferences %}

literature.bib:

@article{test,
    title = {Test title},
    volume = {82},
    url = {http://my.url},
    doi = {10.1103/doi},
    number = {5},
    urldate = {2012-01-13},
    journal = {My journal},
    author = {Me and You},
    month = nov,
    year = {2010},
    pages = {05901},
}
$ gitbook build ./ --log=debug --debug
Template render error: (/home/boris/gitb/bibtex.md)
  TypeError: Cannot read property 'toUpperCase' of undefined (In file 'bibtex.md')
Template render error: (/home/boris/gitb/bibtex.md)
  TypeError: Cannot read property 'toUpperCase' of undefined
    at Object.exports.prettifyError (/home/boris/.gitbook/versions/2.6.7/node_modules/nunjucks/src/lib.js:34:15)
    at /home/boris/.gitbook/versions/2.6.7/node_modules/nunjucks/src/environment.js:485:31
    at eval (eval at <anonymous> (/home/boris/.gitbook/versions/2.6.7/node_modules/nunjucks/src/environment.js:564:24), <anonymous>:10:11)
    at /home/boris/.gitbook/versions/2.6.7/node_modules/q/q.js:1891:17
    at flush (/home/boris/.gitbook/versions/2.6.7/node_modules/q/q.js:108:17)
    at _combinedTickCallback (node.js:370:9)
    at process._tickCallback (node.js:401:11)

?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.