0

Using this method of creating a reference to a figure in a markdown file produces a double question mark ?? where the reference should be.

According to this answer, when producing a pdf-document from a tex-file, pdflatex should be run twice without deleting the temporary files that are generated. When running pandoc, no temporary files are generated and running it multiple times doesn't change anything.

Community
  • 1
  • 1
kerryz
  • 361
  • 3
  • 10
  • 1
    I don't know what does `??` mean neither how to use any `latex` flavor. But it seems that your question is missing the http://stackoverflow.com/help/mcve needed for someone else to reproduce your problem. Anyway troubleshooting this seems like very good opportunity to deep dive into some `haskell` debugging. Considering that there's >270 problems waiting in the `pandoc` queue, <80 world wide supporters of `pandoc` on Stack Overflow, turning your attention to https://github.com/jgm/pandoc seems like "the" viable option. Personally I'd try to hack and patch the output with some shell scripting – xmojmr Apr 13 '15 at 07:03

1 Answers1

0

The pandoc-fignos filter uses the correct \label and \ref macros as you require. Once you have installed the filter, you can add a label to a figure like this:

![Caption.](img.png){#fig:id}

... and reference it like this: Fig. @fig:id. Replace id with a unique identifier.

There are also the pandoc-eqnos and pandoc-tablenos filters for equations and tables, respectively.

tjd
  • 1