8000 Provide a way to add a prefix or suffix to a whole citation group · Issue #10894 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Provide a way to add a prefix or suffix to a whole citation group #10894
Open
@jgm

Description

@jgm

For background see jgm/citeproc#155. This is definitely an issue I've run into in my own writing. It can be worked around by manually reordering citations.

Currently prefixes and suffixes go on individual citation-items (Citation in the pandoc types), not on whole citaitons (groups of items, or Cite in the pandoc types).

But conceptually, some prefixes and suffixes belong to the whole group rather than the individual items.

For example: in [e.g., @Zoo23; @Norway33, and others] we want e.g. at the beginning of the whole group and and others at the end, even if the citations are sorted. (So maybe it should render as (e.g., Norway 1933, Zoo 2023, and others).

biblatex and org-mode citations have a way to distinguish between prefixes/suffixes on items and on groups.

To provide this in pandoc, we'd need to make a change to pandoc-types and a change to Markdown syntax, and a change to citeproc.

  • pandoc-types: instead of Cite [Citation] [Inline], we'd need something like Cite{ citePrefix :: [Inline], citeSuffix :: [Inline], citeItems :: [Citation], citeRendered :: [Inline] }.

  • Markdown syntax: we'd need a way to indicate a prefix or suffix that goes with the whole group instead of individual items. Perhaps they could be separated from the rest by pipes: [e.g.,| @Zoo23; @Norway33|, and others] though this is a bit ugly. Or follow org-mode and have them separated by semicolons, like citations themselves: [e.g.,; @Zoo23; @Norway33;, and others].

  • citeproc: currently the citeproc Citation type (which confusingly corresponds to the pandoc Cite) does not have prefixes and suffixes; these are only found on CitationItems. This follows the CSL spec closely. So, these would need to be added, and the renderer would need to add them the the rest of the rendered citation. If we did this, we could also get rid of the restrictions on sorting introduced to prevent really bad results with prefixes and suffixes moving: see Prefix in citation group moves with sorting citeproc#155.

Pinging @bdarcus in case there has been relevant discussion in CSL/citeproc forums.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0