|
1 |
| -# multiple-bibliographies |
| 1 | +# multibib |
| 2 | + |
| 3 | +[![GitHub build status][CI badge]][CI workflow] |
2 | 4 |
|
3 | 5 | This filter allows to create multiple bibliographies using
|
4 | 6 | `citeproc`. The content of each bibliography is controlled via
|
5 | 7 | YAML values and the file in which a bibliographic entry is
|
6 | 8 | specified.
|
7 | 9 |
|
8 |
| -## Usage |
| 10 | +[CI badge]: https://img.shields.io/github/workflow/status/pandoc-ext/multibib/CI?logo=github |
| 11 | +[CI workflow]: https://github.com/pandoc-ext/multibib/actions/workflows/ci.yaml |
9 | 12 |
|
10 | 13 | The bibliographies must be defined in a map below the
|
11 | 14 | `bibliography` key in the document's metadata. E.g.
|
@@ -35,3 +38,53 @@ The placement of bibliographies is controlled via special divs.
|
35 | 38 | Each refs-*x* div should have a matching entry *x* in the
|
36 | 39 | metadata. These divs are filled with citations from the respective
|
37 | 40 | bib-file.
|
| 41 | + |
| 42 | + |
| 43 | +Usage |
| 44 | +------------------------------------------------------------------ |
| 45 | + |
| 46 | +The filter modifies the internal document representation; it can |
| 47 | +be used with many publishing systems that are based on pandoc. |
| 48 | + |
| 49 | +### Plain pandoc |
| 50 | + |
| 51 | +Pass the filter to pandoc via the `--lua-filter` (or `-L`) command |
| 52 | +line option. |
| 53 | + |
| 54 | + pandoc --lua-filter multibib.lua ... |
| 55 | + |
| 56 | +### Quarto |
| 57 | + |
| 58 | +Users of Quarto can install this filter as an extension with |
| 59 | + |
| 60 | + quarto install extension pandoc-ext/multibib |
| 61 | + |
| 62 | +and use it by adding `multibib` to the `filters` entry |
| 63 | +in their YAML header. |
| 64 | + |
| 65 | +``` yaml |
| 66 | +--- |
| 67 | +filters: |
| 68 | + - multibib |
| 69 | +--- |
| 70 | +``` |
| 71 | + |
| 72 | +### R Markdown |
| 73 | + |
| 74 | +Use `pandoc_args` to invoke the filter. See the [R Markdown |
| 75 | +Cookbook](https://bookdown.org/yihui/rmarkdown-cookbook/lua-filters.html) |
| 76 | +for details. |
| 77 | + |
| 78 | +``` yaml |
| 79 | +--- |
| 80 | +output: |
| 81 | + word_document: |
| 82 | + pandoc_args: ['--lua-filter=multibib.lua'] |
| 83 | +--- |
| 84 | +``` |
| 85 | + |
| 86 | +License |
| 87 | +------------------------------------------------------------------ |
| 88 | + |
| 89 | +This pandoc Lua filter is published under the MIT license, see |
| 90 | +file `LICENSE` for details. |
0 commit comments