Search code examples
rr-markdownbookdown

Why is bookdown not numbering the figures in one chapter but it does in the others?


Why does the figure numbering break in my chapter 3 but it works in the other chapters? As far as I can see, the chunks are named correctly and all figures have captions.

The source code can be found here.


Solution

  • According to the bookdown documentation:

    If you want to cross-reference figures or tables generated from a code chunk, please make sure the chunk label only contains alphanumeric characters (a-z, A-Z, 0-9), slashes (/), or dashes (-).

    Your chunk labels contain underscores.