Skip to content

Typst: missing parentheses in year-only citations #11044

@CoryMcCartan

Description

@CoryMcCartan

Explain the problem.
Year-only citations in Typst should be surrounded in parentheses to match other output formats.

test.md:

The Metropolis-Rosenbluth-Teller [-@metropolis1953] algorithm uses a symmetric proposal.

refs.bib:

@article{metropolis1953,
    title={Equation of state calculations by fast computing machines},
    author={Metropolis, Nicholas and Rosenbluth, Arianna W and Rosenbluth, Marshall N and Teller, Augusta H and Teller, Edward},
    journal={The Journal of Chemical Physics},
    volume={21},
    number={6},
    pages={1087--1092},
    year={1953},
    publisher={American Institute of Physics}
}

Citeproc will (correctly) yield output like the following:

> pandoc test.md --bibliography refs.bib --to plain -C

The Metropolis-Rosenbluth-Teller (1953) algorithm uses a symmetric
proposal.

Metropolis, Nicholas, Arianna W Rosenbluth, Marshall N Rosenbluth,
Augusta H Teller, and Edward Teller. 1953. “Equation of State
Calculations by Fast Computing Machines.” The Journal of Chemical
Physics 21 (6): 1087–92.

But with --to typst:

> pandoc test.md --bibliography refs.bib --to typst

The Metropolis-Rosenbluth-Teller #cite(<metropolis1953>, form: "year")
algorithm uses a symmetric proposal.

instead of the expected/consistent:

The Metropolis-Rosenbluth-Teller (#cite(<metropolis1953>, form: "year"))
algorithm uses a symmetric proposal.

Pandoc version?

pandoc 3.6.3
Features: +server +lua
Scripting engine: Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions