Skip to content

Feature: group bibliography entries by year with section headings #14138

@michaelaye

Description

@michaelaye

Problem

When rendering a full bibliography (e.g. with nocite: '@*' for a publications page), all entries appear as a flat list. For academic CVs and publication pages, it's standard to group entries by year with reverse-chronological headings:

## 2024
- Paper A ...
- Paper B ...

## 2023
- Paper C ...

There is no built-in way to do this. Users must write Lua filters that:

  1. Disable citeproc (citeproc: false)
  2. Manually call pandoc.utils.citeproc(doc)
  3. Walk the refs div, extract years from pandoc.utils.references(doc), group entries, and insert headers

Proposed solution

A YAML option to enable year grouping:

bibliography: refs.bib
nocite: '@*'
bibliography-group-by: year
bibliography-sort: date-desc

This would instruct citeproc to insert heading elements (H2 by default) between year groups, sorted newest-first.

Alternatives considered

  • Lua filter with pandoc.utils.citeproc() (current workaround; requires disabling built-in citeproc)
  • Multiple nocite sections per year (manual maintenance, breaks on new publications)
  • Section-bibliographies filter (groups by document section, not by publication year)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions