lierdakil / pandoc-crossref

Pandoc filter for cross-references
https://lierdakil.github.io/pandoc-crossref/
GNU General Public License v2.0
936 stars 74 forks source link

broken crossref since pandoc 3 in interaction with diagram-generator #371

Closed piccolbo closed 1 year ago

piccolbo commented 1 year ago

Hi I reprocessed a book in md with diagram-generator figures after upgrading pandoc and pandoc-crossref to the latest through homebrew and of all the crossrefs, the one corresponding to the diagrams are the only one broken. I tried to create an MRE, I hope I didn't introduce some other errors, but the problem persists.

---
title: "The"
---

@fig:cyclomatic.

```{.graphviz #fig:cyclomatic caption="Graphs corresponding to `if` and `while` statements resp."}
graph {
  if -- then; if--else; then -- "end if" ; else -- "end if" ;
  }

cmd line:pandoc --embed-resources --standalone --lua-filter=filters/diagram-generator.lua --filter pandoc-crossref diagram-test.md -o diagram-test.html

output: Undefined cross-reference: fig:cyclomatic

All of this worked with pandoc 2.18, I am not quite sure what pandoc-crossref was running then, unfortunately. Maybe 0.3.13 or 12, guessing from the dates.

Any suggestions? I may file also with the diagram-generator folks in case there is some strange interaction and will crossref (pun intended). Thanks

piccolbo commented 1 year ago

This is being addressed as a filter issue in the linked issue.