Describe your proposed improvement and the problem it solves.
Pandoc currently stores a citation locator as part of citationSuffix:
The AST retains roughly , p. 33, but not that page is the locator label and 33 is its value. Citeproc can parse this convention again, but filters and format bridges cannot inspect or change the locator reliably without parsing formatted inline content.
Could Citation gain optional structured locator information, such as a label and inline value? Readers could populate it when the source format provides that structure, and citeproc could continue accepting the existing suffix convention for compatibility.
This came up while mapping Carve citations, but it would also help CSL JSON, JATS, DOCX and other structured citation formats.
Describe alternatives you've considered.
We preserve the visible locator in citationSuffix and have since added private round-trip metadata carrying the typed label and value, keeping a native Cite alongside it so citeproc still processes the citation normally. That keeps output working and round-trips our own documents, but it does not give Pandoc filters an interoperable representation - a filter would have to know our private encoding to read a locator, which is the thing worth avoiding.
I realize changing pandoc-types has a high compatibility cost. I am opening this mainly to establish whether structured locators belong in the AST before attempting a concrete API proposal.
Describe your proposed improvement and the problem it solves.
Pandoc currently stores a citation locator as part of
citationSuffix:The AST retains roughly
, p. 33, but not thatpageis the locator label and33is its value. Citeproc can parse this convention again, but filters and format bridges cannot inspect or change the locator reliably without parsing formatted inline content.Could
Citationgain optional structured locator information, such as a label and inline value? Readers could populate it when the source format provides that structure, and citeproc could continue accepting the existing suffix convention for compatibility.This came up while mapping Carve citations, but it would also help CSL JSON, JATS, DOCX and other structured citation formats.
Describe alternatives you've considered.
We preserve the visible locator in
citationSuffixand have since added private round-trip metadata carrying the typed label and value, keeping a nativeCitealongside it so citeproc still processes the citation normally. That keeps output working and round-trips our own documents, but it does not give Pandoc filters an interoperable representation - a filter would have to know our private encoding to read a locator, which is the thing worth avoiding.I realize changing
pandoc-typeshas a high compatibility cost. I am opening this mainly to establish whether structured locators belong in the AST before attempting a concrete API proposal.