Skip to content

Handle statement crossrefs in multiple citations #14

@jdutant

Description

@jdutant

Crossreference to a statement followed by a citation is merged by Pandoc:

@sta:claim [@smith2002, 12]

Results in:

[ Para
    [ Cite
        [ Citation
            { citationId = "sta:claim"
            , citationPrefix = []
            , citationSuffix = []
            , citationMode = AuthorInText
            , citationNoteNum = 1
            , citationHash = 0
            }
        , Citation
            { citationId = "smith2002"
            , citationPrefix = []
            , citationSuffix = [ Str "," , Space , Str "12" ]
            , citationMode = NormalCitation
            , citationNoteNum = 1
            , citationHash = 0
            }
        ]
        [ Str "@sta:claim"
        , Space
        , Str "[@smith2002,"
        , Space
        , Str "12]"
        ]
    ]
]

Currently, the filter doesn't handle this; it ignores Cite elements that contain multiple citations. The above results in a 'citation not found'.

temporary hack

In the meanwhile users need to separate statement cross-reference and citation, e.g. using an invisible zero-width non-joiner character:

@sta:claim ‌[@smith2002, 12]

desired behaviour

When the filter encounters a Cite with multiple citations, the first of which is a statement cross-reference, it should extract the latter.

Potential risk: a cite key identical to a statement key, the user is trying to cite the former and the filter mistakenly captures the latter. That's marginal, and a risk the user already faces just by using the filter and giving the same key to a statement as a bibliography entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions