{"id":13791068,"url":"https://github.com/pandoc-ext/section-bibliographies","last_synced_at":"2026-02-13T15:08:52.421Z","repository":{"id":113895988,"uuid":"523391927","full_name":"pandoc-ext/section-bibliographies","owner":"pandoc-ext","description":"Filter to create a separate bibliography for each section or chapter","archived":false,"fork":false,"pushed_at":"2025-01-26T14:51:55.000Z","size":64,"stargazers_count":50,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T09:43:45.763Z","etag":null,"topics":["lua","pandoc","pandoc-filter","quarto-extension","quarto-filter"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pandoc-ext.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["tarleb"]}},"created_at":"2022-08-10T15:12:27.000Z","updated_at":"2025-04-26T22:18:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1d406d8-0f07-4dfb-aeb2-1944a0a3184c","html_url":"https://github.com/pandoc-ext/section-bibliographies","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"tarleb/lua-filter-template","purl":"pkg:github/pandoc-ext/section-bibliographies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fsection-bibliographies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fsection-bibliographies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fsection-bibliographies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fsection-bibliographies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pandoc-ext","download_url":"https://codeload.github.com/pandoc-ext/section-bibliographies/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fsection-bibliographies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29411138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","pandoc","pandoc-filter","quarto-extension","quarto-filter"],"created_at":"2024-08-03T22:00:55.128Z","updated_at":"2026-02-13T15:08:52.402Z","avatar_url":"https://github.com/pandoc-ext.png","language":"Lua","funding_links":["https://github.com/sponsors/tarleb"],"categories":["Extensions"],"sub_categories":[],"readme":"Section Bibliographies Filter\n==================================================================\n\n[![GitHub build status][CI badge]][CI workflow]\n\nPandoc filter that generates a bibliography for each top-level\nsection / chapter.\n\nThe filter allows the user to put bibliographies at the end of\neach section, containing only those references in the section. It\nworks by splitting the document up into sections, and then\ntreating each section as a separate document for *citeproc* to\nprocess.\n\n[CI badge]: https://img.shields.io/github/actions/workflow/status/pandoc-ext/section-bibliographies/ci.yaml?branch=main\u0026logo=github\n[CI workflow]: https://github.com/pandoc-ext/section-bibliographies/actions/workflows/ci.yaml\n\n\nUsage\n------------------------------------------------------------------\n\nThe filter modifies the internal document representation; it can\nbe used with many publishing systems that are based on pandoc.\n\nMost users will want to set the `reference-section-title` metadata\nvalue to add a section heading to the reference section.\n\n### Plain pandoc\n\nThis filter interferes with the default operation of citeproc. The\n`citeproc` filter must either be run *before* this filter, or not\nat all. The `section-bibliographies.lua` filter calls `citeproc`\nas necessary. For example:\n\n    pandoc input.md --citeproc --lua-filter section-bibliographies.lua\n\nor\n\n    pandoc input.md --lua-filter section-bibliographies.lua\n\n\n### Quarto\n\nUsers of Quarto can install this filter as an extension with\n\n    quarto install extension pandoc-ext/section-bibliographies\n\nand use it by adding `section-bibliographies` to the `filters`\nentry in their YAML header. This filter should run *after*\nQuarto's default filters.\n\nIt is recommended to set `citeproc: false` in the YAML header, as\nthis minimizes interference with Quarto's default citation\nhandling.\n\n``` yaml\n---\nfilters:\n  # Run Quarto's default filters first\n  - quarto\n  - section-bibliographies\nbibliography: my-bibliography.bib\nreference-section-title: References\nciteproc: false\n---\n```\n\n**Please Note**: In some OS environments it might be necessary to\nuse the complete absolute path to the `.lua` file for the filter,\ne.g.\n\n```\nfilters:\n  - /home/user/_extensions/pandoc-ext/section-bibliographies/section-bibliographies.lua\n```\n\n### R Markdown\n\nUse `pandoc_args` to invoke the filter. See the [R Markdown\nCookbook](https://bookdown.org/yihui/rmarkdown-cookbook/lua-filters.html)\nfor details.\n\n``` yaml\n---\nreference-section-title: References\noutput:\n  word_document:\n    pandoc_args: ['--lua-filter=section-bibliographies.lua']\n---\n```\n\nConfiguration\n------------------------------------------------------------------\n\nThe filter allows customization through metadata fields, all\nnested below the `section-bibliographies` value:\n\n`section-bibiliograpies.cleanup-first`\n:   Remove the reference section added by a previous `citeproc`\n    run. The default is `false`.\n\n`section-bibiliograpies.level`\n:   This variable controls what level the biblography will occur\n    at the end of. The header of the generated references section\n    will be one level lower than the section that it appears on\n    (so if it occurs at the end of a level-1 section, it will\n    receive a level-2 header, and so on).\n\n`section-bibiliograpies.minlevel`\n:   Sets the minimum section level at which bibliographies will be\n    produced. The default is 1. Higher numbers will leave\n    top-level sections unprocessed.\n\n`section-bibliographies.bibliography`\n:   Behaves like `bibliography` in the context of this filter.\n    This variable exists because pandoc automatically invokes\n    `citeproc` as the final filter if it is called with either\n    `--bibliography`, or if the `bibliography` metadata is given\n    via a command line option. Using `section-bibs-bibliography`\n    on the command line avoids this unwanted invocation.\n\n`section-bibliographies.references`\n:   Behaves like `references` in the context of this filter.\n\nThe metadata fields `section-bibs-level` and\n`section-bibs-bibliography` have the same effect as the nested\n`level` and `bibliography` values, respectively. This is for for\nbackwards compatibility. The old names are deprecated and should\nno longer be used.\n\n\nBibliography placement\n------------------------------------------------------------------\n\nDiv elements with class `sectionrefs` can be used to manually\nplace the bibliography. The filter will use the div as the\ncontainer for the list of references, similar to how Div's with\nidentifier `refs` are be used by plain citeproc.\n\nIf the `sectionrefs` div is nested below another heading, then\nthat heading must be marked with the `sectionbibliography` class,\nor otherwise it might be ignored.\n\n``` markdown\n# Here is one section\n\nThis reference to [@cohen:jokes] will be listed under [my refs].\n\n## A subsection\n\nHere is a not very interesting subsection.\n\n## Bibliography {.sectionbibliography}\n\nSome extra comments on the bibliography can go here.\n\n::: {.sectionrefs}\n:::\n```\n\n\nLicense\n------------------------------------------------------------------\n\nThis pandoc Lua filter is published under the MIT license, see\nfile `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Fsection-bibliographies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandoc-ext%2Fsection-bibliographies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Fsection-bibliographies/lists"}