tomduck / pandoc-fignos

A pandoc filter for numbering figures and figure references.
GNU General Public License v3.0
329 stars 25 forks source link

Undefined environment if all figures do not have id #73

Closed AlexandreRio closed 5 years ago

AlexandreRio commented 5 years ago

I'm running pandoc-fignos 2.0.0b3 targeting latex.

I first tried pandoc-fignos on one figure of document and I had the following latex error:

! LaTeX Error: Environment fignos:no-prefix-figure-caption undefined.

I fixed it by adding ids to all my figures but I think it's an issue worth fixing.

Minimal document to produce this bug should be:

![img1(img1)
![img2](img2){#img2}
pandoc -t latex --filter pandoc-fignos doc.md

This will output \begin{fignos:no-prefix-figure-caption} with no previous declaration.

tomduck commented 5 years ago

Thanks for your feedback. The problem, I think, is that you need to use the --standalone flag with pandoc to produce a TeX file that will compile.

AlexandreRio commented 5 years ago

Oh right, I compile multiple files to merge them, hence why I don't use --standalone at this point. Thanks for your quick answer.