lierdakil / pandoc-crossref

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

The Error ”Filter returned error status 1” #425

Open JohnsonLo00 opened 5 months ago

JohnsonLo00 commented 5 months ago

Hello! I executed the following commands(on CMD, Windows OS):

pandoc input_v1.tex -o output_v1.docx --filter pandoc-crossref.exe -M tableEqns -M autoEqnLabels --resource-path=.;figures --bibliography refs_v1.bib --citeproc --csl china-national-standard-gb-t-7714-2015-numeric.csl -M reference-section-title=Reference --number-sections --toc

A error happened as follows:

pandoc-crossref.exe: Duplicate label: fig:sample-figure
CallStack (from HasCallStack):
  error, called at lib-internal\Text\Pandoc\CrossRef\References\Blocks\Util.hs:97:5 in pandoc-crossr_-0.3.17.0-7787b93de4c94b0927eaff78bb72f2cc9ce136c0:Text.Pandoc.CrossRef.References.Blocks.Util
Error running filter pandoc-crossref.exe:
Filter returned error status 1

Actually I execute that command block a few times, some of which just return:

Error running filter pandoc-crossref.exe:
Filter returned error status 1

Pandoc version: 3.1.11. Pandoc-crossref version: 0.3.17.0. How to fix it?

lierdakil commented 5 months ago

Read the error message:

Duplicate label: fig:sample-figure

You apparently have a duplicate label in your document. In such a case, pandoc-crossref fails instead of doing something unexpected.

... Also, you're using tex as input format. This is not supported and has a lot of quirks. See #250

JohnsonLo00 commented 5 months ago

All the identical labels used in different parts have been found and revised, it works. Thanks!