Citeproc and Pandoc Fignos conflicts with `@` in Pandoc?

757 views Asked by At

I am using the latest version Pandoc to convert MD to LaTex to PDF, with citeproc: true in the Defaults file. Additionally, I am using pandoc-xnos to reference figures.

The problem appears to be their similar syntax. Near any @ seems to trigger CiteProc, and Pandoc Xnos requires @fig:id to reference files. Everything generates, although Citeproc generates warnings for each xnos reference ([WARNING] Citeproc: citation fig:id not found) and surrounds each Figure reference with [] as it does links.

Has anyone found a way to merge these two better? Ideally, Citeproc would only generate with [@cite] and xnox only with {@cite}, or recognize @fig: is not a typical citation, or the like, but reading over the documentation of both I cannot find an option or solution.

1

There are 1 answers

0
tarleb On

Adding citeproc: true to the defaults file will run citeproc as one of the first filters. You can control filter order in the defaults file by removing the citeproc setting and define the filters sequence like so:

# these filters run in the defined order
filters:
  - type: json
    path: pandoc-xnos
  - type: citeproc

Older versions of pandoc contain a small bug which require to add an arbitrary path to the citeproc entry:

  - type: citeproc
    path: does not matter