jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.78k stars 3.33k forks source link

notes-after-punctuation ignored #7826

Closed dhicks closed 2 years ago

dhicks commented 2 years ago

Explain the problem. Numbered citations are being placed before, not after, punctuation, even when notes-after-punctuation: true is included in the metadata.

punc.md:

---
title: "Test"
bibliography: Young.bib
csl: epidemiology.csl
notes-after-punctuation: true
---

In numerous recent works [@YoungCerealinducedGenderSelection2009; @YoungAssessingGeographicHeterogeneity2013; @YouPM2OzoneIndicators2018], statistician S. Stanley Young and collaborators have criticized epidemiological studies and meta-analyses of the harmful effects of air pollution.

# References #

Call:

pandoc punc.md -o punc.pdf --citeproc

Result:

Screen Shot 2022-01-12 at 8 05 00 AM

Expected: Reference numbers placed after the comma.

csl and bib file

Pandoc version? pandoc 2.16.2 Compiled with pandoc-types 1.22.1, texmath 0.12.3.2, skylighting 0.12.1, citeproc 0.6, ipynb 0.1.0.2

Installed using Homebrew on 2021-12-07 on Mac OS 11.6.1.

jgm commented 2 years ago

This is not actually a bug. The style you're using is not a note style; it's a numerical style (where the numbers happen to be formatted as superscripts and thus resemble notes). notes-after-punctuation only affects citations in footnote citation styles.

dhicks commented 2 years ago

I'm getting the same behavior with the AMA 11th edition CSL, attached. This appears to be an in-text style, and pandoc-citeproc PR 384 was intended to fix this same issue with a previous version of AMA style. That pandoc-citeproc issue doesn't include a MWE or the CSL file, so I can't test it against my current document.

american-medical-association.csl.zip

jgm commented 2 years ago

Ah yes! And this code is in the Pandoc.Citeproc module too, but somehow not taking effect. I'll look into it.