Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pandoc-ext/multibib
Generate multiple, topic-specific bibliographies.
https://github.com/pandoc-ext/multibib
lua pandoc pandoc-filter quarto quarto-extension
Last synced: about 1 month ago
JSON representation
Generate multiple, topic-specific bibliographies.
- Host: GitHub
- URL: https://github.com/pandoc-ext/multibib
- Owner: pandoc-ext
- License: mit
- Created: 2022-11-29T16:33:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-11T08:37:09.000Z (5 months ago)
- Last Synced: 2024-08-04T22:15:32.151Z (5 months ago)
- Topics: lua, pandoc, pandoc-filter, quarto, quarto-extension
- Language: Lua
- Homepage:
- Size: 31.3 KB
- Stars: 13
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# multibib
[![GitHub build status][CI badge]][CI workflow]
This filter allows to create multiple bibliographies using
`citeproc`. The content of each bibliography is controlled via
YAML values and the file in which a bibliographic entry is
specified.[CI badge]: https://img.shields.io/github/actions/workflow/status/pandoc-ext/multibib/ci.yaml?logo=github&branch=main
[CI workflow]: https://github.com/pandoc-ext/multibib/actions/workflows/ci.yamlThe bibliographies must be defined in a map below the
`bibliography` key in the document's metadata. E.g.```yaml
---
bibliography:
main: main-bibliography.bib
software: software.bib
---
```The placement of bibliographies is controlled via special divs.
``` markdown
# References::: {#refs-main}
:::# Software
::: {#refs-software}
:::
```Each refs-*x* div should have a matching entry *x* in the
metadata. These divs are filled with citations from the respective
bib-file.> [!IMPORTANT]
> This filter works best with citation styles that use non-numeric
> citation labels.Usage
------------------------------------------------------------------The filter modifies the internal document representation; it can
be used with many publishing systems that are based on pandoc.### Plain pandoc
Pass the filter to pandoc via the `--lua-filter` (or `-L`) command
line option.pandoc --lua-filter multibib.lua ...
### Quarto
Users of Quarto can install this filter as an extension with
quarto install extension pandoc-ext/multibib
and use it by adding `multibib` to the `filters` entry
in their YAML header. (You also need to add `validate-yaml: false`, as per [this discussion](https://github.com/quarto-dev/quarto-cli/issues/4139).)``` yaml
---
filters:
- multibib
validate-yaml: false
---
```### R Markdown
Use `pandoc_args` to invoke the filter. See the [R Markdown
Cookbook](https://bookdown.org/yihui/rmarkdown-cookbook/lua-filters.html)
for details.``` yaml
---
output:
word_document:
pandoc_args: ['--lua-filter=multibib.lua']
---
```License
------------------------------------------------------------------This pandoc Lua filter is published under the MIT license, see
file `LICENSE` for details.