Pandoc's author in text citation

Supporting files

The minimal working example Markdown file is

---
title: MWE
---

Foo @rezende_cric_2021 foo

Bar [@rezende_cric_2021].

when I run pandoc --from markdown --citeproc --bibliography=references.bib --csl=ieee.csl mwe.md --to native, I get

[ Para
    [ Str "Foo"
    , Space
    , Cite
        [ Citation
            { citationId = "rezende_cric_2021"
            , citationPrefix = []
            , citationSuffix = []
            , citationMode = AuthorInText
            , citationNoteNum = 1
            , citationHash = 0
            }
        ]
        [ Str "[1]" ]
    , Space
    , Str "foo"
    ]
, Para
    [ Str "Bar"
    , Space
    , Cite
        [ Citation
            { citationId = "rezende_cric_2021"
            , citationPrefix = []
            , citationSuffix = []
            , citationMode = NormalCitation
            , citationNoteNum = 2
            , citationHash = 0
            }
        ]
        [ Str "[1]" ]
    , Str "."
    ]

The citationMode is correct. @rezende_cric_2021 is AuthorInText and [@rezende_cric_2021] is NormalCitation.

When I run pandoc --from markdown --citeproc --bibliography=references.bib --csl=ieee.csl mwe.md --to html, I get something like

Foo [1] foo

Bar [1].

instead of

Foo T. Rezende et al. (2021) foo

Bar [1].

Can I have some help fixing the CSL?

CSL doesn’t have the concept of AuthorInText at all – that’s a custom pandoc feature modeled after bibtex, so for details you’d have to ask at Pandoc. But I just don’t think this expected to work (in the sense of change anything) for numeric citation styles at all. At a minimum, you’d want

Foo T. Rezende et al. [1] foo

in the citation, so that the item is actually referenced in the bibliography. Some styles also actually do use “As [1] says, …”, so the correct behavior isn’t entirely unambiguous here, which is why I’d guess that Pandoc decides to not hardcode a specific behavior for this. I don’t know what the respective bibtex commands do for numeric styles – if they behave differently, you might be able to convince John at Pandoc to change the behavior.

Thanks for the information. Pandoc - Pandoc User’s Guide is not very clear about the limitations.