yarner-bib

Crates.ioyarner-bib
lib.rsyarner-bib
version0.1.2
sourcesrc
created_at2021-03-04 21:51:32.960628
updated_at2021-03-06 18:56:10.898844
descriptionA Yarner plugin for citations using a BibTeX bibliograph
homepagehttps://github.com/mlange-42/yarner-bib/
repositoryhttps://github.com/mlange-42/yarner-bib/
max_upload_size
id363917
size37,175
Martin Lange (mlange-42)

documentation

README

yarner-bib

Test status GitHub Crate MIT license

A Yarner plugin for citations using a BibTeX bibliography.

Example:

Here is a Markdown source with citations and a placeholder for the references:

## Yarner-bib example

Yarner is a command line tool for Literate Programming (@Knuth1984).
Another famous Literate Programming environment is RMarkdown (@Baumer2015).

## References

[[_REFS_]]

After processing with Yarner and yarner-bib, it produces this output:

Yarner-bib example

Yarner is a command line tool for Literate Programming (Knuth 1984). Another famous Literate Programming environment is RMarkdown (Baumer & Udwin 2015).

References

Baumer B, Udwin D (2015): R Markdown. WIREs Computational Statistics 7:3, 167-177.

Knuth DE (1984): Literate Programming. The Computer Journal 27:2, 97-111.

Installation

Binaries

  1. Download the latest binaries for your platform
  2. Unzip somewhere
  3. Add the parent directory of the executable to your PATH environmental variable

Using cargo

> cargo install yarner-bib

Usage

Add a section plugin.bib to your Yarner.toml:

[plugin.bib]
...

Cite using the BibTeX citation key, prefixed with @:

For details, see @Doe2020.

To generate the reference list, place the placeholder in each file, or in the file given under refs-file:

## References

[[_REFS_]]

Options

The plugin allows for different options, which are all optional:

[plugin.bib]
bibliography = "bibliography.bib"
style = "author-year"
refs-file = "References.md"
placeholder = "[[_REFS_]]"
link-refs = true
render-key = true
Option Details Default
bibliography The BibTeX file to use. bibliography.bib
style The citation style. Either author-year or numbered. author-year
refs-file The Markdown file for central references. References in each file if not given. none
placeholder The placeholder to replace by the list of references [[_REFS_]]
link-refs Add links from citations to references. true
render-key Render the citation key in front of each reference. true
Commit count: 43

cargo fmt